1 // $Header: /cvs/public/gdcm/src/Attic/gdcmHeaderHelper.h,v 1.7 2003/11/12 14:06:35 malaterre Exp $
3 #ifndef GDCMHEADERHELPER_H
4 #define GDCMHEADERHELPER_H
6 #include "gdcmHeader.h"
11 // Dicom Part 3.3 Compliant
16 BI, // Biomagnetic Imaging
17 CF, // Cinefluorography
19 CR, // Computed Radiography
21 CT, // Computed Tomography
23 DF, // Digital Fluoroscopy
25 DM, // Digital Microscopy
26 DS, // Digital Substraction Angiography
27 DX, // Digital Radiography
28 ECG, // Echocardiography
29 EPS, // Basic Cardiac EP
31 FA, // Fluorescein Angiography
36 LS, // Laser Surface Scan
37 MA, // Magnetic Resonance Angiography
38 MR, // Magnetic Resonance
39 NM, // Nuclear Medicine
41 PT, // Positron Emission Tomography
42 RF, // Radio Fluoroscopy
43 RG, // Radiographic Imaging
44 RTDOSE, // Radiotherapy Dose
45 RTIMAGE, // Radiotherapy Image
46 RTPLAN, // Radiotherapy Plan
47 RTSTRUCT, // Radiotherapy Structure Set
48 SM, // Microscopic Imaging
49 ST, // Single-photon Emission Computed Tomography
52 VF, // Videofluorography
53 XA, // X-Ray Angiography
54 XC // Photographic Imaging
58 This class is meant to *interpret* data given from gdcmHeader
60 * it will help other dev to link against there lib
61 * return value instead of string
62 * will be able to search for data at some other place
63 * return *default value* which is not a gdcmHeader goal
66 class GDCM_EXPORT gdcmHeaderHelper : public gdcmHeader {
70 gdcmHeaderHelper::gdcmHeaderHelper();
71 gdcmHeaderHelper::gdcmHeaderHelper(const char *filename, bool exception_on_error = false);
74 std::string GetPixelType();
80 //Usefull for rescaling graylevel:
81 float GetRescaleIntercept();
82 float GetRescaleSlope();
84 int GetNumberOfScalarComponents();
85 int GetNumberOfScalarComponentsRaw();
87 std::string GetStudyUID();
88 std::string GetSeriesUID();
89 std::string GetClassUID();
90 std::string GetInstanceUID();
93 change GetXImagePosition -> GetXOrigin in order not to confused reader
94 -# GetXOrigin can return default value (=0) if it was not ImagePosition
95 -# Image Position is different in dicomV3 <> ACR NEMA -> better use generic
102 int GetImageNumber();
103 ModalityType GetModality();
105 void GetImageOrientationPatient( float* iop );
111 This class should be used for a stack of 2D dicom images.
112 For a multiframe dicom image better use directly gdcmHeaderHelper
114 class GDCM_EXPORT gdcmSerieHeaderHelper {
117 gdcmSerieHeaderHelper::gdcmSerieHeaderHelper() {};
118 gdcmSerieHeaderHelper::~gdcmSerieHeaderHelper();
120 void AddFileName(std::string filename); //should return bool or throw error ?
121 void AddGdcmFile(gdcmHeaderHelper *file);
122 void SetDirectory(std::string dir);
123 void OrderGdcmFileList();
125 gdcmHeaderHelper *GetGdcmHeader()
127 //Assume all element in the list have the same global infos
128 return CoherentGdcmFileList.front();
131 std::list<gdcmHeaderHelper*>& GetGdcmFileList();
134 bool ImagePositionPatientOrdering();
135 bool ImageNumberOrdering();
136 bool FileNameOrdering();
138 std::list<gdcmHeaderHelper*> CoherentGdcmFileList;