DGtal  0.9.2
DicomReader.h
1 
17 #pragma once
18 
31 #if defined(DicomReader_RECURSES)
32 #error Recursive header files inclusion detected in DicomReader.h
33 #else
34 
35 #define DicomReader_RECURSES
36 
37 #if !defined DicomReader_h
38 
39 #define DicomReader_h
40 
42 // Inclusions
43 #include <iostream>
44 #include "DGtal/base/Common.h"
45 #include "DGtal/base/CUnaryFunctor.h"
46 #include "DGtal/images/CImage.h"
47 
49 
50 #ifdef _MSC_VER
51 #pragma warning(disable : 4290)
52 #endif
53 
54 namespace DGtal
55 {
56 
58 // class DicomReader
88  template <typename TImageContainer,
89  typename TFunctor = functors::Cast< typename TImageContainer::Value > >
90  struct DicomReader
91  {
92  // ----------------------- Standard services ------------------------------
93  public:
94 
95  typedef TImageContainer ImageContainer;
96  typedef typename TImageContainer::Value Value;
97  typedef TFunctor Functor;
98  typedef int32_t PixelType;
99 
102  BOOST_STATIC_ASSERT(( TImageContainer::Domain::dimension == 3 ));
103 
115  static ImageContainer importDicom(const std::string & aFilename,
116  const Functor & aFunctor = Functor()) throw(DGtal::IOException);
117 
118  }; // end of class DicomReader
119 
120 
121 
122 } // namespace DGtal
123 
124 
126 // Includes inline functions.
127 #include "DGtal/io/readers/DicomReader.ih"
128 
129 
130 // //
132 
133 #endif // !defined DicomReader_h
134 
135 #undef DicomReader_RECURSES
136 #endif // else defined(DicomReader_RECURSES)
Aim: Import a 3D DICOM image from file series.
Definition: DicomReader.h:90
static ImageContainer importDicom(const std::string &aFilename, const Functor &aFunctor=Functor())
Aim: Defines a unary functor, which associates arguments to results.
Definition: CUnaryFunctor.h:89
BOOST_STATIC_ASSERT((TImageContainer::Domain::dimension==3))
TImageContainer ImageContainer
Definition: DicomReader.h:95
DGtal is the top-level namespace which contains all DGtal functions and types.
TImageContainer::Value Value
Definition: DicomReader.h:96
boost::int32_t int32_t
signed 32-bit integer.
Definition: BasicTypes.h:72
Aim: Defines the concept describing a read/write image, having an output iterator.
Definition: CImage.h:102
BOOST_CONCEPT_ASSERT((concepts::CImage< ImageContainer >))