1 // $Header: /cvs/public/gdcm/src/Attic/gdcmHeaderHelper.h,v 1.9 2004/01/12 13:12:28 regrain Exp $
3 #ifndef GDCMHEADERHELPER_H
4 #define GDCMHEADERHELPER_H
6 #include "gdcmHeader.h"
8 // Dicom Part 3.3 Compliant
13 BI, // Biomagnetic Imaging
14 CF, // Cinefluorography
16 CR, // Computed Radiography
18 CT, // Computed Tomography
20 DF, // Digital Fluoroscopy
22 DM, // Digital Microscopy
23 DS, // Digital Substraction Angiography
24 DX, // Digital Radiography
25 ECG, // Echocardiography
26 EPS, // Basic Cardiac EP
28 FA, // Fluorescein Angiography
33 LS, // Laser Surface Scan
34 MA, // Magnetic Resonance Angiography
35 MR, // Magnetic Resonance
36 NM, // Nuclear Medicine
38 PT, // Positron Emission Tomography
39 RF, // Radio Fluoroscopy
40 RG, // Radiographic Imaging
41 RTDOSE, // Radiotherapy Dose
42 RTIMAGE, // Radiotherapy Image
43 RTPLAN, // Radiotherapy Plan
44 RTSTRUCT, // Radiotherapy Structure Set
45 SM, // Microscopic Imaging
46 ST, // Single-photon Emission Computed Tomography
49 VF, // Videofluorography
50 XA, // X-Ray Angiography
51 XC // Photographic Imaging
55 * This class is meant to *interpret* data given from gdcmHeader
57 * - it will help other dev to link against there lib
58 * - return value instead of string
59 * - will be able to search for data at some other place
60 * - return *default value* which is not a gdcmHeader goal
63 class GDCM_EXPORT gdcmHeaderHelper : public gdcmHeader {
66 gdcmHeaderHelper::gdcmHeaderHelper();
67 gdcmHeaderHelper::gdcmHeaderHelper(const char *filename, bool exception_on_error = false);
70 std::string GetPixelType();
76 //Usefull for rescaling graylevel:
77 float GetRescaleIntercept();
78 float GetRescaleSlope();
80 int GetNumberOfScalarComponents();
81 int GetNumberOfScalarComponentsRaw();
83 std::string GetStudyUID();
84 std::string GetSeriesUID();
85 std::string GetClassUID();
86 std::string GetInstanceUID();
89 change GetXImagePosition -> GetXOrigin in order not to confused reader
90 -# GetXOrigin can return default value (=0) if it was not ImagePosition
91 -# Image Position is different in dicomV3 <> ACR NEMA -> better use generic
99 ModalityType GetModality();
101 void GetImageOrientationPatient( float* iop );
107 This class should be used for a stack of 2D dicom images.
108 For a multiframe dicom image better use directly gdcmHeaderHelper
110 class GDCM_EXPORT gdcmSerieHeaderHelper {
113 gdcmSerieHeaderHelper::gdcmSerieHeaderHelper() {};
114 gdcmSerieHeaderHelper::~gdcmSerieHeaderHelper();
116 void AddFileName(std::string filename); //should return bool or throw error ?
117 void AddGdcmFile(gdcmHeaderHelper *file);
118 void SetDirectory(std::string dir);
119 void OrderGdcmFileList();
121 gdcmHeaderHelper *GetGdcmHeader()
123 //Assume all element in the list have the same global infos
124 return CoherentGdcmFileList.front();
127 std::list<gdcmHeaderHelper*>& GetGdcmFileList();
130 bool ImagePositionPatientOrdering();
131 bool ImageNumberOrdering();
132 bool FileNameOrdering();
134 std::list<gdcmHeaderHelper*> CoherentGdcmFileList;