Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

dox/IO/vtkDICOMImageReader.h

Go to the documentation of this file.
00001 00002 /*========================================================================= 00003 00004 Program: Visualization Toolkit 00005 Module: $RCSfile: vtkDICOMImageReader.h,v $ 00006 00007 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00008 All rights reserved. 00009 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00010 00011 This software is distributed WITHOUT ANY WARRANTY; without even 00012 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00013 PURPOSE. See the above copyright notice for more information. 00014 00015 =========================================================================*/ 00023 #ifndef __vtkDICOMImageReader_h 00024 #define __vtkDICOMImageReader_h 00025 00026 #include "vtkImageReader2.h" 00027 00028 //BTX 00029 class vtkDICOMImageReaderVector; 00030 class DICOMParser; 00031 class DICOMAppHelper; 00032 //ETX 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 // Setup the volume size 00128 // 00129 void SetupOutputInformation(int num_slices); 00130 00131 // 00132 // Can I read the file? 00133 // 00134 virtual int CanReadFile(const char* fname); 00135 00136 // 00137 // What file extensions are supported? 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 // Constructor 00158 // 00159 vtkDICOMImageReader(); 00160 00161 // 00162 // Destructor 00163 // 00164 virtual ~vtkDICOMImageReader(); 00165 00166 // 00167 // Instance of the parser used to parse the file. 00168 // 00169 DICOMParser* Parser; 00170 00171 // 00172 // Instance of the callbacks that get the data from the file. 00173 // 00174 DICOMAppHelper* AppHelper; 00175 00176 // 00177 // vtkDICOMImageReaderVector wants to be a PIMPL and it will be, but not quite yet. 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&); // Not implemented. 00189 void operator=(const vtkDICOMImageReader&); // Not implemented. 00190 00191 }; 00192 00193 #endif