1 /*=========================================================================
4 Module: $RCSfile: vtkGdcmReader.h,v $
6 Date: $Date: 2004/12/09 10:59:59 $
7 Version: $Revision: 1.20 $
9 Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
10 l'Image). All rights reserved. See Doc/License.txt or
11 http://www.creatis.insa-lyon.fr/Public/Gdcm/License.html for details.
13 This software is distributed WITHOUT ANY WARRANTY; without even
14 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 PURPOSE. See the above copyright notices for more information.
17 =========================================================================*/
19 #ifndef __vtkGdcmReader_h
20 #define __vtkGdcmReader_h
22 #include "gdcmCommon.h" // To avoid warnings concerning the std
24 #include <vtkImageReader.h>
28 //-----------------------------------------------------------------------------
31 //-----------------------------------------------------------------------------
32 class VTK_EXPORT vtkGdcmReader : public vtkImageReader
35 static vtkGdcmReader *New();
36 vtkTypeRevisionMacro(vtkGdcmReader, vtkImageReader);
37 void PrintSelf(ostream& os, vtkIndent indent);
39 virtual void RemoveAllFileName(void);
40 virtual void AddFileName(const char* name);
41 virtual void SetFileName(const char *name);
44 // If this flag is set and the DICOM reader encounters a dicom file with
45 // lookup table the data will be kept as unsigned chars and a lookuptable
46 // will be exported and accessible through GetLookupTable()
47 vtkSetMacro(AllowLookupTable,int);
48 vtkGetMacro(AllowLookupTable,int);
49 vtkBooleanMacro(AllowLookupTable,int);
51 vtkGetObjectMacro(LookupTable,vtkLookupTable);
57 virtual void ExecuteInformation();
58 virtual void ExecuteData(vtkDataObject *output);
59 virtual void BuildFileListFromPattern();
60 virtual int CheckFileCoherence();
63 void RemoveAllInternalFileName(void);
64 void AddInternalFileName(const char* name);
67 size_t LoadImageInMemory(std::string FileName, unsigned char * Dest,
68 const unsigned long UpdateProgressTarget,
69 unsigned long & UpdateProgressCount);
73 vtkLookupTable *LookupTable;
74 vtkTimeStamp fileTime;
78 // Number of columns of the image/volume to be loaded
80 // Number of lines of the image/volume to be loaded
82 // Total number of planes (or images) of the stack to be build.
83 int TotalNumberOfPlanes;
84 // Number of scalar components of the image to be loaded (1=monochrome 3=rgb)
86 // Type of the image[s]: 8/16/32 bits, signed/unsigned:
87 std::string ImageType;
88 // Pixel size (in number of bytes):
90 // List of filenames to be read in order to build a stack of images
91 // or volume. The order in the list shall be the order of the images.
92 std::list<std::string> FileNameList;
94 // List of filenames created in ExecuteInformation and used in
96 // If FileNameList isn't empty, InternalFileNameList is a copy of
98 // Otherwise, InternalFileNameList correspond to the list of
100 std::list<std::string> InternalFileNameList;
104 //-----------------------------------------------------------------------------