vtkDICOMImageReader.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00037 #ifndef __vtkDICOMImageReader_h
00038 #define __vtkDICOMImageReader_h
00039
00040 #include "vtkImageReader2.h"
00041
00042
00043 class vtkDICOMImageReaderVector;
00044 class DICOMParser;
00045 class DICOMAppHelper;
00046
00047
00048 class VTK_IO_EXPORT vtkDICOMImageReader : public vtkImageReader2
00049 {
00050 public:
00052
00053 static vtkDICOMImageReader *New();
00054 vtkTypeRevisionMacro(vtkDICOMImageReader,vtkImageReader2);
00056
00058 void PrintSelf(ostream& os, vtkIndent indent);
00059
00061
00063 void SetFileName(const char* fn)
00064 {
00065 if (this->DirectoryName)
00066 {
00067 delete [] this->DirectoryName;
00068 }
00069 if (this->FileName)
00070 {
00071 delete [] this->FileName;
00072 }
00073 this->DirectoryName = NULL;
00074 this->FileName = NULL;
00075 this->vtkImageReader2::SetFileName(fn);
00076 }
00078
00085 void SetDirectoryName(const char* dn);
00086
00088
00089 vtkGetStringMacro(DirectoryName);
00091
00093 double* GetPixelSpacing();
00094
00096 int GetWidth();
00097
00099 int GetHeight();
00100
00104 float* GetImagePositionPatient();
00105
00107 int GetBitsAllocated();
00108
00112 int GetPixelRepresentation();
00113
00116 int GetNumberOfComponents();
00117
00119 const char* GetTransferSyntaxUID();
00120
00122 float GetRescaleSlope();
00123
00125 float GetRescaleOffset();
00126
00128 const char* GetPatientName();
00129
00131 const char* GetStudyUID();
00132
00134 const char* GetStudyID();
00135
00137 float GetGantryAngle();
00138
00139 protected:
00140
00141
00142
00143 void SetupOutputInformation(int num_slices);
00144
00145
00146
00147
00148 virtual int CanReadFile(const char* fname);
00149
00150
00151
00152
00153 virtual const char* GetFileExtensions()
00154 {
00155 return ".dcm";
00156 }
00157
00159
00161 virtual const char* GetDescriptiveName()
00162 {
00163 return "DICOM";
00164 }
00166
00167 virtual void ExecuteInformation();
00168 virtual void ExecuteData(vtkDataObject *out);
00169
00170
00171
00172
00173 vtkDICOMImageReader();
00174
00175
00176
00177
00178 virtual ~vtkDICOMImageReader();
00179
00180
00181
00182
00183 DICOMParser* Parser;
00184
00185
00186
00187
00188 DICOMAppHelper* AppHelper;
00189
00190
00191
00192
00193 vtkDICOMImageReaderVector* DICOMFileNames;
00194 char* DirectoryName;
00195
00196 char* PatientName;
00197 char* StudyUID;
00198 char* StudyID;
00199 char* TransferSyntaxUID;
00200
00201
00202 int GetNumberOfDICOMFileNames();
00203 const char* GetDICOMFileName(int index);
00204 private:
00205 vtkDICOMImageReader(const vtkDICOMImageReader&);
00206 void operator=(const vtkDICOMImageReader&);
00207
00208 };
00209
00210 #endif