DGtal  0.9.2
MagickReader.h
1 
17 #pragma once
18 
31 #if defined(MagickReader_RECURSES)
32 #error Recursive header files inclusion detected in MagickReader.h
33 #else // defined(MagickReader_RECURSES)
34 
35 #define MagickReader_RECURSES
36 
37 #if !defined MagickReader_h
38 
39 #define MagickReader_h
40 
42 // Inclusions
43 #include <iostream>
44 #include <string>
45 #include <cstdio>
46 #include <Magick++.h>
47 #include "DGtal/base/CUnaryFunctor.h"
48 #include "DGtal/base/Common.h"
50 
51 namespace DGtal
52 {
53 
55  // template class MagickReader
64  template <typename TImageContainer, typename TFunctor= functors::Cast< typename TImageContainer::Value > >
65  struct MagickReader
66  {
67  // ----------------------- Standard services ------------------------------
68  public:
69 
70  typedef TImageContainer ImageContainer;
71  typedef typename TImageContainer::Domain::Vector Vector;
72  typedef typename TImageContainer::Value Value;
73  typedef TFunctor Functor ;
74 
75  BOOST_STATIC_ASSERT( (ImageContainer::Domain::dimension == 2));
76 
88  static ImageContainer importImage(const std::string & filename,
89  const Functor & aFunctor = Functor(),
90  bool topbotomOrder = true) throw(DGtal::IOException);
91 
92  }; // end of class MagickReader
93 
94 
95 } // namespace DGtal
96 
97 
99 // Includes inline functions.
100 #include "DGtal/io/readers/MagickReader.ih"
101 
102 // //
104 
105 #endif // !defined MagickReader_h
106 
107 #undef MagickReader_RECURSES
108 #endif // else defined(MagickReader_RECURSES)
BOOST_STATIC_ASSERT((ImageContainer::Domain::dimension==2))
Aim: implements methods to read a 2D image using the ImageMagick library.
Definition: MagickReader.h:65
static ImageContainer importImage(const std::string &filename, const Functor &aFunctor=Functor(), bool topbotomOrder=true)
DGtal is the top-level namespace which contains all DGtal functions and types.
TImageContainer::Domain::Vector Vector
Definition: MagickReader.h:71
TImageContainer ImageContainer
Definition: MagickReader.h:70
TImageContainer::Value Value
Definition: MagickReader.h:72