00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef __vtkGdcmReader_h
00020 #define __vtkGdcmReader_h
00021
00022 #include "gdcmCommon.h"
00023
00024 #include <vtkImageReader.h>
00025 #include <list>
00026 #include <string>
00027
00028
00029 class vtkLookupTable;
00030
00031
00032 class VTK_EXPORT vtkGdcmReader : public vtkImageReader
00033 {
00034 public:
00035 static vtkGdcmReader *New();
00036 vtkTypeRevisionMacro(vtkGdcmReader, vtkImageReader);
00037 void PrintSelf(ostream& os, vtkIndent indent);
00038
00039 virtual void RemoveAllFileName(void);
00040 virtual void AddFileName(const char* name);
00041 virtual void SetFileName(const char *name);
00042
00043
00044
00045
00046
00047 vtkSetMacro(AllowLookupTable,int);
00048 vtkGetMacro(AllowLookupTable,int);
00049 vtkBooleanMacro(AllowLookupTable,int);
00050
00051 vtkGetObjectMacro(LookupTable,vtkLookupTable);
00052
00053 protected:
00054 vtkGdcmReader();
00055 ~vtkGdcmReader();
00056
00057 virtual void ExecuteInformation();
00058 virtual void ExecuteData(vtkDataObject *output);
00059 virtual void BuildFileListFromPattern();
00060 virtual int CheckFileCoherence();
00061
00062 private:
00063 void RemoveAllInternalFileName(void);
00064 void AddInternalFileName(const char* name);
00065
00066
00067 size_t LoadImageInMemory(std::string FileName, unsigned char * Dest,
00068 const unsigned long UpdateProgressTarget,
00069 unsigned long & UpdateProgressCount);
00070
00071
00072
00073 vtkLookupTable *LookupTable;
00074 vtkTimeStamp fileTime;
00075 int AllowLookupTable;
00076
00077
00078
00079 int NumColumns;
00080
00081 int NumLines;
00082
00083 int TotalNumberOfPlanes;
00084
00085 int NumComponents;
00086
00087 std::string ImageType;
00088
00089 size_t PixelSize;
00090
00091
00092 std::list<std::string> FileNameList;
00093
00094
00095
00096
00097
00098
00099
00100 std::list<std::string> InternalFileNameList;
00101
00102 };
00103
00104
00105 #endif
00106