]> Creatis software - creaImageIO.git/blob - src/creaImageIODicomImageReader.h
1b9d8927895ae9e2ba884bc637c7a04d69366676
[creaImageIO.git] / src / creaImageIODicomImageReader.h
1 #ifndef __creaImageIODicomImageReader_h_INCLUDED__
2 #define __creaImageIODicomImageReader_h_INCLUDED__
3
4
5 #include <creaImageIOAbstractImageReader.h>
6 #include <gdcmFile.h> 
7 // forward decl
8 class vtkGdcmReader;
9
10 namespace creaImageIO
11 {
12
13
14   /**
15    * \ingroup IO
16    */
17   
18   //=====================================================================
19   /// Concrete image reader for DICOM images 
20   class DicomImageReader : virtual public AbstractImageReader
21   {
22   public:
23     DicomImageReader();
24     virtual ~DicomImageReader();
25
26         /// Add file extensions read by the reader
27     virtual void PushBackExtensions(std::vector<std::string>&);
28         /// Test if file is read by this reader
29     virtual bool CanRead(const std::string& filename);
30         /// return for a file a 2D VTkImage
31     virtual vtkImageData* ReadImage(const std::string& filename);
32         /// Read the attributes for a file
33     virtual void ReadAttributes(const std::string& filename, 
34                                 tree::AttributeMapType& attr);
35
36         void getAttributes(const std::string filename,
37                 std::map <std::string , std::string> &infos, std::vector<std::string> i_attr);
38
39   private:
40     vtkGdcmReader* mReader;
41         struct deleter
42         {
43                 
44         };
45         friend struct deleter;
46   };
47   //=====================================================================
48
49
50
51 } // namespace creaImageIO
52
53
54
55 #endif // #ifndef __creaImageIODicomImageReader_h_INCLUDED__