00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00033 #ifndef __vtkDICOMImageReader_h
00034 #define __vtkDICOMImageReader_h
00035
00036 #include "vtkImageReader2.h"
00037
00038
00039 class vtkDICOMImageReaderVector;
00040 class DICOMParser;
00041 class DICOMAppHelper;
00042
00043
00044 class VTK_IO_EXPORT vtkDICOMImageReader : public vtkImageReader2
00045 {
00046 public:
00048
00049 static vtkDICOMImageReader *New();
00050 vtkTypeRevisionMacro(vtkDICOMImageReader,vtkImageReader2);
00052
00054 void PrintSelf(ostream& os, vtkIndent indent);
00055
00057
00059 void SetFileName(const char* fn)
00060 {
00061 if (this->DirectoryName)
00062 {
00063 delete [] this->DirectoryName;
00064 }
00065 if (this->FileName)
00066 {
00067 delete [] this->FileName;
00068 }
00069 this->DirectoryName = NULL;
00070 this->FileName = NULL;
00071 this->vtkImageReader2::SetFileName(fn);
00072 }
00074
00081 void SetDirectoryName(const char* dn);
00082
00084
00085 vtkGetStringMacro(DirectoryName);
00087
00092 double* GetPixelSpacing();
00093
00095 int GetWidth();
00096
00098 int GetHeight();
00099
00103 float* GetImagePositionPatient();
00104
00108 float* GetImageOrientationPatient();
00109
00111 int GetBitsAllocated();
00112
00116 int GetPixelRepresentation();
00117
00120 int GetNumberOfComponents();
00121
00123 const char* GetTransferSyntaxUID();
00124
00126 float GetRescaleSlope();
00127
00129 float GetRescaleOffset();
00130
00132 const char* GetPatientName();
00133
00135 const char* GetStudyUID();
00136
00138 const char* GetStudyID();
00139
00141 float GetGantryAngle();
00142
00143
00144
00145
00146 virtual int CanReadFile(const char* fname);
00147
00148
00149
00150
00151 virtual const char* GetFileExtensions()
00152 {
00153 return ".dcm";
00154 }
00155
00157
00159 virtual const char* GetDescriptiveName()
00160 {
00161 return "DICOM";
00162 }
00164
00165 protected:
00166
00167
00168
00169 void SetupOutputInformation(int num_slices);
00170
00171 virtual void ExecuteInformation();
00172 virtual void ExecuteData(vtkDataObject *out);
00173
00174
00175
00176
00177 vtkDICOMImageReader();
00178
00179
00180
00181
00182 virtual ~vtkDICOMImageReader();
00183
00184
00185
00186
00187 DICOMParser* Parser;
00188
00189
00190
00191
00192 DICOMAppHelper* AppHelper;
00193
00194
00195
00196
00197 vtkDICOMImageReaderVector* DICOMFileNames;
00198 char* DirectoryName;
00199
00200 char* PatientName;
00201 char* StudyUID;
00202 char* StudyID;
00203 char* TransferSyntaxUID;
00204
00205
00206 int GetNumberOfDICOMFileNames();
00207 const char* GetDICOMFileName(int index);
00208 private:
00209 vtkDICOMImageReader(const vtkDICOMImageReader&);
00210 void operator=(const vtkDICOMImageReader&);
00211
00212 };
00213
00214 #endif