1/*!
2
3\page mod_dcmdata dcmdata: a data encoding/decoding library and utility apps
4
5This module contains classes to manage DICOM data structures and files. It
6also provides support for DICOMDIR files as required for DICOM storage media.
7
8The main interface classes are:
9\li \b DcmFileFormat
10\li \b DcmDataset
11\li \b DcmItem
12\li \b DcmElement
13
14Here are some further classes that are of interest:
15\li \b DcmTag
16\li \b DcmTagKey
17\li \b DicomDirInterface
18
19\section Tools
20
21This module contains the following command line tools:
22\li \ref cda2dcm
23\li \ref dcm2json
24\li \ref dcm2pdf
25\li \ref dcm2xml
26\li \ref dcmconv
27\li \ref dcmcrle
28\li \ref dcmdrle
29\li \ref dcmdump
30\li \ref dcmftest
31\li \ref dcmgpdir
32\li \ref dcmodify
33\li \ref dump2dcm
34\li \ref img2dcm
35\li \ref pdf2dcm
36\li \ref stl2dcm
37\li \ref xml2dcm
38
39\section Files
40
41The following file provides further documentation:
42\li \ref file_datadict
43
44\section Examples
45
46The following example shows how to load a DICOM file and output the patient's name:
47
48\code
49DcmFileFormat fileformat;
50OFCondition status = fileformat.loadFile("test.dcm");
51if (status.good())
52{
53  OFString patientName;
54  if (fileformat.getDataset()->findAndGetOFString(DCM_PatientName, patientName).good())
55  {
56    cout << "Patient's Name: " << patientName << endl;
57  } else
58    cerr << "Error: cannot access Patient's Name!" << endl;
59} else
60  cerr << "Error: cannot read DICOM file (" << status.text() << ")" << endl;
61\endcode
62
63The following example shows how to create a DICOM dataset and save it to a file:
64
65\code
66char uid[100];
67DcmFileFormat fileformat;
68DcmDataset *dataset = fileformat.getDataset();
69dataset->putAndInsertString(DCM_SOPClassUID, UID_SecondaryCaptureImageStorage);
70dataset->putAndInsertString(DCM_SOPInstanceUID, dcmGenerateUniqueIdentifier(uid, SITE_INSTANCE_UID_ROOT));
71dataset->putAndInsertString(DCM_PatientName, "Doe^John");
72/* ... */
73dataset->putAndInsertUint8Array(DCM_PixelData, pixelData, pixelLength);
74OFCondition status = fileformat.saveFile("test.dcm", EXS_LittleEndianExplicit);
75if (status.bad())
76  cerr << "Error: cannot write DICOM file (" << status.text() << ")" << endl;
77\endcode
78
79The following example shows how to create a general purpose DICOMDIR from multiple files:
80
81\code
82DicomDirInterface dicomdir;
83OFCondition status = dicomdir.createNewDicomDir();
84if (status.good())
85{
86  while ( /* there are files */ )
87    dicomdir.addDicomFile( /* current filename */ );
88  status = dicomdir.writeDicomDir();
89  if (status.bad())
90    cerr << "Error: cannot write DICOMDIR (" << status.text() << ")" << endl;
91} else
92  cerr << "Error: cannot create DICOMDIR (" << status.text() << ")" << endl;
93\endcode
94
95*/
96
97/*!
98    \page file_datadict datadict.txt file
99    \verbinclude datadict.txt
100*/
101