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