]> Creatis software - gdcm.git/blob - vtk/vtkGdcmReader.h
*ENH: vtkGdcmReader now supports LUT ! (vtkgdcmViewer for now is not able to use...
[gdcm.git] / vtk / vtkGdcmReader.h
1 // $Header: /cvs/public/gdcm/vtk/vtkGdcmReader.h,v 1.11 2003/11/05 18:15:41 malaterre Exp $
2
3 #ifndef __vtkGdcmReader_h
4 #define __vtkGdcmReader_h
5
6 #include <list>
7 #include <string>
8 #include "vtkImageReader.h"
9 class vtkLookupTable;
10
11 class VTK_EXPORT vtkGdcmReader : public vtkImageReader
12 {
13 public:
14   static vtkGdcmReader *New() {return new vtkGdcmReader;};
15   vtkTypeMacro(vtkGdcmReader, vtkImageReader);
16   void PrintSelf(ostream& os, vtkIndent indent);
17
18   void RemoveAllFileName(void);
19   void AddFileName(const char* name);
20   void SetFileName(const char *name);
21   vtkGetObjectMacro(LookupTable,vtkLookupTable);
22
23 protected:
24   vtkGdcmReader();
25   ~vtkGdcmReader();
26   virtual void ExecuteInformation();
27   void ExecuteData(vtkDataObject *output);
28   void BuildFileListFromPattern();
29   int CheckFileCoherence();
30
31 private:
32   void RemoveAllInternalFileName(void);
33   void AddInternalFileName(const char* name);
34   vtkLookupTable *LookupTable;
35
36   //BTX
37   // Number of columns of the image/volume to be loaded
38   int NumColumns;
39   // Number of lines of the image/volume to be loaded
40   int NumLines;
41   // Total number of planes (or images) of the stack to be build.
42   int TotalNumberOfPlanes;
43   // Number of scalar components of the image to be loaded (1=monochrome 3=rgb)
44   int NumComponents;
45   // Type of the image[s]: 8/16/32 bits, signed/unsigned:
46   std::string ImageType;
47   // Pixel size (in number of bytes):
48   size_t PixelSize;
49   // List of filenames to be read in order to build a stack of images
50   // or volume. The order in the list shall be the order of the images.
51   std::list<std::string> FileNameList;
52
53   // List of filenames created in ExecuteInformation and used in
54   // ExecuteData.
55   // If FileNameList isn't empty, InternalFileNameList is a copy of
56   //    FileNameList
57   // Otherwise, InternalFileNameList correspond to the list of 
58   //    files patterned
59   std::list<std::string> InternalFileNameList;
60
61   size_t LoadImageInMemory(std::string FileName, unsigned char * Dest,
62                            const unsigned long UpdateProgressTarget,
63                            unsigned long & UpdateProgressCount);
64   //ETX
65 };
66 #endif
67