]> Creatis software - gdcm.git/blob - vtk/vtkGdcmReader.h
* vtk/vtkGdcmReader.[cxx|h] : bug fix when loading only one file.
[gdcm.git] / vtk / vtkGdcmReader.h
1 // $Header: /cvs/public/gdcm/vtk/vtkGdcmReader.h,v 1.8 2003/07/07 09:10:33 regrain Exp $
2
3 #ifndef __vtkGdcmReader_h
4 #define __vtkGdcmReader_h
5
6 #include <list>
7 #include <string>
8 #include "vtkImageReader.h"
9
10 class VTK_EXPORT vtkGdcmReader : public vtkImageReader
11 {
12 public:
13   static vtkGdcmReader *New() {return new vtkGdcmReader;};
14   vtkTypeMacro(vtkGdcmReader, vtkImageReader);
15   void PrintSelf(ostream& os, vtkIndent indent);
16
17   void RemoveAllFileName(void);
18   void AddFileName(const char* name);
19   void SetFileName(const char *name);
20
21 protected:
22   vtkGdcmReader();
23   ~vtkGdcmReader();
24   virtual void ExecuteInformation();
25   void ExecuteData(vtkDataObject *output);
26   void BuildFileListFromPattern();
27   int CheckFileCoherence();
28
29 private:
30   void RemoveAllInternalFileName(void);
31   void AddInternalFileName(const char* name);
32
33   //BTX
34   // Number of columns of the image/volume to be loaded
35   int NumColumns;
36   // Number of lines of the image/volume to be loaded
37   int NumLines;
38   // Total number of planes (or images) of the stack to be build.
39   int TotalNumberOfPlanes;
40   // Type of the image[s]: 8/16/32 bits, signed/unsigned:
41   std::string ImageType;
42   // Pixel size (in number of bytes):
43   size_t PixelSize;
44   // List of filenames to be read in order to build a stack of images
45   // or volume. The order in the list shall be the order of the images.
46   std::list<std::string> FileNameList;
47   std::list<std::string> InternalFileNameList;
48
49   size_t LoadImageInMemory(std::string FileName, unsigned char * Dest,
50                            const unsigned long UpdateProgressTarget,
51                            unsigned long & UpdateProgressCount);
52   //ETX
53 };
54 #endif
55