2 * This program is free software: you can redistribute it and/or modify
3 * it under the terms of the GNU Lesser General Public License as
4 * published by the Free Software Foundation, either version 3 of the
5 * License, or (at your option) any later version.
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
12 * You should have received a copy of the GNU General Public License
13 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 * @file Style2DFactory.ih
19 * @author Martial Tola <http://liris.cnrs.fr/martial.tola/>
20 * @date lundi 24 octobre 2011
24 * Implementation of inline methods defined in Style2DFactory.h
26 * This file is part of the DGtal library.
29///////////////////////////////////////////////////////////////////////////////
30// Implementation of inline methods //
32///////////////////////////////////////////////////////////////////////////////
33// Implementation of inline functions and external operators //
37 // DiscreteExteriorCalculus
41 struct CalculusStyle2D : public DrawableWithBoard2D
44 virtual void setStyle(Board2D & aBoard) const
46 aBoard.setPenColorRGBi(0,0,0);
47 aBoard.setLineStyle(Board2D::Shape::SolidStyle);
48 aBoard.setFillColor(Color::None);
49 aBoard.setLineWidth(1);
52 // DiscreteExteriorCalculus
58 struct KFormStyle2D : public DrawableWithBoard2D
62 ColorGradientPreset cmap_preset;
65 KFormStyle2D(const double& _cmap_min = 0, const double& _cmap_max = 0, const ColorGradientPreset& _cmap_preset = CMAP_JET, const int& _cmap_repeat = 0)
66 : DrawableWithBoard2D(), cmap_min(_cmap_min), cmap_max(_cmap_max), cmap_preset(_cmap_preset), cmap_repeat(_cmap_repeat)
70 virtual void setStyle(Board2D & aBoard) const
72 aBoard.setPenColorRGBi(0,0,0);
73 aBoard.setLineStyle(Board2D::Shape::SolidStyle);
74 aBoard.setFillColorRGBi(0,0,0);
75 aBoard.setLineWidth(1);
84 struct VectorFieldStyle2D : public DrawableWithBoard2D
89 VectorFieldStyle2D(const double& _scale = .25, const double& _epsilon = 1e-8)
90 : DrawableWithBoard2D(), scale(_scale), epsilon(_epsilon)
94 virtual void setStyle(Board2D& aBoard) const
96 aBoard.setPenColorRGBi(0,0,0);
97 aBoard.setLineStyle(Board2D::Shape::SolidStyle);
98 aBoard.setFillColorRGBi(0,0,0);
99 aBoard.setLineWidth(1);
105 // AngleLinearMinimizer
109 struct DefaultDrawStyleCircular_AngleLinearMinimizer : public DrawableWithBoard2D
111 virtual void setStyle( Board2D & aBoard ) const
113 aBoard.setPenColorRGBi(160,160,160);
114 aBoard.setLineStyle( Board2D::Shape::SolidStyle );
115 aBoard.setFillColorRGBi(220,220,220);
116 aBoard.setLineWidth(1);
119 // AngleLinearMinimizer
124 * Default style for the bounding box mode.
126 struct DefaultDrawStyleBB_ArithmeticalDSS : public DrawableWithBoard2D
129 * Draw the DSS on a board
130 * @param aBoard the output board where the object is drawn.
132 virtual void setStyle(Board2D & aBoard) const
135 aBoard.setLineStyle(Board2D::Shape::SolidStyle);
136 aBoard.setPenColor(Color::Red);
137 aBoard.setLineWidth(1);
138 aBoard.setFillColor(Color::None);
142 * Default style for the points mode.
144 struct DefaultDrawStylePoints_ArithmeticalDSS : public DrawableWithBoard2D
147 * Draw the DSS on a board
148 * @param aBoard the output board where the object is drawn.
150 virtual void setStyle(Board2D & aBoard) const
153 aBoard.setLineStyle(Board2D::Shape::SolidStyle);
154 aBoard.setPenColor(Color::Black);
155 aBoard.setLineWidth(2);
156 aBoard.setFillColor(Color::None);
162 // ArithmeticalDSSComputer
164 * Default style for the bounding box mode.
166 struct DefaultDrawStyleBB_ArithmeticalDSSComputer : public DrawableWithBoard2D
169 * Draw the DSS on a board
170 * @param aBoard the output board where the object is drawn.
172 virtual void setStyle(Board2D & aBoard) const
175 aBoard.setLineStyle(Board2D::Shape::SolidStyle);
176 aBoard.setPenColor(Color::Red);
177 aBoard.setLineWidth(1);
178 aBoard.setFillColor(Color::None);
182 * Default style for the points mode.
184 struct DefaultDrawStylePoints_ArithmeticalDSSComputer : public DrawableWithBoard2D
187 * Draw the DSS on a board
188 * @param aBoard the output board where the object is drawn.
190 virtual void setStyle(Board2D & aBoard) const
193 aBoard.setLineStyle(Board2D::Shape::SolidStyle);
194 aBoard.setPenColor(Color::Black);
195 aBoard.setLineWidth(2);
196 aBoard.setFillColor(Color::None);
199 // ArithmeticalDSSComputer
202 // AlphaThickSegmentComputer
205 * Default style for the bounding box mode.
207 struct DefaultDrawStyleBB_AlphaThickSegmentComputer : public DrawableWithBoard2D
210 * Draw the AlphaThickSegmentComputer on a board
211 * @param aBoard the output board where the object is drawn.
213 virtual void setStyle(Board2D & aBoard) const
216 aBoard.setLineStyle(Board2D::Shape::SolidStyle);
217 aBoard.setPenColor(Color::Red);
218 aBoard.setLineWidth(5);
219 aBoard.setFillColor(Color::None);
224 * Default style for the points mode.
226 struct DefaultDrawStylePoints_AlphaThickSegmentComputer : public DrawableWithBoard2D
229 * Draw the AlphaThickSegmentComputer on a board
230 * @param aBoard the output board where the object is drawn.
232 virtual void setStyle(Board2D & aBoard) const
235 aBoard.setLineStyle(Board2D::Shape::SolidStyle);
236 aBoard.setPenColor(Color::Black);
237 aBoard.setLineWidth(2);
238 aBoard.setFillColor(Color::None);
242 // AlphaThickSegmentComputer
245 // DigitalSetBySTLSet
249 struct DefaultDrawStyle_DigitalSetBySTLSet : public DrawableWithBoard2D
251 virtual void setStyle(Board2D & aBoard) const
253 aBoard.setLineStyle(Board2D::Shape::SolidStyle);
254 aBoard.setFillColorRGBi(160,160,160);
255 aBoard.setPenColorRGBi(80,80,80);
258 // DigitalSetBySTLSet
260 // DigitalSetByAssociativeContainer
264 struct DefaultDrawStyle_DigitalSetByAssociativeContainer : public DrawableWithBoard2D
266 virtual void setStyle(Board2D & aBoard) const
268 aBoard.setLineStyle(Board2D::Shape::SolidStyle);
269 aBoard.setFillColorRGBi(160,160,160);
270 aBoard.setPenColorRGBi(80,80,80);
273 // DigitalSetByAssociativeContainer
276 // DigitalSetBySTLVector
280 struct DefaultDrawStyle_DigitalSetBySTLVector : public DrawableWithBoard2D
282 virtual void setStyle(Board2D & aBoard) const
284 aBoard.setLineWidth(1);
285 aBoard.setLineStyle(Board2D::Shape::SolidStyle);
286 aBoard.setFillColorRGBi(160,160,160);
287 aBoard.setPenColorRGBi(80,80,80);
290 // DigitalSetBySTLVector
297 struct DefaultDrawStyle_FP : public DrawableWithBoard2D
301 * @param aBoard the output board where the object is drawn.
303 virtual void setStyle(Board2D & aBoard) const
306 aBoard.setLineStyle(Board2D::Shape::SolidStyle);
307 aBoard.setPenColor(Color::Red);
308 aBoard.setLineWidth(2);
309 aBoard.setFillColor(Color::None);
316 struct DefaultDrawStyleGrid_FreemanChain : public DrawableWithBoard2D
318 virtual void setStyle( Board2D & aBoard ) const
320 aBoard.setLineStyle (LibBoard::Shape::SolidStyle );
321 aBoard.setFillColor(Color::None);
325 struct DefaultDrawStyleInterGrid_FreemanChain : public DrawableWithBoard2D
327 virtual void setStyle( Board2D & aBoard ) const
329 aBoard.setLineStyle (LibBoard::Shape::SolidStyle );
330 aBoard.setFillColor(Color::None);
336 // StabbingLineComputer
338 * Default drawing style for StabbingLineComputer.
340 struct DefaultDrawStyle_StabbingLineComputer : public DrawableWithBoard2D
343 * Draw the StabbingLineComputer on a board
344 * @param aBoard the output board where the object is drawn.
346 virtual void setStyle(Board2D & aBoard) const
348 aBoard.setLineStyle(Board2D::Shape::SolidStyle);
349 aBoard.setPenColor(Color::Red);
350 aBoard.setLineWidth(1.5);
351 aBoard.setFillColor(Color::None);
354 // StabbingLineComputer
356 //StabbingCircleComputer
358 * Default drawing style for StabbingCircleComputer.
360 struct DefaultDrawStyle_StabbingCircleComputer : public DrawableWithBoard2D
363 * Draw the StabbingCircleComputer on a board
364 * @param aBoard the output board where the object is drawn.
366 virtual void setStyle(Board2D & aBoard) const
368 aBoard.setLineStyle(Board2D::Shape::SolidStyle);
369 aBoard.setPenColor(Color::Red);
370 aBoard.setLineWidth(1.5);
371 aBoard.setFillColor(Color::None);
374 // StabbingCircleComputer
379 * Default drawing style for FrechetShortcut.
381 struct DefaultDrawStyle_FrechetShortcut : public DrawableWithBoard2D
384 * Draw the FrechetShortcut on a board
385 * @param aBoard the output board where the object is drawn.
387 virtual void setStyle(Board2D & aBoard) const
389 aBoard.setLineStyle(Board2D::Shape::SolidStyle);
390 aBoard.setPenColor(Color::Red);
391 aBoard.setLineWidth(1.5);
392 aBoard.setFillColor(Color::None);
399 // we use friend because of inner classes
407 struct DefaultDrawStylePaving_HyperRectDomain : public DrawableWithBoard2D
409 virtual void setStyle(Board2D & aBoard) const
411 aBoard.setPenColorRGBi(160, 160, 160);
412 aBoard.setFillColorRGBi(255, 255, 255);
413 aBoard.setLineStyle(Board2D::Shape::SolidStyle);
414 aBoard.setLineWidth( 1 );
419 * Default style.aultDrawStyleTransparent_LatticePol
421 struct DefaultDrawStyleGrid_HyperRectDomain : public DrawableWithBoard2D
423 virtual void setStyle(Board2D & aBoard) const
425 aBoard.setPenColorRGBi(160, 160, 160);
426 aBoard.setFillColorRGBi(160, 160, 160);
427 aBoard.setLineStyle(Board2D::Shape::DashStyle);
428 aBoard.setLineWidth( 1 );
434 // ImageContainerByHashTree
435 struct DefaultDrawStyle_ImageContainerByHashTree : public DrawableWithBoard2D
437 virtual void setStyle(Board2D & aboard) const
439 aboard.setPenColorRGBi(60, 60, 60);
440 aboard.setLineStyle(Board2D::Shape::SolidStyle);
443 // ImageContainerByHashTreeaultDrawStyleTransparent_LatticePol
446 // ImageContainerBySTLVector
450 struct DefaultDrawStyle_ImageContainerBySTLVector : public DrawableWithBoard2D
452 virtual void setStyle( Board2D & aBoard ) const
454 aBoard.setPenColorRGBi(60, 60, 60);
455 aBoard.setLineStyle(Board2D::Shape::SolidStyle);
458 // ImageContainerBySTLVector
461 // KhalimskyCellaultDrawStyleTransparent_LatticePol
465 struct DefaultDrawStyle_KhalimskyCell : public DrawableWithBoard2D
467 virtual void setStyle( Board2D & aBoard ) const
469 aBoard.setPenColorRGBi( 50, 50, 50 );
470 aBoard.setLineStyle( Board2D::Shape::SolidStyle );
471 aBoard.setFillColorRGBi( 80, 80, 80 );
472 aBoard.setLineWidth( 1 );
482 struct DefaultDrawStyle_Object : public DrawableWithBoard2D
484 virtual void setStyle(Board2D & aBoard) const
486 // line width decreased to avoid too large arrows to display adjacency.
487 aBoard.setLineWidth(0.75);
488 aBoard.setLineStyle(Board2D::Shape::SolidStyle);
489 aBoard.setFillColorRGBi(160, 160, 160);
490 aBoard.setPenColorRGBi(80, 80, 80);
497 * Default style for CubicalComplex.
499 struct DefaultDrawStyle_CubicalComplex : public DrawableWithBoard2D
501 virtual void setStyle(Board2D & aBoard) const
503 // line width decreased to avoid too large arrows to display adjacency.
504 aBoard.setLineWidth(0.75);
505 aBoard.setLineStyle(Board2D::Shape::SolidStyle);
506 aBoard.setFillColorRGBi(200, 200, 200);
507 aBoard.setPenColorRGBi(0, 0, 0);
517 struct DefaultDrawStylePaving_PointVector : public DrawableWithBoard2D
519 virtual void setStyle( Board2D & aBoard ) const
521 aBoard.setPenColorRGBi(160,160,160);
522 aBoard.setLineStyle( Board2D::Shape::SolidStyle );
523 aBoard.setFillColorRGBi(220,220,220);
524 aBoard.setLineWidth(1);
529 * Style based in grid representation.
531 struct DefaultDrawStyleGrid_PointVector : public DrawableWithBoard2D
533 virtual void setStyle( Board2D & aBoard ) const
535 aBoard.setPenColor(Color::Black);
536 aBoard.setLineStyle( Board2D::Shape::SolidStyle );
546 // SignedKhalimskyCell
550 struct DefaultDrawStyle_SignedKhalimskyCell : public DrawableWithBoard2D
552 virtual void setStyle( Board2D & aBoard ) const
554 aBoard.setPenColorRGBi( 50, 50, 50 );
555 aBoard.setLineStyle( Board2D::Shape::SolidStyle );
556 aBoard.setFillColorRGBi( 80, 80, 80 );
557 aBoard.setLineWidth( 1 );
560 // SignedKhalimskyCell
563 struct DefaultDrawStyleFilled_LatticePolytope2D : public DrawableWithBoard2D
565 virtual void setStyle( Board2D & aBoard ) const
567 aBoard.setPenColorRGBi( 30, 30, 30 );
568 aBoard.setLineStyle( Board2D::Shape::SolidStyle );
569 aBoard.setFillColorRGBi( 200, 200, 200 );
570 aBoard.setLineWidth( 2 );
573 struct DefaultDrawStyleTransparent_LatticePolytope2D : public DrawableWithBoard2D
575 virtual void setStyle( Board2D & aBoard ) const
577 aBoard.setPenColorRGBi( 30, 30, 30 );
578 aBoard.setLineStyle( Board2D::Shape::SolidStyle );
579 aBoard.setFillColor( DGtal::Color::None ); //200, 200, 200 );
580 aBoard.setLineWidth( 2 );
586 // StraightLineFrom2Points
587 // StraightLineFrom2Points
595// DiscreteExteriorCalculus
596template <DGtal::Dimension dimEmbedded, DGtal::Dimension dimAmbient, typename TLinearAlgebraBackend, typename TInteger>
598DGtal::DrawableWithBoard2D* defaultStyle(const DGtal::DiscreteExteriorCalculus<dimEmbedded, dimAmbient, TLinearAlgebraBackend, TInteger>& /*object*/, std::string /*mode*/ = "" )
600 return new DGtal::CalculusStyle2D();
602// DiscreteExteriorCalculus
605template <typename TCalculus, DGtal::Order order, DGtal::Duality duality>
607DGtal::DrawableWithBoard2D* defaultStyle(const DGtal::KForm<TCalculus, order, duality>& object, std::string mode = "" )
609 boost::ignore_unused_variable_warning( mode );
610 boost::ignore_unused_variable_warning( object );
611 return new DGtal::KFormStyle2D();
616template <typename TCalculus, DGtal::Duality duality>
618DGtal::DrawableWithBoard2D* defaultStyle(const DGtal::VectorField<TCalculus, duality>& /*object*/, std::string /*mode*/ = "" )
620 return new DGtal::VectorFieldStyle2D();
624// AngleLinearMinimizer
626DGtal::DrawableWithBoard2D* defaultStyle(const DGtal::AngleLinearMinimizer & /*a*/, std::string mode = "" )
628 boost::ignore_unused_variable_warning(mode);
629 //only one style actually...
630 return new DGtal::DefaultDrawStyleCircular_AngleLinearMinimizer;
632// AngleLinearMinimizer
635template <typename TCoordinate, typename TInteger, unsigned short adjacency>
637DGtal::DrawableWithBoard2D* defaultStyle(const DGtal::ArithmeticalDSS<TCoordinate,TInteger,adjacency> & /*a*/, std::string mode = "" )
639 if ( ( mode == "" ) || ( mode == "BoundingBox" ) )
640 return new DGtal::DefaultDrawStyleBB_ArithmeticalDSS;
641 else // mode == "Points"
642 return new DGtal::DefaultDrawStylePoints_ArithmeticalDSS;
646// ArithmeticalDSSComputer
647template <typename TIterator, typename TInteger, int connectivity>
649DGtal::DrawableWithBoard2D* defaultStyle(const DGtal::ArithmeticalDSSComputer<TIterator,TInteger,connectivity> & /*a*/, std::string mode = "" )
651 if ( ( mode == "" ) || ( mode == "BoundingBox" ) )
652 return new DGtal::DefaultDrawStyleBB_ArithmeticalDSSComputer;
653 else // mode == "Points"
654 return new DGtal::DefaultDrawStylePoints_ArithmeticalDSSComputer;
656// ArithmeticalDSSComputer
659// AlphaThickSegmentComputer
660template <typename TInputPoint, typename TConstIterator>
662DGtal::DrawableWithBoard2D* defaultStyle(const DGtal::AlphaThickSegmentComputer< TInputPoint, TConstIterator> & /*a*/, std::string mode = "" )
664 if ( ( mode == "" ) || ( mode == "BoundingBox" ) )
665 return new DGtal::DefaultDrawStyleBB_AlphaThickSegmentComputer;
666 else // mode == "Points"
667 return new DGtal::DefaultDrawStylePoints_AlphaThickSegmentComputer;
669// AlphaThickSegmentComputer
673template <typename TPoint>
675DGtal::DrawableWithBoard2D* defaultStyle(const DGtal::CircleFrom2Points<TPoint> & /*cf2p*/, std::string mode = "" )
677 boost::ignore_unused_variable_warning(mode);
678 return new DGtal::DrawableWithBoard2D;
684template <typename TPoint>
686DGtal::DrawableWithBoard2D* defaultStyle(const DGtal::CircleFrom3Points<TPoint> & /*cf3p*/, std::string mode = "" )
688 boost::ignore_unused_variable_warning(mode);
689 return new DGtal::DrawableWithBoard2D;
695template<typename Domain, typename Compare>
697DGtal::DrawableWithBoard2D* defaultStyle(const DGtal::DigitalSetBySTLSet<Domain, Compare> & /*s*/, std::string mode = "" )
699 boost::ignore_unused_variable_warning(mode);
700 return new DGtal::DefaultDrawStyle_DigitalSetBySTLSet;
704// DigitalSetByAssociativeContainer
705template<typename Domain, typename Container>
707DGtal::DrawableWithBoard2D* defaultStyle(const DGtal::DigitalSetByAssociativeContainer<Domain, Container> & /*s*/,
708 std::string mode = "" )
710 boost::ignore_unused_variable_warning(mode);
711 return new DGtal::DefaultDrawStyle_DigitalSetByAssociativeContainer;
715// DigitalSetBySTLVector
716template<typename Domain>
718DGtal::DrawableWithBoard2D* defaultStyle(const DGtal::DigitalSetBySTLVector<Domain> & /*v*/, std::string mode = "" )
720 boost::ignore_unused_variable_warning(mode);
721 return new DGtal::DefaultDrawStyle_DigitalSetBySTLVector;
723// DigitalSetBySTLVector
727template <typename TIterator, typename TInteger, int connectivity>
729DGtal::DrawableWithBoard2D* defaultStyle(const DGtal::FP<TIterator,TInteger,connectivity> & /*fp*/,
730 std::string mode = "" )
732 boost::ignore_unused_variable_warning( mode );
733 return new DGtal::DefaultDrawStyle_FP;
739template <typename TInteger>
741DGtal::DrawableWithBoard2D* defaultStyle(const DGtal::FreemanChain<TInteger> & /*f*/,
742 std::string mode = "" )
744 if ( ( mode == "" ) || ( mode == "Grid" ) )
745 return new DGtal::DefaultDrawStyleGrid_FreemanChain;
747 return new DGtal::DefaultDrawStyleInterGrid_FreemanChain;
752// StabbingLineComputer
753template <typename TConstIterator>
755DGtal::DrawableWithBoard2D* defaultStyle(const DGtal::StabbingLineComputer<TConstIterator> & /*g*/,
756 std::string mode = "" )
758 boost::ignore_unused_variable_warning(mode);
759 return new DGtal::DefaultDrawStyle_StabbingLineComputer;
761// StabbingLineComputer
763// StabbingCircleComputer
764template <typename TConstIterator>
766DGtal::DrawableWithBoard2D* defaultStyle(const DGtal::StabbingCircleComputer<TConstIterator> & /*g*/,
767 std::string mode = "" )
769 boost::ignore_unused_variable_warning(mode);
770 return new DGtal::DefaultDrawStyle_StabbingCircleComputer;
772// StabbingCircleComputer
775template <typename TIterator, typename TInteger>
777DGtal::DrawableWithBoard2D* defaultStyle(const DGtal::FrechetShortcut<TIterator,TInteger> & /*f*/, std::string mode = "" )
779 boost::ignore_unused_variable_warning(mode);
780 return new DGtal::DefaultDrawStyle_FrechetShortcut;
787template <typename TKSpace>
788DGtal::DrawableWithBoard2D*
789defaultStyle(const DGtal::GridCurve<TKSpace> & /*object*/,
790 std::string mode = "" )
792 boost::ignore_unused_variable_warning(mode);
793 return new DGtal::DrawableWithBoard2D;
798template <typename TIterator, typename TSCell>
799DGtal::DrawableWithBoard2D*
800defaultStyle(const DGtal::ConstRangeAdapter<TIterator, DGtal::functors::Identity, TSCell> & /*object*/,
801 std::string mode = "" )
803 boost::ignore_unused_variable_warning(mode);
804 return new DGtal::DrawableWithBoard2D;
809template <typename TIterator, typename TKSpace>
810DGtal::DrawableWithBoard2D*
811defaultStyle(const DGtal::ConstRangeAdapter<TIterator, DGtal::functors::SCellToPoint<TKSpace>, typename TKSpace::Point> & /*object*/,
812 std::string mode = "" )
814 boost::ignore_unused_variable_warning(mode);
815 return new DGtal::DrawableWithBoard2D;
820template <typename TIterator, typename TKSpace>
821DGtal::DrawableWithBoard2D*
822defaultStyle(const DGtal::ConstRangeAdapter<TIterator, DGtal::CanonicSCellEmbedder<TKSpace>,
823 typename TKSpace::Space::RealPoint> & /*object*/,
824 std::string mode = "" )
826 boost::ignore_unused_variable_warning( mode );
827 return new DGtal::DrawableWithBoard2D;
832template <typename TIterator, typename TKSpace>
833DGtal::DrawableWithBoard2D*
834defaultStyle(const DGtal::ConstRangeAdapter<TIterator, DGtal::functors::SCellToArrow<TKSpace>,
835 std::pair<typename TKSpace::Point, typename TKSpace::Vector> > & /*object*/,
836 std::string mode = "" )
838 boost::ignore_unused_variable_warning(mode);
839 return new DGtal::DrawableWithBoard2D;
844template <typename TIterator, typename TKSpace>
845DGtal::DrawableWithBoard2D*
846defaultStyle(const DGtal::ConstRangeAdapter<TIterator, DGtal::functors::SCellToInnerPoint<TKSpace>, typename TKSpace::Point> & /*object*/,
847 std::string mode = "" )
849 boost::ignore_unused_variable_warning(mode);
850 return new DGtal::DrawableWithBoard2D;
855template <typename TIterator, typename TKSpace>
856DGtal::DrawableWithBoard2D*
857defaultStyle(const DGtal::ConstRangeAdapter<TIterator, DGtal::functors::SCellToOuterPoint<TKSpace>, typename TKSpace::Point> & /*object*/,
858 std::string mode = "" )
860 boost::ignore_unused_variable_warning( mode );
861 return new DGtal::DrawableWithBoard2D;
865// IncidentPointsRange
866template <typename TIterator, typename TKSpace>
867DGtal::DrawableWithBoard2D*
868defaultStyle(const DGtal::ConstRangeAdapter<TIterator, DGtal::functors::SCellToIncidentPoints<TKSpace>,
869 std::pair<typename TKSpace::Point, typename TKSpace::Point> > & /*object*/,
870 std::string mode = "" )
872 boost::ignore_unused_variable_warning(mode);
873 return new DGtal::DrawableWithBoard2D;
875// IncidentPointsRange
878template<typename TSpace>
880DGtal::DrawableWithBoard2D* defaultStyle(const DGtal::HyperRectDomain<TSpace> & /*h*/, std::string mode = "" )
882 if ( ( mode == "" ) || ( mode == "Both" ) || ( mode == "Grid" ) )
883 return new DGtal::DefaultDrawStyleGrid_HyperRectDomain;
884 else // mode == "Paving"
885 return new DGtal::DefaultDrawStylePaving_HyperRectDomain;
890// ImageContainerByHashTree
891template <typename Domain, typename Value, typename HashKey >
893DGtal::DrawableWithBoard2D* defaultStyle(const DGtal::experimental::ImageContainerByHashTree<Domain, Value, HashKey > & /*icbht*/, std::string mode = "" )
895 boost::ignore_unused_variable_warning(mode);
896 return new DGtal::DefaultDrawStyle_ImageContainerByHashTree;
898// ImageContainerByHashTree
901// ImageContainerBySTLVector
902template <typename D, typename V>
904DGtal::DrawableWithBoard2D* defaultStyle(const DGtal::ImageContainerBySTLVector<D, V> & /*icbsv*/, std::string mode = "" )
906 boost::ignore_unused_variable_warning( mode );
907 return new DGtal::DefaultDrawStyle_ImageContainerBySTLVector;
909// ImageContainerBySTLVector
913template < DGtal::Dimension dim, typename TInteger >
915DGtal::DrawableWithBoard2D* defaultStyle(const DGtal::KhalimskyCell<dim, TInteger> & /*k*/, std::string mode = "" )
917 boost::ignore_unused_variable_warning(mode);
918 return new DGtal::DefaultDrawStyle_KhalimskyCell;
923template < DGtal::Dimension dim, typename TInteger >
925DGtal::DrawableWithBoard2D* defaultStyle(const DGtal::KhalimskyPreCell<dim, TInteger> & /*k*/, std::string mode = "" )
927 boost::ignore_unused_variable_warning(mode);
928 return new DGtal::DefaultDrawStyle_KhalimskyCell;
933template <typename TDigitalTopology, typename TDigitalSet>
935DGtal::DrawableWithBoard2D* defaultStyle(const DGtal::Object<TDigitalTopology, TDigitalSet> & /*o*/, std::string mode = "" )
937 boost::ignore_unused_variable_warning(mode);
938 return new DGtal::DefaultDrawStyle_Object;
943template < typename TKSpace,
944 typename TCellContainer >
946DGtal::DrawableWithBoard2D* defaultStyle(const DGtal::CubicalComplex<TKSpace, TCellContainer> & /*o*/, std::string mode = "" )
948 boost::ignore_unused_variable_warning(mode);
949 return new DGtal::DefaultDrawStyle_CubicalComplex;
955template<DGtal::Dimension dim, typename TComponent, typename TContainer>
957DGtal::DrawableWithBoard2D* defaultStyle(const DGtal::PointVector<dim, TComponent, TContainer> & /*p*/, std::string mode = "")
959 if ( ( mode == "" ) || ( mode == "Paving" ) )
960 return new DGtal::DefaultDrawStylePaving_PointVector;
961 else // mode == "Grid"
962 return new DGtal::DefaultDrawStyleGrid_PointVector;
968template <typename Shape>
970DGtal::DrawableWithBoard2D* defaultStyle(const DGtal::Preimage2D<Shape> & /*p*/, std::string mode = "")
972 boost::ignore_unused_variable_warning(mode);
973 return new DGtal::DrawableWithBoard2D;
978// SignedKhalimskyCell
979template < DGtal::Dimension dim, typename TInteger >
981DGtal::DrawableWithBoard2D* defaultStyle(const DGtal::SignedKhalimskyCell<dim, TInteger> & /*sk*/, std::string mode = "" )
983 boost::ignore_unused_variable_warning( mode );
984 return new DGtal::DefaultDrawStyle_SignedKhalimskyCell;
986// SignedKhalimskyCell
988// SignedKhalimskyPreCell
989template < DGtal::Dimension dim, typename TInteger >
991DGtal::DrawableWithBoard2D* defaultStyle(const DGtal::SignedKhalimskyPreCell<dim, TInteger> & /*sk*/, std::string mode = "" )
993 boost::ignore_unused_variable_warning( mode );
994 return new DGtal::DefaultDrawStyle_SignedKhalimskyCell;
996// SignedKhalimskyOreCell
998// StraightLineFrom2Points
999template <typename TPoint>
1001DGtal::DrawableWithBoard2D* defaultStyle(const DGtal::StraightLineFrom2Points<TPoint> & /*slf2p*/, std::string mode = "" )
1003 boost::ignore_unused_variable_warning( mode );
1004 return new DGtal::DrawableWithBoard2D;
1006// StraightLineFrom2Points
1009template < typename TSpace, typename TSequence>
1011DGtal::DrawableWithBoard2D*
1012defaultStyle( const DGtal::LatticePolytope2D<TSpace,TSequence> & /*cip*/,
1013 std::string mode = "" )
1015 if ( ( mode == "" ) || ( mode == "Transparent" ) )
1016 return new DGtal::DefaultDrawStyleTransparent_LatticePolytope2D;
1018 return new DGtal::DefaultDrawStyleFilled_LatticePolytope2D;
1026DGtal::DrawableWithBoard2D* defaultStyle(const DGtal::CustomStyle & /*cs*/, std::string mode = "" )
1028 boost::ignore_unused_variable_warning( mode );
1033DGtal::DrawableWithBoard2D* defaultStyle(const DGtal::SetMode & /*sm*/, std::string mode = "" )
1035 boost::ignore_unused_variable_warning( mode );
1041///////////////////////////////////////////////////////////////////////////////