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>
12 class vtkGDCMImageReader;
22 //=====================================================================
23 /// Concrete image reader for DICOM images
24 class DicomImageReader : virtual public AbstractImageReader
28 virtual ~DicomImageReader();
30 /// Add file extensions read by the reader
31 virtual void PushBackExtensions(std::vector<std::string>&);
32 /// Test if file is read by this reader
33 virtual bool CanRead(const std::string& filename);
34 /// return for a file a 2D VTkImage
35 virtual vtkImageData* ReadImage(const std::string& filename);
36 /// Read the attributes for a file
37 virtual void ReadAttributes(const std::string& filename,
38 tree::AttributeMapType& attr);
39 void ReadAttributes2(const std::string& filename,
40 tree::AttributeMapType& attr);
42 /// Another function to read attributes for a file
43 void getAttributes(const std::string filename, std::map <std::string , std::string> &infos, std::vector<std::string> i_attr);
45 const std::string GetStringValueFromTag( const gdcm::DataElement& ds);
46 vtkGDCMImageReader *mReader;
51 void operator()(gdcm::File* p)
56 friend struct deleter;
58 //=====================================================================
62 } // namespace creaImageIO
66 #endif // #ifndef __creaImageIODicomImageReader_h_INCLUDED__