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 
00089   double* GetPixelSpacing();
00090 
00092   int GetWidth();
00093 
00095   int GetHeight();
00096 
00100   float* GetImagePositionPatient();
00101 
00105   float* GetImageOrientationPatient();
00106 
00108   int GetBitsAllocated();
00109 
00113   int GetPixelRepresentation();
00114 
00117   int GetNumberOfComponents();
00118 
00120   const char* GetTransferSyntaxUID();
00121 
00123   float GetRescaleSlope();
00124 
00126   float GetRescaleOffset();
00127 
00129   const char* GetPatientName();
00130 
00132   const char* GetStudyUID();
00133 
00135   const char* GetStudyID();
00136 
00138   float GetGantryAngle();
00139 
00140   //
00141   // Can I read the file?
00142   //
00143   virtual int CanReadFile(const char* fname);
00144 
00145   //
00146   // What file extensions are supported?
00147   //
00148   virtual const char* GetFileExtensions()
00149   {
00150     return ".dcm";
00151   }
00152 
00154 
00156   virtual const char* GetDescriptiveName()
00157   {
00158     return "DICOM";
00159   }
00161 
00162 protected:
00163   //
00164   // Setup the volume size
00165   //
00166   void SetupOutputInformation(int num_slices);
00167 
00168   virtual void ExecuteInformation();
00169   virtual void ExecuteData(vtkDataObject *out);
00170 
00171   //
00172   // Constructor
00173   //
00174   vtkDICOMImageReader();
00175 
00176   //
00177   // Destructor
00178   //
00179   virtual ~vtkDICOMImageReader();
00180 
00181   //
00182   // Instance of the parser used to parse the file.
00183   //
00184   DICOMParser* Parser;
00185 
00186   //
00187   // Instance of the callbacks that get the data from the file.
00188   //
00189   DICOMAppHelper* AppHelper;
00190 
00191   //
00192   // vtkDICOMImageReaderVector wants to be a PIMPL and it will be, but not quite yet.
00193   //
00194   vtkDICOMImageReaderVector* DICOMFileNames;
00195   char* DirectoryName;
00196 
00197   char* PatientName;
00198   char* StudyUID;
00199   char* StudyID;
00200   char* TransferSyntaxUID;
00201 
00202   // DICOMFileNames accessor methods for subclasses:
00203   int GetNumberOfDICOMFileNames();
00204   const char* GetDICOMFileName(int index);
00205 private:
00206   vtkDICOMImageReader(const vtkDICOMImageReader&);  // Not implemented.
00207   void operator=(const vtkDICOMImageReader&);  // Not implemented.
00208 
00209 };
00210 
00211 #endif

Generated on Thu Sep 7 11:42:41 2006 for VTK by  doxygen 1.4.3-20050530