DGtal  0.9.2
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)
34 
35 #define Board3DTo2DFactory_RECURSES
36 
37 #if !defined Board3DTo2DFactory_h
38 
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
90  draw( Board3DTo2D<Space, KSpace> & board, const DGtal::CameraPosition & aThing );
91 
97  static void
98  draw( Board3DTo2D<Space, KSpace> & board, const DGtal::CameraDirection & aThing );
99 
105  static void
106  draw( Board3DTo2D<Space, KSpace> & board, const DGtal::CameraUpVector & aThing );
107 
113  static void
114  draw( Board3DTo2D<Space, KSpace> & board, const DGtal::CameraZNearFar & aThing );
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
156  draw( Board3DTo2D<Space, KSpace> & board, const DGtal::Mesh<TPoint> & aMesh );
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>
250  defaultStyle( std::string str, const DGtal::DigitalSetBySTLSet<Domain, Compare> & aSet );
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>
505  defaultStyle( std::string str, const DGtal::PointVector<dim,TComponent> & aPoint );
506 
512  template<Dimension dim, typename TComponent>
513  static void
515 
521  template<Dimension dim, typename TComponent>
522  static void
524 
530  template<Dimension dim, typename TComponent>
531  static void
533 
539  template<Dimension dim, typename TComponent>
540  static void
542 
549  template<Dimension dim, typename TComponent>
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
581  draw( Board3DTo2D<Space, KSpace> & board, const DGtal::GridCurve<KSpace> & aGrid );
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
675  draw( Board3DTo2D<Space, KSpace> & board, const DGtal::SetMode3D & aMode);
676 
682  static void
683  draw( Board3DTo2D<Space, KSpace> & board, const DGtal::CustomStyle3D & aStyle);
684 
690  static void
691  draw( Board3DTo2D<Space, KSpace> & board, const DGtal::CustomColors3D & aColor);
692 
698  static void
699  draw( Board3DTo2D<Space, KSpace> & board, const DGtal::ClippingPlane & aClipping);
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)
Aim: An object (or digital object) represents a set in some digital space associated with a digital t...
Definition: Object.h:119
static void drawWithAdjacencies(Board3DTo2D< Space, KSpace > &board, const DGtal::Object< TDigitalTopology, TDigitalSet > &anObject)
drawWithAdjacencies
CameraUpVector class to set camera up-vector.
static void drawAsPavingBalls(Board3DTo2D< Space, KSpace > &board, const DGtal::HyperRectDomain< SpaceDom > &aDomain)
drawAsPavingBalls
CameraZNearFar class to set near and far distance.
Aim: Dynamic recognition of a 3d-digital straight segment (DSS)
Class for PDF, PNG, PS, EPS, SVG export drawings with Cairo with 3D->2D projection.
Definition: Common.h:138
static DGtal::DrawableWithBoard3DTo2D * defaultStyle(std::string str, const DGtal::StandardDSS6Computer< TIterator, TInteger, connectivity > &arithm)
static void drawAsBalls(Board3DTo2D< Space, KSpace > &board, const DGtal::StandardDSS6Computer< TIterator, TInteger, connectivity > &arithm)
drawAsBalls
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:91
CameraDirection class to set camera direction.
static void draw(Board3DTo2D< Space, KSpace > &board, const DGtal::CameraPosition &aThing)
static void drawAsPavingWired(Board3DTo2D< Space, KSpace > &board, const DGtal::PointVector< dim, TComponent > &aPoint)
drawAsPavingWired
Factory for GPL Display3D:
Modifier class in a Display3D stream. Useful to choose your own style for a given class...
Factory for GPL Display3D:
static void drawAsBoundingBox(Board3DTo2D< Space, KSpace > &board, const DGtal::StandardDSS6Computer< TIterator, TInteger, connectivity > &arithm)
drawAsBoundingBox
Aim: transforms a signed cell into an arrow, ie. a pair point-vector.
static void drawAsPaving(Board3DTo2D< Space, KSpace > &board, const DGtal::DigitalSetBySTLSet< Domain, Compare > &aSet)
drawAsPaving
static void drawAsPavingTransparent(Board3DTo2D< Space, KSpace > &board, const DGtal::DigitalSetBySTLSet< Domain, Compare > &aSet)
drawAsPavingTransparent
Aim: transforms a scell into a point.
CameraPosition class to set camera position.
static void drawAsFaces(Board3DTo2D< Space, KSpace > &board, const DGtal::Mesh< TPoint > &aMesh)
drawAsFaces
DGtal is the top-level namespace which contains all DGtal functions and types.
Aim: A wrapper class around a STL associative container for storing sets of digital points within som...
Aim: transforms a signed cell c into a point corresponding to the signed cell of greater dimension th...
Aim: model of CConstBidirectionalRange that adapts any range of elements bounded by two iterators [it...
Aim: implements an accumulator (as histograms for 1D scalars) adapted to spherical point samples...
Aim: Realizes the concept CDigitalSet by using the STL container std::vector.
Aim: Dynamic recognition of a 3d-digital straight segment (DSS)
Aim: describes, in a cellular space of dimension n, a closed or open sequence of signed d-cells (or d...
Definition: GridCurve.h:172
Class for adding a Clipping plane through the Viewer3D stream. Realizes the concept CDrawableWithView...
static void drawAsGrid(Board3DTo2D< Space, KSpace > &board, const DGtal::DigitalSetBySTLSet< Domain, Compare > &aSet)
drawAsGrid
Aim: transforms a signed cell c into a point corresponding to the signed cell of greater dimension th...
Aim: A container class for storing sets of digital points within some given domain.
class to modify the position and scale to construct better illustration mode.
Modifier class in a Display3D stream. Useful to choose your own mode for a given class. Realizes the concept CDrawableWithDisplay3D.
Aim: transforms a signed cell c into a pair of points corresponding to the signed cells of greater di...