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

vtkDICOMImageReader.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkDICOMImageReader.h,v $
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00033 #ifndef __vtkDICOMImageReader_h
00034 #define __vtkDICOMImageReader_h
00035 
00036 #include "vtkImageReader2.h"
00037 
00038 //BTX
00039 class vtkDICOMImageReaderVector;
00040 class DICOMParser;
00041 class DICOMAppHelper;
00042 //ETX
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   // Can I read the file?
00145   //
00146   virtual int CanReadFile(const char* fname);
00147 
00148   //
00149   // What file extensions are supported?
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   // Setup the volume size
00168   //
00169   void SetupOutputInformation(int num_slices);
00170 
00171   virtual void ExecuteInformation();
00172   virtual void ExecuteData(vtkDataObject *out);
00173 
00174   //
00175   // Constructor
00176   //
00177   vtkDICOMImageReader();
00178 
00179   //
00180   // Destructor
00181   //
00182   virtual ~vtkDICOMImageReader();
00183 
00184   //
00185   // Instance of the parser used to parse the file.
00186   //
00187   DICOMParser* Parser;
00188 
00189   //
00190   // Instance of the callbacks that get the data from the file.
00191   //
00192   DICOMAppHelper* AppHelper;
00193 
00194   //
00195   // vtkDICOMImageReaderVector wants to be a PIMPL and it will be, but not quite yet.
00196   //
00197   vtkDICOMImageReaderVector* DICOMFileNames;
00198   char* DirectoryName;
00199 
00200   char* PatientName;
00201   char* StudyUID;
00202   char* StudyID;
00203   char* TransferSyntaxUID;
00204 
00205   // DICOMFileNames accessor methods for subclasses:
00206   int GetNumberOfDICOMFileNames();
00207   const char* GetDICOMFileName(int index);
00208 private:
00209   vtkDICOMImageReader(const vtkDICOMImageReader&);  // Not implemented.
00210   void operator=(const vtkDICOMImageReader&);  // Not implemented.
00211 
00212 };
00213 
00214 #endif

Generated on Mon Jan 21 23:07:31 2008 for VTK by  doxygen 1.4.3-20050530