DGtal  0.6.devel
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ImageLinearCellEmbedder.h
1 
17 #pragma once
18 
31 #if defined(ImageLinearCellEmbedder_RECURSES)
32 #error Recursive header files inclusion detected in ImageLinearCellEmbedder.h
33 #else // defined(ImageLinearCellEmbedder_RECURSES)
34 
35 #define ImageLinearCellEmbedder_RECURSES
36 
37 #if !defined ImageLinearCellEmbedder_h
38 
39 #define ImageLinearCellEmbedder_h
40 
42 // Inclusions
43 #include <iostream>
44 #include "DGtal/base/Common.h"
45 #include "DGtal/kernel/NumberTraits.h"
46 #include "DGtal/images/CImage.h"
48 
49 namespace DGtal
50 {
51 
53 
65  template < typename TKSpace,
66  typename TImage,
67  typename TEmbedder >
69  {
71 
72  public:
73  typedef TKSpace KSpace;
74  typedef TImage Image;
75  typedef TEmbedder Embedder;
76  typedef typename KSpace::Cell Cell;
77  typedef typename KSpace::SCell SCell;
78  typedef typename KSpace::Space Space;
79  typedef typename Space::Point Point;
80  typedef typename Space::RealPoint RealPoint;
81  typedef typename Space::RealVector RealVector;
82  typedef typename Space::Integer Integer;
83  typedef typename Image::Value ImageValue;
84  typedef Cell Argument;
85  typedef RealPoint Value;
86 
91 
96 
102 
109  operator= ( const ImageLinearCellEmbedder & other );
110 
120  void init( const KSpace & K, const Image & f,
121  const Embedder & e, ImageValue iso_value );
122 
123  // ----------------------- Interface --------------------------------------
124  public:
125 
133  RealPoint embed( const Point & p ) const;
134 
142  RealPoint embedCell( const Cell & cell ) const;
143 
152  RealPoint embedSCell( const SCell & scell ) const;
153 
161  RealPoint operator()( const Cell & cell ) const;
162 
163 
164  // ----------------------- Interface --------------------------------------
165  public:
166 
171  void selfDisplay ( std::ostream & out ) const;
172 
177  bool isValid() const;
178 
179  // ------------------------- Protected Datas ------------------------------
180  private:
181  // ------------------------- Private Datas --------------------------------
182  private:
183 
185  const KSpace* myPtrK;
192 
193  // ------------------------- Hidden services ------------------------------
194  protected:
195 
196  private:
197 
198  }; // end of class ImageLinearCellEmbedder
199 
200 
207  template < typename TKSpace, typename TImage, typename TEmbedder >
208  std::ostream&
209  operator<< ( std::ostream & out,
211 
212 } // namespace DGtal
213 
214 
216 // Includes inline functions.
217 #include "DGtal/images/ImageLinearCellEmbedder.ih"
218 
219 // //
221 
222 #endif // !defined ImageLinearCellEmbedder_h
223 
224 #undef ImageLinearCellEmbedder_RECURSES
225 #endif // else defined(ImageLinearCellEmbedder_RECURSES)