1 #ifndef __creaImageIODicomImageReader_h_INCLUDED__
2 #define __creaImageIODicomImageReader_h_INCLUDED__
5 #include <creaImageIOAbstractImageReader.h>
7 #include <gdcmReader.h>
8 #include <vtkGDCMImageReader.h>
9 #include <gdcmScanner.h>
10 #include <gdcmAttribute.h>
13 class vtkGDCMImageReader;
23 //=====================================================================
24 /// Concrete image reader for DICOM images
25 class DicomImageReader : virtual public AbstractImageReader
29 virtual ~DicomImageReader();
31 /// Add file extensions read by the reader
32 virtual void PushBackExtensions(std::vector<std::string>&);
33 /// Test if file is read by this reader
34 virtual bool CanRead(const std::string& filename);
35 /// return for a file a 2D VTkImage
36 virtual vtkImageData* ReadImage(const std::string& filename);
37 /// Read the attributes for a file
38 virtual void ReadAttributes(const std::string& filename,
39 tree::AttributeMapType& attr);
40 void ReadAttributes2(const std::string& filename,
41 tree::AttributeMapType& attr);
43 /// Another function to read attributes for a file
44 void getAttributes(const std::string filename, std::map <std::string , std::string> &infos, std::vector<std::string> i_attr);
46 const std::string GetStringValueFromTag( const gdcm::DataElement& ds);
47 vtkGDCMImageReader *mReader;
52 void operator()(gdcm::File* p)
57 friend struct deleter;
59 //=====================================================================
63 } // namespace creaImageIO
67 #endif // #ifndef __creaImageIODicomImageReader_h_INCLUDED__