DGtal  1.3.beta
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/base/ConstAlias.h"
46 #include "DGtal/kernel/NumberTraits.h"
47 #include "DGtal/images/CImage.h"
49 
50 namespace DGtal
51 {
52 
54 
66  template < typename TKSpace,
67  typename TImage,
68  typename TEmbedder >
70  {
72 
73  public:
74  typedef TKSpace KSpace;
75  typedef TImage Image;
76  typedef TEmbedder Embedder;
77  typedef typename KSpace::Cell Cell;
78  typedef typename KSpace::SCell SCell;
79  typedef typename KSpace::Space Space;
80  typedef typename Space::Point Point;
81  typedef typename Space::RealPoint RealPoint;
82  typedef typename Space::RealVector RealVector;
83  typedef typename Space::Integer Integer;
84  typedef typename Image::Value ImageValue;
85  typedef Cell Argument;
86  typedef RealPoint Value;
87 
92 
97 
103 
110  operator= ( const ImageLinearCellEmbedder & other );
111 
122  ConstAlias<Embedder> e, double iso_value );
123 
124  // ----------------------- Interface --------------------------------------
125  public:
126 
134  RealPoint embed( const Point & p ) const;
135 
143  RealPoint embedCell( const Cell & cell ) const;
144 
153  RealPoint embedSCell( const SCell & scell ) const;
154 
162  RealPoint operator()( const Cell & cell ) const;
163 
164 
165  // ----------------------- Interface --------------------------------------
166  public:
167 
172  void selfDisplay ( std::ostream & out ) const;
173 
178  bool isValid() const;
179 
180  // ------------------------- Protected Datas ------------------------------
181  private:
182  // ------------------------- Private Datas --------------------------------
183  private:
184 
186  const KSpace* myPtrK;
192  double myIsoValue;
193 
194  // ------------------------- Hidden services ------------------------------
195  protected:
196 
197  private:
198 
199  }; // end of class ImageLinearCellEmbedder
200 
201 
208  template < typename TKSpace, typename TImage, typename TEmbedder >
209  std::ostream&
210  operator<< ( std::ostream & out,
212 
213 } // namespace DGtal
214 
215 
217 // Includes inline functions.
218 #include "DGtal/images/ImageLinearCellEmbedder.ih"
219 
220 // //
222 
223 #endif // !defined ImageLinearCellEmbedder_h
224 
225 #undef ImageLinearCellEmbedder_RECURSES
226 #endif // else defined(ImageLinearCellEmbedder_RECURSES)
DGtal::ImageLinearCellEmbedder::embed
RealPoint embed(const Point &p) const
DGtal::ImageLinearCellEmbedder::ImageValue
Image::Value ImageValue
Definition: ImageLinearCellEmbedder.h:84
DGtal::ImageLinearCellEmbedder::operator()
RealPoint operator()(const Cell &cell) const
DGtal::ConstAlias
Aim: This class encapsulates its parameter class so that to indicate to the user that the object/poin...
Definition: ConstAlias.h:186
DGtal::ImageLinearCellEmbedder::operator=
ImageLinearCellEmbedder & operator=(const ImageLinearCellEmbedder &other)
DGtal::ImageContainerBySTLVector< Domain, Value >::Value
Value Value
Definition: ImageContainerBySTLVector.h:153
DGtal::ImageLinearCellEmbedder::Integer
Space::Integer Integer
Definition: ImageLinearCellEmbedder.h:83
K
KSpace K
Definition: testCubicalComplex.cpp:62
DGtal::ImageLinearCellEmbedder::Image
TImage Image
Definition: ImageLinearCellEmbedder.h:75
DGtal::SignedKhalimskyCell
Represents a signed cell in a cellular grid space by its Khalimsky coordinates and a boolean value.
Definition: KhalimskySpaceND.h:208
DGtal::operator<<
std::ostream & operator<<(std::ostream &out, const ATu0v1< TKSpace, TLinearAlgebra > &object)
DGtal::ImageLinearCellEmbedder::~ImageLinearCellEmbedder
~ImageLinearCellEmbedder()
DGtal::SpaceND
Definition: SpaceND.h:95
DGtal::ImageLinearCellEmbedder::isValid
bool isValid() const
DGtal::ImageLinearCellEmbedder::Embedder
TEmbedder Embedder
Definition: ImageLinearCellEmbedder.h:76
DGtal::ImageLinearCellEmbedder::init
void init(ConstAlias< KSpace > K, ConstAlias< Image > f, ConstAlias< Embedder > e, double iso_value)
DGtal::ImageLinearCellEmbedder::myPtrK
const KSpace * myPtrK
A pointer on the cellular grid space.
Definition: ImageLinearCellEmbedder.h:186
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
DGtal::ImageLinearCellEmbedder::Point
Space::Point Point
Definition: ImageLinearCellEmbedder.h:80
DGtal::ImageLinearCellEmbedder::Value
RealPoint Value
Definition: ImageLinearCellEmbedder.h:86
DGtal::ImageLinearCellEmbedder::ImageLinearCellEmbedder
ImageLinearCellEmbedder()
DGtal::ImageLinearCellEmbedder::embedSCell
RealPoint embedSCell(const SCell &scell) const
DGtal::ImageLinearCellEmbedder::Space
KSpace::Space Space
Definition: ImageLinearCellEmbedder.h:79
DGtal::ImageLinearCellEmbedder::embedCell
RealPoint embedCell(const Cell &cell) const
DGtal::ImageLinearCellEmbedder::myPtrEmbedder
const Embedder * myPtrEmbedder
A pointer on the digital embedder.
Definition: ImageLinearCellEmbedder.h:190
DGtal::ImageLinearCellEmbedder::RealVector
Space::RealVector RealVector
Definition: ImageLinearCellEmbedder.h:82
DGtal::ImageLinearCellEmbedder::BOOST_CONCEPT_ASSERT
BOOST_CONCEPT_ASSERT((concepts::CImage< TImage >))
DGtal::PointVector< dim, Integer >
DGtal::ImageLinearCellEmbedder::Argument
Cell Argument
Definition: ImageLinearCellEmbedder.h:85
DGtal::ImageLinearCellEmbedder::RealPoint
Space::RealPoint RealPoint
Definition: ImageLinearCellEmbedder.h:81
DGtal::ImageLinearCellEmbedder::Cell
KSpace::Cell Cell
Definition: ImageLinearCellEmbedder.h:77
DGtal::ImageLinearCellEmbedder
Aim: a cellular embedder for images. (default constructible, copy constructible, assignable)....
Definition: ImageLinearCellEmbedder.h:69
DGtal::ImageLinearCellEmbedder::myPtrImage
const Image * myPtrImage
A pointer on the image.
Definition: ImageLinearCellEmbedder.h:188
DGtal::ImageLinearCellEmbedder::SCell
KSpace::SCell SCell
Definition: ImageLinearCellEmbedder.h:78
DGtal::ImageLinearCellEmbedder::selfDisplay
void selfDisplay(std::ostream &out) const
DGtal::SpaceND::Integer
TInteger Integer
Arithmetic ring induced by (+,-,*) and Integer numbers.
Definition: SpaceND.h:102
DGtal::ImageLinearCellEmbedder::KSpace
TKSpace KSpace
Definition: ImageLinearCellEmbedder.h:74
DGtal::ImageLinearCellEmbedder::myIsoValue
double myIsoValue
The threshold value for the linear embedding.
Definition: ImageLinearCellEmbedder.h:192
DGtal::KhalimskyCell< dim, Integer >
DGtal::concepts::CImage
Aim: Defines the concept describing a read/write image, having an output iterator.
Definition: CImage.h:102