VTK
vtkDICOMImageReader.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkDICOMImageReader.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
42 #ifndef vtkDICOMImageReader_h
43 #define vtkDICOMImageReader_h
44 
45 #include "vtkIOImageModule.h" // For export macro
46 #include "vtkImageReader2.h"
47 
48 //BTX
49 class vtkDICOMImageReaderVector;
50 class DICOMParser;
51 class DICOMAppHelper;
52 //ETX
53 
55 {
56  public:
58 
62 
64  void PrintSelf(ostream& os, vtkIndent indent);
65 
67 
69  void SetFileName(const char* fn)
70  {
71  delete [] this->DirectoryName;
72  delete [] this->FileName;
73  this->DirectoryName = NULL;
74  this->FileName = NULL;
76  }
78 
85  void SetDirectoryName(const char* dn);
86 
88 
89  vtkGetStringMacro(DirectoryName);
91 
96  double* GetPixelSpacing();
97 
99  int GetWidth();
100 
102  int GetHeight();
103 
108 
113 
116 
121 
125 
127  const char* GetTransferSyntaxUID();
128 
131 
134 
136  const char* GetPatientName();
137 
139  const char* GetStudyUID();
140 
142  const char* GetStudyID();
143 
145  float GetGantryAngle();
146 
147  //
148  // Can I read the file?
149  //
150  virtual int CanReadFile(const char* fname);
151 
152  //
153  // What file extensions are supported?
154  //
155  virtual const char* GetFileExtensions()
156  {
157  return ".dcm";
158  }
159 
161 
163  virtual const char* GetDescriptiveName()
164  {
165  return "DICOM";
166  }
168 
169 protected:
170  //
171  // Setup the volume size
172  //
173  void SetupOutputInformation(int num_slices);
174 
175  virtual void ExecuteInformation();
177 
178  //
179  // Constructor
180  //
182 
183  //
184  // Destructor
185  //
187 
188  //
189  // Instance of the parser used to parse the file.
190  //
191  DICOMParser* Parser;
192 
193  //
194  // Instance of the callbacks that get the data from the file.
195  //
196  DICOMAppHelper* AppHelper;
197 
198  //
199  // vtkDICOMImageReaderVector wants to be a PIMPL and it will be, but not quite yet.
200  //
201  vtkDICOMImageReaderVector* DICOMFileNames;
203 
204  char* PatientName;
205  char* StudyUID;
206  char* StudyID;
208 
209  // DICOMFileNames accessor methods for subclasses:
211  const char* GetDICOMFileName(int index);
212 private:
213  vtkDICOMImageReader(const vtkDICOMImageReader&); // Not implemented.
214  void operator=(const vtkDICOMImageReader&); // Not implemented.
215 
216 };
217 
218 #endif
vtkDICOMImageReader::ExecuteDataWithInformation
virtual void ExecuteDataWithInformation(vtkDataObject *out, vtkInformation *outInfo)
vtkImageReader2::FileName
char * FileName
Definition: vtkImageReader2.h:274
vtkDICOMImageReader::GetPixelSpacing
double * GetPixelSpacing()
vtkDICOMImageReader::GetFileExtensions
virtual const char * GetFileExtensions()
Definition: vtkDICOMImageReader.h:155
vtkDICOMImageReader::CanReadFile
virtual int CanReadFile(const char *fname)
vtkDICOMImageReader::PatientName
char * PatientName
Definition: vtkDICOMImageReader.h:204
vtkDICOMImageReader::GetNumberOfDICOMFileNames
int GetNumberOfDICOMFileNames()
vtkIOImageModule.h
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkDICOMImageReader::GetPixelRepresentation
int GetPixelRepresentation()
VTKIOIMAGE_EXPORT
#define VTKIOIMAGE_EXPORT
Definition: vtkIOImageModule.h:15
vtkDICOMImageReader
Reads some DICOM images.
Definition: vtkDICOMImageReader.h:55
vtkDICOMImageReader::GetDICOMFileName
const char * GetDICOMFileName(int index)
vtkDICOMImageReader::ExecuteInformation
virtual void ExecuteInformation()
vtkDICOMImageReader::GetImagePositionPatient
float * GetImagePositionPatient()
vtkDICOMImageReader::DirectoryName
char * DirectoryName
Definition: vtkDICOMImageReader.h:202
vtkDICOMImageReader::GetPatientName
const char * GetPatientName()
vtkDICOMImageReader::GetStudyUID
const char * GetStudyUID()
vtkDICOMImageReader::GetBitsAllocated
int GetBitsAllocated()
vtkDICOMImageReader::New
static vtkDICOMImageReader * New()
vtkDICOMImageReader::Parser
DICOMParser * Parser
Definition: vtkDICOMImageReader.h:191
vtkDICOMImageReader::GetNumberOfComponents
int GetNumberOfComponents()
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkDICOMImageReader::GetImageOrientationPatient
float * GetImageOrientationPatient()
vtkDICOMImageReader::SetFileName
void SetFileName(const char *fn)
Definition: vtkDICOMImageReader.h:69
vtkImageReader2
Superclass of binary file readers.
Definition: vtkImageReader2.h:58
vtkGetStringMacro
vtkGetStringMacro(ExtensionsString)
vtkDICOMImageReader::DICOMFileNames
vtkDICOMImageReaderVector * DICOMFileNames
Definition: vtkDICOMImageReader.h:201
vtkDICOMImageReader::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
vtkImageReader2::SetFileName
virtual void SetFileName(const char *)
vtkDICOMImageReader::SetDirectoryName
void SetDirectoryName(const char *dn)
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:86
vtkDICOMImageReader::GetDescriptiveName
virtual const char * GetDescriptiveName()
Definition: vtkDICOMImageReader.h:163
vtkgl::index
GLuint index
Definition: vtkgl.h:11983
vtkDICOMImageReader::GetTransferSyntaxUID
const char * GetTransferSyntaxUID()
vtkDICOMImageReader::GetWidth
int GetWidth()
vtkDICOMImageReader::~vtkDICOMImageReader
virtual ~vtkDICOMImageReader()
vtkDICOMImageReader::TransferSyntaxUID
char * TransferSyntaxUID
Definition: vtkDICOMImageReader.h:207
vtkDICOMImageReader::GetHeight
int GetHeight()
vtkDICOMImageReader::AppHelper
DICOMAppHelper * AppHelper
Definition: vtkDICOMImageReader.h:196
vtkDICOMImageReader::StudyID
char * StudyID
Definition: vtkDICOMImageReader.h:206
vtkDICOMImageReader::vtkDICOMImageReader
vtkDICOMImageReader()
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:65
vtkDICOMImageReader::GetStudyID
const char * GetStudyID()
vtkDICOMImageReader::StudyUID
char * StudyUID
Definition: vtkDICOMImageReader.h:205
vtkDICOMImageReader::GetRescaleOffset
float GetRescaleOffset()
vtkDICOMImageReader::SetupOutputInformation
void SetupOutputInformation(int num_slices)
vtkDICOMImageReader::GetRescaleSlope
float GetRescaleSlope()
vtkImageReader2.h
vtkDICOMImageReader::GetGantryAngle
float GetGantryAngle()