IO/vtkDICOMImageReader.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00023 #ifndef __vtkDICOMImageReader_h
00024 #define __vtkDICOMImageReader_h
00025
00026 #include "vtkImageReader2.h"
00027
00028
00029 class vtkDICOMImageReaderVector;
00030 class DICOMParser;
00031 class DICOMAppHelper;
00032
00033
00034 class VTK_IO_EXPORT vtkDICOMImageReader : public vtkImageReader2
00035 {
00036 public:
00038
00039 static vtkDICOMImageReader *New();
00040 vtkTypeRevisionMacro(vtkDICOMImageReader,vtkImageReader2);
00042
00044 void PrintSelf(ostream& os, vtkIndent indent);
00045
00047
00049 void SetFileName(const char* fn)
00050 {
00051 if (this->DirectoryName)
00052 {
00053 delete [] this->DirectoryName;
00054 }
00055 if (this->FileName)
00056 {
00057 delete [] this->FileName;
00058 }
00059 this->DirectoryName = NULL;
00060 this->FileName = NULL;
00061 this->vtkImageReader2::SetFileName(fn);
00062 }
00064
00071 void SetDirectoryName(const char* dn);
00072
00074
00075 vtkGetStringMacro(DirectoryName);
00077
00079 double* GetPixelSpacing();
00080
00082 int GetWidth();
00083
00085 int GetHeight();
00086
00090 float* GetImagePositionPatient();
00091
00093 int GetBitsAllocated();
00094
00098 int GetPixelRepresentation();
00099
00102 int GetNumberOfComponents();
00103
00105 const char* GetTransferSyntaxUID();
00106
00108 float GetRescaleSlope();
00109
00111 float GetRescaleOffset();
00112
00114 const char* GetPatientName();
00115
00117 const char* GetStudyUID();
00118
00120 const char* GetStudyID();
00121
00123 float GetGantryAngle();
00124
00125 protected:
00126
00127
00128
00129 void SetupOutputInformation(int num_slices);
00130
00131
00132
00133
00134 virtual int CanReadFile(const char* fname);
00135
00136
00137
00138
00139 virtual const char* GetFileExtensions()
00140 {
00141 return ".dcm";
00142 }
00143
00145
00147 virtual const char* GetDescriptiveName()
00148 {
00149 return "DICOM";
00150 }
00152
00153 virtual void ExecuteInformation();
00154 virtual void ExecuteData(vtkDataObject *out);
00155
00156
00157
00158
00159 vtkDICOMImageReader();
00160
00161
00162
00163
00164 virtual ~vtkDICOMImageReader();
00165
00166
00167
00168
00169 DICOMParser* Parser;
00170
00171
00172
00173
00174 DICOMAppHelper* AppHelper;
00175
00176
00177
00178
00179 vtkDICOMImageReaderVector* DICOMFileNames;
00180 char* DirectoryName;
00181
00182 char* PatientName;
00183 char* StudyUID;
00184 char* StudyID;
00185 char* TransferSyntaxUID;
00186
00187 private:
00188 vtkDICOMImageReader(const vtkDICOMImageReader&);
00189 void operator=(const vtkDICOMImageReader&);
00190
00191 };
00192
00193 #endif