2 //-----------------------------------------------------------------------------
3 #ifndef __vtkGdcmReader_h
4 #define __vtkGdcmReader_h
6 #include "gdcmCommon.h" // To avoid warnings concerning the std
8 #include <vtkImageReader.h>
12 //-----------------------------------------------------------------------------
15 //-----------------------------------------------------------------------------
16 class VTK_EXPORT vtkGdcmReader : public vtkImageReader
19 static vtkGdcmReader *New();
20 vtkTypeRevisionMacro(vtkGdcmReader, vtkImageReader);
21 void PrintSelf(ostream& os, vtkIndent indent);
23 virtual void RemoveAllFileName(void);
24 virtual void AddFileName(const char* name);
25 virtual void SetFileName(const char *name);
28 // If this flag is set and the DICOM reader encounters a dicom file with
29 // lookup table the data will be kept as unsigned chars and a lookuptable
30 // will be exported and accessible through GetLookupTable()
31 vtkSetMacro(AllowLookupTable,int);
32 vtkGetMacro(AllowLookupTable,int);
33 vtkBooleanMacro(AllowLookupTable,int);
35 vtkGetObjectMacro(LookupTable,vtkLookupTable);
41 virtual void ExecuteInformation();
42 virtual void ExecuteData(vtkDataObject *output);
43 virtual void BuildFileListFromPattern();
44 virtual int CheckFileCoherence();
47 void RemoveAllInternalFileName(void);
48 void AddInternalFileName(const char* name);
51 size_t LoadImageInMemory(std::string FileName, unsigned char * Dest,
52 const unsigned long UpdateProgressTarget,
53 unsigned long & UpdateProgressCount);
57 vtkLookupTable *LookupTable;
58 vtkTimeStamp fileTime;
62 // Number of columns of the image/volume to be loaded
64 // Number of lines of the image/volume to be loaded
66 // Total number of planes (or images) of the stack to be build.
67 int TotalNumberOfPlanes;
68 // Number of scalar components of the image to be loaded (1=monochrome 3=rgb)
70 // Type of the image[s]: 8/16/32 bits, signed/unsigned:
71 std::string ImageType;
72 // Pixel size (in number of bytes):
74 // List of filenames to be read in order to build a stack of images
75 // or volume. The order in the list shall be the order of the images.
76 std::list<std::string> FileNameList;
78 // List of filenames created in ExecuteInformation and used in
80 // If FileNameList isn't empty, InternalFileNameList is a copy of
82 // Otherwise, InternalFileNameList correspond to the list of
84 std::list<std::string> InternalFileNameList;
88 //-----------------------------------------------------------------------------