DGtal  1.5.beta
Board3DTo2DFactory.h
1 
17 #pragma once
18 
31 #if defined(Board3DTo2DFactory_RECURSES)
32 #error Recursive header files inclusion detected in Board3DTo2DFactory.h
33 #else // defined(Board3DTo2DFactory_RECURSES)
35 #define Board3DTo2DFactory_RECURSES
36 
37 #if !defined Board3DTo2DFactory_h
39 #define Board3DTo2DFactory_h
40 
42 // Inclusions
43 
44 #include "DGtal/helpers/StdDefs.h"
45 #include "DGtal/base/Common.h"
46 
47 #include "DGtal/io/Display3DFactory.h"
48 #include "DGtal/io/boards/DrawWithBoard3DTo2DModifier.h"
49 #include "DGtal/geometry/curves/StandardDSS6Computer.h"
50 #include "DGtal/geometry/curves/Naive3DDSSComputer.h"
51 #include "DGtal/kernel/sets/DigitalSetBySTLSet.h"
52 #include "DGtal/kernel/sets/DigitalSetByAssociativeContainer.h"
53 #include "DGtal/kernel/sets/DigitalSetBySTLVector.h"
54 #include "DGtal/kernel/domains/HyperRectDomain.h"
55 #include "DGtal/topology/KhalimskySpaceND.h"
56 #include "DGtal/topology/Object.h"
57 #include "DGtal/kernel/PointVector.h"
58 #include "DGtal/geometry/curves/GridCurve.h"
59 #include "DGtal/shapes/Mesh.h"
60 #include "DGtal/geometry/tools/SphericalAccumulator.h"
61 #include "DGtal/io/colormaps/HueShadeColorMap.h"
62 #include "DGtal/io/colormaps/CColorMap.h"
63 #include "DGtal/images/ImageContainerBySTLVector.h"
64 #include "DGtal/images/ImageContainerBySTLMap.h"
65 #include "DGtal/images/ConstImageAdapter.h"
66 #include "DGtal/images/ImageAdapter.h"
67 
69 
70 namespace DGtal
71 {
73 // struct Board3DTo2DFactory
78  template <typename TSpace, typename TKSpace>
79  struct Board3DTo2DFactory : public Display3DFactory<TSpace,TKSpace>
80  {
81  typedef TSpace Space;
82  typedef TKSpace KSpace;
83 
89  static void
91 
97  static void
99 
105  static void
107 
113  static void
115 
116 
117  //----------------------------------------------------------------------------------------------
118  // heritage
119  // SphericalAccumulator
131  template <typename TVector>
132  static void
134  const typename DGtal::SphericalAccumulator<TVector>::RealVector & shift =
136  const double radius=1.0);
137  // SphericalAccumulator
138 
139  // Mesh
145  template <typename TPoint>
146  static void
148 
154  template <typename TPoint>
155  static void
157  // Mesh
158 
159 
160 
161  // StandardDSS6Computer
168  template <typename TIterator, typename TInteger, int connectivity>
171 
172  template <typename TIterator, typename TInteger, int connectivity>
178  static void
180 
186  template <typename TIterator, typename TInteger, int connectivity>
187  static void
189 
190  template <typename TIterator, typename TInteger, int connectivity>
196  static void
198  // StandardDSS6Computer
199 
200 
201  // Naive3DDSSComputer
208  template <typename TIterator, typename TInteger, int connectivity>
211 
212  template <typename TIterator, typename TInteger, int connectivity>
218  static void
220 
226  template <typename TIterator, typename TInteger, int connectivity>
227  static void
229 
230  template <typename TIterator, typename TInteger, int connectivity>
236  static void
238  // Naive3DDSSComputer
239 
240 
241  // DigitalSetBySTLSet
248  template<typename Domain, typename Compare>
251 
257  template<typename Domain, typename Compare>
258  static void
260 
266  template<typename Domain, typename Compare>
267  static void
269 
275  template<typename Domain, typename Compare>
276  static void
278 
284  template<typename Domain, typename Compare>
285  static void
287  // DigitalSetBySTLSet
288 
289  // DigitalSetByAssociativeContainer
296  template<typename Domain, typename Container>
299 
305  template<typename Domain, typename Container>
306  static void
308 
314  template<typename Domain, typename Container>
315  static void
317 
323  template<typename Domain, typename Container>
324  static void
326 
332  template<typename Domain, typename Container>
333  static void
335  // DigitalSetByAssociativeContainer
336 
337 
338  // DigitalSetBySTLVector
345  template<typename Domain>
347  defaultStyle( std::string str, const DGtal::DigitalSetBySTLVector<Domain> & aSet );
348 
354  template<typename Domain>
355  static void
357 
363  template<typename Domain>
364  static void
366 
372  template<typename Domain>
373  static void
375 
381  template<typename Domain>
382  static void
384  // DigitalSetBySTLVector
385 
386 
387  // HyperRectDomain
394  template<typename SpaceDom>
396  defaultStyle( std::string str, const DGtal::HyperRectDomain<SpaceDom> & aDomain );
397 
403  template<typename SpaceDom>
404  static void
406 
412  template<typename SpaceDom>
413  static void
415 
421  template<typename SpaceDom>
422  static void
424 
430  template<typename SpaceDom>
431  static void
433 
439  template<typename SpaceDom>
440  static void
442  // HyperRectDomain
443 
444 
445  // KhalimskyCell
453  defaultStyle( std::string str, const typename KSpace::Cell & aCell );
454 
460  static void
461  draw( Board3DTo2D<Space, KSpace> & board, const typename KSpace::Cell & aCell );
462  // KhalimskyCell
463 
464 
465  // Object
472  template <typename TDigitalTopology, typename TDigitalSet>
474  defaultStyle( std::string str, const DGtal::Object<TDigitalTopology, TDigitalSet> & anObject );
475 
481  template <typename TDigitalTopology, typename TDigitalSet>
482  static void
484 
490  template <typename TDigitalTopology, typename TDigitalSet>
491  static void
493  // Object
494 
495 
496  // PointVector
503  template<Dimension dim, typename TComponent, typename TContainer>
506 
512  template<Dimension dim, typename TComponent, typename TContainer>
513  static void
515 
521  template<Dimension dim, typename TComponent, typename TContainer>
522  static void
524 
530  template<Dimension dim, typename TComponent, typename TContainer>
531  static void
533 
539  template<Dimension dim, typename TComponent, typename TContainer>
540  static void
542 
549  template<Dimension dim, typename TComponent1, typename TComponent2, typename TContainer1, typename TContainer2>
550  static void
552  // PointVector
553 
554 
555  // SignedKhalimskyCell
563  defaultStyle( std::string str, const typename KSpace::SCell & aSCell );
564 
570  static void
571  draw( Board3DTo2D<Space, KSpace> & board, const typename KSpace::SCell & aSCell );
572  // SignedKhalimskyCell
573 
574  // GridCurve
580  static void
582  // GridCurve
583 
584  // SCellsRange
590  template < typename TIterator, typename TSCell>
591  static void
594  // SCellsRange
595 
596  // PointsRange
602  template <typename TIterator>
603  static void
605  const DGtal::ConstRangeAdapter<TIterator, functors::SCellToPoint<KSpace>, typename KSpace::Point> & aRangeAdapter );
606  // PointsRange
607 
608  // MidPointsRange
614  template <typename TIterator>
615  static void
617  const DGtal::ConstRangeAdapter<TIterator, CanonicSCellEmbedder<KSpace>, typename KSpace::Space::RealPoint> & aRangeAdapter );
618  // MidPointsRange
619 
620  // ArrowsRange
626  template <typename TIterator>
627  static void
629  const DGtal::ConstRangeAdapter<TIterator, functors::SCellToArrow<KSpace>, std::pair<typename KSpace::Point, typename KSpace::Vector > > & aRangeAdapter );
630  // ArrowsRange
631 
632  // InnerPointsRange
638  template <typename TIterator>
639  static void
641  const DGtal::ConstRangeAdapter<TIterator, functors::SCellToInnerPoint<KSpace>, typename KSpace::Point> & aRangeAdapter );
642  // InnerPointsRange
643 
644  // OuterPointsRange
650  template <typename TIterator>
651  static void
653  const DGtal::ConstRangeAdapter<TIterator, functors::SCellToOuterPoint<KSpace>, typename KSpace::Point> & aRangeAdapter );
654  // OuterPointsRange
655 
656  // IncidentPointsRange
662  template <typename TIterator>
663  static void
665  const DGtal::ConstRangeAdapter<TIterator, functors::SCellToIncidentPoints<KSpace>,std::pair<typename KSpace::Point, typename KSpace::Point > > & aRangeAdapter );
666  // IncidentPointsRange
667 
668 
674  static void
676 
682  static void
684 
690  static void
692 
698  static void
700 
706  static void
707  draw( Board3DTo2D<Space, KSpace> & board, const DGtal::TransformedPrism & aTransformedPrism);
708 
709  // end heritage
710  //----------------------------------------------------------------------------------------------
711 
712 }; // end of struct Board3DTo2DFactory
713 
714 } // namespace DGtal
715 
716 
718 // Includes inline functions/methods
719 #include "DGtal/io/boards/Board3DTo2DFactory.ih"
720 
721 
722 // //
724 
725 #endif // !defined Board3DTo2DFactory_h
726 
727 #undef Board3DTo2DFactory_RECURSES
728 #endif // else defined(Board3DTo2DFactory_RECURSES)
Class for PDF, PNG, PS, EPS, SVG export drawings with Cairo with 3D->2D projection.
Definition: Board3DTo2D.h:71
Aim: model of CConstBidirectionalRange that adapts any range of elements bounded by two iterators [it...
Aim: A wrapper class around a STL associative container for storing sets of digital points within som...
Aim: A container class for storing sets of digital points within some given domain.
Aim: Realizes the concept CDigitalSet by using the STL container std::vector.
Aim: describes, in a cellular space of dimension n, a closed or open sequence of signed d-cells (or d...
Definition: GridCurve.h:173
Aim: Parallelepidec region of a digital space, model of a 'CDomain'.
Aim: This class is defined to represent a surface mesh through a set of vertices and faces....
Definition: Mesh.h:92
Aim: Dynamic recognition of a 3d-digital straight segment (DSS)
Aim: An object (or digital object) represents a set in some digital space associated with a digital t...
Definition: Object.h:120
PointVector< dim, double > RealPoint
Definition: SpaceND.h:117
Aim: implements an accumulator (as histograms for 1D scalars) adapted to spherical point samples.
Aim: Dynamic recognition of a 3d-digital straight segment (DSS)
Aim: transforms a signed cell into an arrow, ie. a pair point-vector.
Aim: transforms a signed cell c into a pair of points corresponding to the signed cells of greater di...
Aim: transforms a signed cell c into a point corresponding to the signed cell of greater dimension th...
Aim: transforms a signed cell c into a point corresponding to the signed cell of greater dimension th...
Aim: transforms a scell into a point.
Z3i::SCell SCell
DGtal is the top-level namespace which contains all DGtal functions and types.
Factory for GPL Display3D:
static void drawWithAdjacencies(Board3DTo2D< Space, KSpace > &board, const DGtal::Object< TDigitalTopology, TDigitalSet > &anObject)
drawWithAdjacencies
static void draw(Board3DTo2D< Space, KSpace > &board, const DGtal::DigitalSetBySTLSet< Domain, Compare > &aSet)
draw
static DGtal::DrawableWithBoard3DTo2D * defaultStyle(std::string str, const DGtal::DigitalSetByAssociativeContainer< Domain, Container > &aSet)
static DGtal::DrawableWithBoard3DTo2D * defaultStyle(std::string str, const DGtal::Object< TDigitalTopology, TDigitalSet > &anObject)
defaultStyle
static DGtal::DrawableWithBoard3DTo2D * defaultStyle(std::string str, const DGtal::DigitalSetBySTLSet< Domain, Compare > &aSet)
static void drawAsPavingTransparent(Board3DTo2D< Space, KSpace > &board, const DGtal::DigitalSetBySTLSet< Domain, Compare > &aSet)
drawAsPavingTransparent
static void drawAsPaving(Board3DTo2D< Space, KSpace > &board, const DGtal::DigitalSetBySTLSet< Domain, Compare > &aSet)
drawAsPaving
static void draw(Board3DTo2D< Space, KSpace > &board, const DGtal::ConstRangeAdapter< TIterator, functors::SCellToIncidentPoints< KSpace >, std::pair< typename KSpace::Point, typename KSpace::Point > > &aRangeAdapter)
draw
static DGtal::DrawableWithBoard3DTo2D * defaultStyle(std::string str, const DGtal::HyperRectDomain< SpaceDom > &aDomain)
static void draw(Board3DTo2D< Space, KSpace > &board, const DGtal::GridCurve< KSpace > &aGrid)
draw
static void draw(Board3DTo2D< Space, KSpace > &board, const DGtal::CustomStyle3D &aStyle)
draw
static void draw(Board3DTo2D< Space, KSpace > &board, const DGtal::ConstRangeAdapter< TIterator, CanonicSCellEmbedder< KSpace >, typename KSpace::Space::RealPoint > &aRangeAdapter)
draw
static void drawAsPaving(Board3DTo2D< Space, KSpace > &board, const DGtal::PointVector< dim, TComponent, TContainer > &aPoint)
drawAsPaving
static void draw(Board3DTo2D< Space, KSpace > &board, const DGtal::Naive3DDSSComputer< TIterator, TInteger, connectivity > &arithm)
draw
static void draw(Board3DTo2D< Space, KSpace > &board, const DGtal::ClippingPlane &aClipping)
draw
static void drawAsPavingBalls(Board3DTo2D< Space, KSpace > &board, const DGtal::HyperRectDomain< SpaceDom > &aDomain)
drawAsPavingBalls
static void drawAsPavingTransparent(Board3DTo2D< Space, KSpace > &board, const DGtal::DigitalSetBySTLVector< Domain > &aSet)
drawAsPavingTransparent
static void draw(Board3DTo2D< Space, KSpace > &board, const DGtal::SphericalAccumulator< TVector > &accumulator, const typename DGtal::SphericalAccumulator< TVector >::RealVector &shift=typename DGtal::SphericalAccumulator< TVector >::RealVector(0, 0, 0), const double radius=1.0)
static void drawAsGrid(Board3DTo2D< Space, KSpace > &board, const DGtal::HyperRectDomain< SpaceDom > &aDomain)
drawAsGrid
static void draw(Board3DTo2D< Space, KSpace > &board, const ConstRangeAdapter< TIterator, DGtal::functors::Identity, TSCell > &aRangeAdapter)
draw
static void drawAsGrid(Board3DTo2D< Space, KSpace > &board, const DGtal::DigitalSetBySTLVector< Domain > &aSet)
drawAsGrid
static DGtal::DrawableWithBoard3DTo2D * defaultStyle(std::string str, const DGtal::Naive3DDSSComputer< TIterator, TInteger, connectivity > &arithm)
static void draw(Board3DTo2D< Space, KSpace > &board, const DGtal::ConstRangeAdapter< TIterator, functors::SCellToOuterPoint< KSpace >, typename KSpace::Point > &aRangeAdapter)
draw
static DGtal::DrawableWithBoard3DTo2D * defaultStyle(std::string str, const DGtal::StandardDSS6Computer< TIterator, TInteger, connectivity > &arithm)
static DGtal::DrawableWithBoard3DTo2D * defaultStyle(std::string str, const typename KSpace::SCell &aSCell)
static void draw(Board3DTo2D< Space, KSpace > &board, const DGtal::DigitalSetByAssociativeContainer< Domain, Container > &aSet)
draw
static void drawAsBalls(Board3DTo2D< Space, KSpace > &board, const DGtal::StandardDSS6Computer< TIterator, TInteger, connectivity > &arithm)
drawAsBalls
static void draw(Board3DTo2D< Space, KSpace > &board, const DGtal::Object< TDigitalTopology, TDigitalSet > &anObject)
draw
static void draw(Board3DTo2D< Space, KSpace > &board, const DGtal::Mesh< TPoint > &aMesh)
draw
static void draw(Board3DTo2D< Space, KSpace > &board, const DGtal::PointVector< dim, TComponent1, TContainer1 > &aPoint, const DGtal::PointVector< dim, TComponent2, TContainer2 > &aPoint2)
draw
static void draw(Board3DTo2D< Space, KSpace > &board, const DGtal::HyperRectDomain< SpaceDom > &aDomain)
draw
static void drawAsFaces(Board3DTo2D< Space, KSpace > &board, const DGtal::Mesh< TPoint > &aMesh)
drawAsFaces
static void draw(Board3DTo2D< Space, KSpace > &board, const DGtal::CameraPosition &aThing)
static void drawAsPavingTransparent(Board3DTo2D< Space, KSpace > &board, const DGtal::DigitalSetByAssociativeContainer< Domain, Container > &aSet)
drawAsPavingTransparent
static void draw(Board3DTo2D< Space, KSpace > &board, const DGtal::PointVector< dim, TComponent, TContainer > &aPoint)
draw
static void drawAsBoundingBox(Board3DTo2D< Space, KSpace > &board, const DGtal::Naive3DDSSComputer< TIterator, TInteger, connectivity > &arithm)
drawAsBoundingBox
static void drawAsPaving(Board3DTo2D< Space, KSpace > &board, const DGtal::HyperRectDomain< SpaceDom > &aDomain)
drawAsPaving
static void draw(Board3DTo2D< Space, KSpace > &board, const typename KSpace::SCell &aSCell)
draw
static void draw(Board3DTo2D< Space, KSpace > &board, const DGtal::StandardDSS6Computer< TIterator, TInteger, connectivity > &arithm)
draw
static void draw(Board3DTo2D< Space, KSpace > &board, const DGtal::ConstRangeAdapter< TIterator, functors::SCellToPoint< KSpace >, typename KSpace::Point > &aRangeAdapter)
draw
static void draw(Board3DTo2D< Space, KSpace > &board, const DGtal::CameraUpVector &aThing)
static void drawAsGrid(Board3DTo2D< Space, KSpace > &board, const DGtal::PointVector< dim, TComponent, TContainer > &aPoint)
drawAsGrid
static void draw(Board3DTo2D< Space, KSpace > &board, const DGtal::CustomColors3D &aColor)
draw
static void draw(Board3DTo2D< Space, KSpace > &board, const DGtal::CameraZNearFar &aThing)
static void draw(Board3DTo2D< Space, KSpace > &board, const DGtal::SetMode3D &aMode)
draw
static void draw(Board3DTo2D< Space, KSpace > &board, const DGtal::ConstRangeAdapter< TIterator, functors::SCellToArrow< KSpace >, std::pair< typename KSpace::Point, typename KSpace::Vector > > &aRangeAdapter)
draw
static void drawAsGrid(Board3DTo2D< Space, KSpace > &board, const DGtal::DigitalSetBySTLSet< Domain, Compare > &aSet)
drawAsGrid
static void draw(Board3DTo2D< Space, KSpace > &board, const typename KSpace::Cell &aCell)
draw
static DGtal::DrawableWithBoard3DTo2D * defaultStyle(std::string str, const typename KSpace::Cell &aCell)
static DGtal::DrawableWithBoard3DTo2D * defaultStyle(std::string str, const DGtal::PointVector< dim, TComponent, TContainer > &aPoint)
static void drawAsBoundingBox(Board3DTo2D< Space, KSpace > &board, const DGtal::StandardDSS6Computer< TIterator, TInteger, connectivity > &arithm)
drawAsBoundingBox
static void drawAsPaving(Board3DTo2D< Space, KSpace > &board, const DGtal::DigitalSetByAssociativeContainer< Domain, Container > &aSet)
drawAsPaving
static void draw(Board3DTo2D< Space, KSpace > &board, const DGtal::CameraDirection &aThing)
static void drawAsPavingWired(Board3DTo2D< Space, KSpace > &board, const DGtal::PointVector< dim, TComponent, TContainer > &aPoint)
drawAsPavingWired
static void draw(Board3DTo2D< Space, KSpace > &board, const DGtal::TransformedPrism &aTransformedPrism)
draw
static void draw(Board3DTo2D< Space, KSpace > &board, const DGtal::DigitalSetBySTLVector< Domain > &aSet)
draw
static void drawAsBalls(Board3DTo2D< Space, KSpace > &board, const DGtal::Naive3DDSSComputer< TIterator, TInteger, connectivity > &arithm)
drawAsBalls
static void draw(Board3DTo2D< Space, KSpace > &board, const DGtal::ConstRangeAdapter< TIterator, functors::SCellToInnerPoint< KSpace >, typename KSpace::Point > &aRangeAdapter)
draw
static void drawAsBoundingBox(Board3DTo2D< Space, KSpace > &board, const DGtal::HyperRectDomain< SpaceDom > &aDomain)
drawAsBoundingBox
static void drawAsPaving(Board3DTo2D< Space, KSpace > &board, const DGtal::DigitalSetBySTLVector< Domain > &aSet)
drawAsPaving
static void drawAsGrid(Board3DTo2D< Space, KSpace > &board, const DGtal::DigitalSetByAssociativeContainer< Domain, Container > &aSet)
drawAsGrid
static DGtal::DrawableWithBoard3DTo2D * defaultStyle(std::string str, const DGtal::DigitalSetBySTLVector< Domain > &aSet)
CameraDirection class to set camera direction.
CameraPosition class to set camera position.
CameraUpVector class to set camera up-vector.
CameraZNearFar class to set near and far distance.
Class for adding a Clipping plane through the Viewer3D stream. Realizes the concept CDrawableWithView...
Modifier class in a Display3D stream. Useful to choose your own style for a given class....
Factory for GPL Display3D:
Modifier class in a Display3D stream. Useful to choose your own mode for a given class....
class to modify the position and scale to construct better illustration mode.
KSpace::Cell Cell
const Point aPoint(3, 4)