2 //-----------------------------------------------------------------------------
3 #ifndef __vtkGdcmReader_h
4 #define __vtkGdcmReader_h
6 #include <vtkImageReader.h>
10 //-----------------------------------------------------------------------------
13 //-----------------------------------------------------------------------------
14 class VTK_EXPORT vtkGdcmReader : public vtkImageReader
17 static vtkGdcmReader *New() {return new vtkGdcmReader;};
18 vtkTypeMacro(vtkGdcmReader, vtkImageReader);
19 void PrintSelf(ostream& os, vtkIndent indent);
21 virtual void RemoveAllFileName(void);
22 virtual void AddFileName(const char* name);
23 virtual void SetFileName(const char *name);
26 // If this flag is set and the DICOM reader encounters a dicom file with
27 // lookup table the data will be kept as unsigned chars and a lookuptable
28 // will be exported and accessible through GetLookupTable()
29 vtkSetMacro(AllowLookupTable,int);
30 vtkGetMacro(AllowLookupTable,int);
31 vtkBooleanMacro(AllowLookupTable,int);
33 vtkGetObjectMacro(LookupTable,vtkLookupTable);
39 virtual void ExecuteInformation();
40 virtual void ExecuteData(vtkDataObject *output);
41 virtual void BuildFileListFromPattern();
42 virtual int CheckFileCoherence();
45 void RemoveAllInternalFileName(void);
46 void AddInternalFileName(const char* name);
49 size_t LoadImageInMemory(std::string FileName, unsigned char * Dest,
50 const unsigned long UpdateProgressTarget,
51 unsigned long & UpdateProgressCount);
55 vtkLookupTable *LookupTable;
56 vtkTimeStamp fileTime;
60 // Number of columns of the image/volume to be loaded
62 // Number of lines of the image/volume to be loaded
64 // Total number of planes (or images) of the stack to be build.
65 int TotalNumberOfPlanes;
66 // Number of scalar components of the image to be loaded (1=monochrome 3=rgb)
68 // Type of the image[s]: 8/16/32 bits, signed/unsigned:
69 std::string ImageType;
70 // Pixel size (in number of bytes):
72 // List of filenames to be read in order to build a stack of images
73 // or volume. The order in the list shall be the order of the images.
74 std::list<std::string> FileNameList;
76 // List of filenames created in ExecuteInformation and used in
78 // If FileNameList isn't empty, InternalFileNameList is a copy of
80 // Otherwise, InternalFileNameList correspond to the list of
82 std::list<std::string> InternalFileNameList;
86 //-----------------------------------------------------------------------------