DGtal 1.3.0
Loading...
Searching...
No Matches
Style2DFactory.ih
1/**
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.
6 *
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.
11 *
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/>.
14 *
15 **/
16
17/**
18 * @file Style2DFactory.ih
19 * @author Martial Tola <http://liris.cnrs.fr/martial.tola/>
20 * @date lundi 24 octobre 2011
21 *
22 * @brief
23 *
24 * Implementation of inline methods defined in Style2DFactory.h
25 *
26 * This file is part of the DGtal library.
27 */
28
29///////////////////////////////////////////////////////////////////////////////
30// Implementation of inline methods //
31
32///////////////////////////////////////////////////////////////////////////////
33// Implementation of inline functions and external operators //
34
35namespace DGtal
36{
37 // DiscreteExteriorCalculus
38 /**
39 * Default styles.
40 */
41 struct CalculusStyle2D : public DrawableWithBoard2D
42 {
43
44 virtual void setStyle(Board2D & aBoard) const
45 {
46 aBoard.setPenColorRGBi(0,0,0);
47 aBoard.setLineStyle(Board2D::Shape::SolidStyle);
48 aBoard.setFillColor(Color::None);
49 aBoard.setLineWidth(1);
50 }
51 };
52 // DiscreteExteriorCalculus
53
54 // KForm
55 /**
56 * Default styles.
57 */
58 struct KFormStyle2D : public DrawableWithBoard2D
59 {
60 double cmap_min;
61 double cmap_max;
62 ColorGradientPreset cmap_preset;
63 int cmap_repeat;
64
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)
67 {
68 }
69
70 virtual void setStyle(Board2D & aBoard) const
71 {
72 aBoard.setPenColorRGBi(0,0,0);
73 aBoard.setLineStyle(Board2D::Shape::SolidStyle);
74 aBoard.setFillColorRGBi(0,0,0);
75 aBoard.setLineWidth(1);
76 }
77 };
78 // KForm
79
80 // VectorField
81 /**
82 * Default styles.
83 */
84 struct VectorFieldStyle2D : public DrawableWithBoard2D
85 {
86 double scale;
87 double epsilon;
88
89 VectorFieldStyle2D(const double& _scale = .25, const double& _epsilon = 1e-8)
90 : DrawableWithBoard2D(), scale(_scale), epsilon(_epsilon)
91 {
92 }
93
94 virtual void setStyle(Board2D& aBoard) const
95 {
96 aBoard.setPenColorRGBi(0,0,0);
97 aBoard.setLineStyle(Board2D::Shape::SolidStyle);
98 aBoard.setFillColorRGBi(0,0,0);
99 aBoard.setLineWidth(1);
100 }
101 };
102 // VectorField
103
104
105 // AngleLinearMinimizer
106 /**
107 * Default styles.
108 */
109 struct DefaultDrawStyleCircular_AngleLinearMinimizer : public DrawableWithBoard2D
110 {
111 virtual void setStyle( Board2D & aBoard ) const
112 {
113 aBoard.setPenColorRGBi(160,160,160);
114 aBoard.setLineStyle( Board2D::Shape::SolidStyle );
115 aBoard.setFillColorRGBi(220,220,220);
116 aBoard.setLineWidth(1);
117 }
118 };
119 // AngleLinearMinimizer
120
121
122 // ArithmeticalDSS
123 /**
124 * Default style for the bounding box mode.
125 */
126 struct DefaultDrawStyleBB_ArithmeticalDSS : public DrawableWithBoard2D
127 {
128 /**
129 * Draw the DSS on a board
130 * @param aBoard the output board where the object is drawn.
131 */
132 virtual void setStyle(Board2D & aBoard) const
133 {
134 // Set board style
135 aBoard.setLineStyle(Board2D::Shape::SolidStyle);
136 aBoard.setPenColor(Color::Red);
137 aBoard.setLineWidth(1);
138 aBoard.setFillColor(Color::None);
139 }
140 };
141 /**
142 * Default style for the points mode.
143 */
144 struct DefaultDrawStylePoints_ArithmeticalDSS : public DrawableWithBoard2D
145 {
146 /**
147 * Draw the DSS on a board
148 * @param aBoard the output board where the object is drawn.
149 */
150 virtual void setStyle(Board2D & aBoard) const
151 {
152 // Set board style
153 aBoard.setLineStyle(Board2D::Shape::SolidStyle);
154 aBoard.setPenColor(Color::Black);
155 aBoard.setLineWidth(2);
156 aBoard.setFillColor(Color::None);
157 }
158 };
159 // ArithmeticalDSS
160
161
162 // ArithmeticalDSSComputer
163 /**
164 * Default style for the bounding box mode.
165 */
166 struct DefaultDrawStyleBB_ArithmeticalDSSComputer : public DrawableWithBoard2D
167 {
168 /**
169 * Draw the DSS on a board
170 * @param aBoard the output board where the object is drawn.
171 */
172 virtual void setStyle(Board2D & aBoard) const
173 {
174 // Set board style
175 aBoard.setLineStyle(Board2D::Shape::SolidStyle);
176 aBoard.setPenColor(Color::Red);
177 aBoard.setLineWidth(1);
178 aBoard.setFillColor(Color::None);
179 }
180 };
181 /**
182 * Default style for the points mode.
183 */
184 struct DefaultDrawStylePoints_ArithmeticalDSSComputer : public DrawableWithBoard2D
185 {
186 /**
187 * Draw the DSS on a board
188 * @param aBoard the output board where the object is drawn.
189 */
190 virtual void setStyle(Board2D & aBoard) const
191 {
192 // Set board style
193 aBoard.setLineStyle(Board2D::Shape::SolidStyle);
194 aBoard.setPenColor(Color::Black);
195 aBoard.setLineWidth(2);
196 aBoard.setFillColor(Color::None);
197 }
198 };
199 // ArithmeticalDSSComputer
200
201
202 // AlphaThickSegmentComputer
203
204 /**
205 * Default style for the bounding box mode.
206 */
207 struct DefaultDrawStyleBB_AlphaThickSegmentComputer : public DrawableWithBoard2D
208 {
209 /**
210 * Draw the AlphaThickSegmentComputer on a board
211 * @param aBoard the output board where the object is drawn.
212 */
213 virtual void setStyle(Board2D & aBoard) const
214 {
215 // Set board style
216 aBoard.setLineStyle(Board2D::Shape::SolidStyle);
217 aBoard.setPenColor(Color::Red);
218 aBoard.setLineWidth(5);
219 aBoard.setFillColor(Color::None);
220 }
221 };
222
223 /**
224 * Default style for the points mode.
225 */
226 struct DefaultDrawStylePoints_AlphaThickSegmentComputer : public DrawableWithBoard2D
227 {
228 /**
229 * Draw the AlphaThickSegmentComputer on a board
230 * @param aBoard the output board where the object is drawn.
231 */
232 virtual void setStyle(Board2D & aBoard) const
233 {
234 // Set board style
235 aBoard.setLineStyle(Board2D::Shape::SolidStyle);
236 aBoard.setPenColor(Color::Black);
237 aBoard.setLineWidth(2);
238 aBoard.setFillColor(Color::None);
239 }
240 };
241
242 // AlphaThickSegmentComputer
243
244
245 // DigitalSetBySTLSet
246 /**
247 * Default style.
248 */
249 struct DefaultDrawStyle_DigitalSetBySTLSet : public DrawableWithBoard2D
250 {
251 virtual void setStyle(Board2D & aBoard) const
252 {
253 aBoard.setLineStyle(Board2D::Shape::SolidStyle);
254 aBoard.setFillColorRGBi(160,160,160);
255 aBoard.setPenColorRGBi(80,80,80);
256 }
257 };
258 // DigitalSetBySTLSet
259
260 // DigitalSetByAssociativeContainer
261 /**
262 * Default style.
263 */
264 struct DefaultDrawStyle_DigitalSetByAssociativeContainer : public DrawableWithBoard2D
265 {
266 virtual void setStyle(Board2D & aBoard) const
267 {
268 aBoard.setLineStyle(Board2D::Shape::SolidStyle);
269 aBoard.setFillColorRGBi(160,160,160);
270 aBoard.setPenColorRGBi(80,80,80);
271 }
272 };
273 // DigitalSetByAssociativeContainer
274
275
276 // DigitalSetBySTLVector
277 /**
278 * Default style.
279 */
280 struct DefaultDrawStyle_DigitalSetBySTLVector : public DrawableWithBoard2D
281 {
282 virtual void setStyle(Board2D & aBoard) const
283 {
284 aBoard.setLineWidth(1);
285 aBoard.setLineStyle(Board2D::Shape::SolidStyle);
286 aBoard.setFillColorRGBi(160,160,160);
287 aBoard.setPenColorRGBi(80,80,80);
288 }
289 };
290 // DigitalSetBySTLVector
291
292
293 // FP
294 /**
295 * Default style.
296 */
297 struct DefaultDrawStyle_FP : public DrawableWithBoard2D
298 {
299 /**
300 * Drawing method.
301 * @param aBoard the output board where the object is drawn.
302 */
303 virtual void setStyle(Board2D & aBoard) const
304 {
305 // Set board style
306 aBoard.setLineStyle(Board2D::Shape::SolidStyle);
307 aBoard.setPenColor(Color::Red);
308 aBoard.setLineWidth(2);
309 aBoard.setFillColor(Color::None);
310 }
311 };
312 // FP
313
314
315 // FreemanChain
316 struct DefaultDrawStyleGrid_FreemanChain : public DrawableWithBoard2D
317 {
318 virtual void setStyle( Board2D & aBoard ) const
319 {
320 aBoard.setLineStyle (LibBoard::Shape::SolidStyle );
321 aBoard.setFillColor(Color::None);
322 }
323 };
324
325 struct DefaultDrawStyleInterGrid_FreemanChain : public DrawableWithBoard2D
326 {
327 virtual void setStyle( Board2D & aBoard ) const
328 {
329 aBoard.setLineStyle (LibBoard::Shape::SolidStyle );
330 aBoard.setFillColor(Color::None);
331 }
332 };
333 // FreemanChain
334
335
336 // StabbingLineComputer
337 /**
338 * Default drawing style for StabbingLineComputer.
339 */
340 struct DefaultDrawStyle_StabbingLineComputer : public DrawableWithBoard2D
341 {
342 /**
343 * Draw the StabbingLineComputer on a board
344 * @param aBoard the output board where the object is drawn.
345 */
346 virtual void setStyle(Board2D & aBoard) const
347 {
348 aBoard.setLineStyle(Board2D::Shape::SolidStyle);
349 aBoard.setPenColor(Color::Red);
350 aBoard.setLineWidth(1.5);
351 aBoard.setFillColor(Color::None);
352 }
353 };
354 // StabbingLineComputer
355
356 //StabbingCircleComputer
357 /**
358 * Default drawing style for StabbingCircleComputer.
359 */
360 struct DefaultDrawStyle_StabbingCircleComputer : public DrawableWithBoard2D
361 {
362 /**
363 * Draw the StabbingCircleComputer on a board
364 * @param aBoard the output board where the object is drawn.
365 */
366 virtual void setStyle(Board2D & aBoard) const
367 {
368 aBoard.setLineStyle(Board2D::Shape::SolidStyle);
369 aBoard.setPenColor(Color::Red);
370 aBoard.setLineWidth(1.5);
371 aBoard.setFillColor(Color::None);
372 }
373 };
374 // StabbingCircleComputer
375
376
377 //FrechetShortcut
378 /**
379 * Default drawing style for FrechetShortcut.
380 */
381 struct DefaultDrawStyle_FrechetShortcut : public DrawableWithBoard2D
382 {
383 /**
384 * Draw the FrechetShortcut on a board
385 * @param aBoard the output board where the object is drawn.
386 */
387 virtual void setStyle(Board2D & aBoard) const
388 {
389 aBoard.setLineStyle(Board2D::Shape::SolidStyle);
390 aBoard.setPenColor(Color::Red);
391 aBoard.setLineWidth(1.5);
392 aBoard.setFillColor(Color::None);
393 }
394 };
395
396 //FrechetShortcut
397
398 // GridCurve
399 // we use friend because of inner classes
400 // GridCurve
401
402
403 // HyperRectDomain
404 /**
405 * Default style.
406 */
407 struct DefaultDrawStylePaving_HyperRectDomain : public DrawableWithBoard2D
408 {
409 virtual void setStyle(Board2D & aBoard) const
410 {
411 aBoard.setPenColorRGBi(160, 160, 160);
412 aBoard.setFillColorRGBi(255, 255, 255);
413 aBoard.setLineStyle(Board2D::Shape::SolidStyle);
414 aBoard.setLineWidth( 1 );
415 }
416 };
417
418 /**
419 * Default style.aultDrawStyleTransparent_LatticePol
420 */
421 struct DefaultDrawStyleGrid_HyperRectDomain : public DrawableWithBoard2D
422 {
423 virtual void setStyle(Board2D & aBoard) const
424 {
425 aBoard.setPenColorRGBi(160, 160, 160);
426 aBoard.setFillColorRGBi(160, 160, 160);
427 aBoard.setLineStyle(Board2D::Shape::DashStyle);
428 aBoard.setLineWidth( 1 );
429 }
430 };
431 // HyperRectDomain
432
433
434 // ImageContainerByHashTree
435 struct DefaultDrawStyle_ImageContainerByHashTree : public DrawableWithBoard2D
436 {
437 virtual void setStyle(Board2D & aboard) const
438 {
439 aboard.setPenColorRGBi(60, 60, 60);
440 aboard.setLineStyle(Board2D::Shape::SolidStyle);
441 }
442 };
443 // ImageContainerByHashTreeaultDrawStyleTransparent_LatticePol
444
445
446 // ImageContainerBySTLVector
447 /**
448 * Default style.
449 */
450 struct DefaultDrawStyle_ImageContainerBySTLVector : public DrawableWithBoard2D
451 {
452 virtual void setStyle( Board2D & aBoard ) const
453 {
454 aBoard.setPenColorRGBi(60, 60, 60);
455 aBoard.setLineStyle(Board2D::Shape::SolidStyle);
456 }
457 };
458 // ImageContainerBySTLVector
459
460
461 // KhalimskyCellaultDrawStyleTransparent_LatticePol
462 /**
463 * Default style.
464 */
465 struct DefaultDrawStyle_KhalimskyCell : public DrawableWithBoard2D
466 {
467 virtual void setStyle( Board2D & aBoard ) const
468 {
469 aBoard.setPenColorRGBi( 50, 50, 50 );
470 aBoard.setLineStyle( Board2D::Shape::SolidStyle );
471 aBoard.setFillColorRGBi( 80, 80, 80 );
472 aBoard.setLineWidth( 1 );
473 }
474 };
475 // KhalimskyCell
476
477
478 // Object
479 /**
480 * Default style.
481 */
482 struct DefaultDrawStyle_Object : public DrawableWithBoard2D
483 {
484 virtual void setStyle(Board2D & aBoard) const
485 {
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);
491 }
492 };
493 // Object
494
495 // CubicalComplex
496 /**
497 * Default style for CubicalComplex.
498 */
499 struct DefaultDrawStyle_CubicalComplex : public DrawableWithBoard2D
500 {
501 virtual void setStyle(Board2D & aBoard) const
502 {
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);
508 }
509 };
510 // CubicalComplex
511
512
513 // PointVector
514 /**
515 * Default styles.
516 */
517 struct DefaultDrawStylePaving_PointVector : public DrawableWithBoard2D
518 {
519 virtual void setStyle( Board2D & aBoard ) const
520 {
521 aBoard.setPenColorRGBi(160,160,160);
522 aBoard.setLineStyle( Board2D::Shape::SolidStyle );
523 aBoard.setFillColorRGBi(220,220,220);
524 aBoard.setLineWidth(1);
525 }
526 };
527
528 /**
529 * Style based in grid representation.
530 */
531 struct DefaultDrawStyleGrid_PointVector : public DrawableWithBoard2D
532 {
533 virtual void setStyle( Board2D & aBoard ) const
534 {
535 aBoard.setPenColor(Color::Black);
536 aBoard.setLineStyle( Board2D::Shape::SolidStyle );
537 }
538 };
539 // PointVector
540
541
542 // Preimage2D
543 // Preimage2D
544
545
546 // SignedKhalimskyCell
547 /**
548 * Default style.
549 */
550 struct DefaultDrawStyle_SignedKhalimskyCell : public DrawableWithBoard2D
551 {
552 virtual void setStyle( Board2D & aBoard ) const
553 {
554 aBoard.setPenColorRGBi( 50, 50, 50 );
555 aBoard.setLineStyle( Board2D::Shape::SolidStyle );
556 aBoard.setFillColorRGBi( 80, 80, 80 );
557 aBoard.setLineWidth( 1 );
558 }
559 };
560 // SignedKhalimskyCell
561
562 // LatticePolytope2D
563 struct DefaultDrawStyleFilled_LatticePolytope2D : public DrawableWithBoard2D
564 {
565 virtual void setStyle( Board2D & aBoard ) const
566 {
567 aBoard.setPenColorRGBi( 30, 30, 30 );
568 aBoard.setLineStyle( Board2D::Shape::SolidStyle );
569 aBoard.setFillColorRGBi( 200, 200, 200 );
570 aBoard.setLineWidth( 2 );
571 }
572 };
573 struct DefaultDrawStyleTransparent_LatticePolytope2D : public DrawableWithBoard2D
574 {
575 virtual void setStyle( Board2D & aBoard ) const
576 {
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 );
581 }
582 };
583 // LatticePolytope2D
584
585
586 // StraightLineFrom2Points
587 // StraightLineFrom2Points
588
589
590}
591
592
593//
594
595// DiscreteExteriorCalculus
596template <DGtal::Dimension dimEmbedded, DGtal::Dimension dimAmbient, typename TLinearAlgebraBackend, typename TInteger>
597inline
598DGtal::DrawableWithBoard2D* defaultStyle(const DGtal::DiscreteExteriorCalculus<dimEmbedded, dimAmbient, TLinearAlgebraBackend, TInteger>& /*object*/, std::string /*mode*/ = "" )
599{
600 return new DGtal::CalculusStyle2D();
601}
602// DiscreteExteriorCalculus
603
604// KForm
605template <typename TCalculus, DGtal::Order order, DGtal::Duality duality>
606inline
607DGtal::DrawableWithBoard2D* defaultStyle(const DGtal::KForm<TCalculus, order, duality>& object, std::string mode = "" )
608{
609 boost::ignore_unused_variable_warning( mode );
610 boost::ignore_unused_variable_warning( object );
611 return new DGtal::KFormStyle2D();
612}
613// KForm
614
615// VectorField
616template <typename TCalculus, DGtal::Duality duality>
617inline
618DGtal::DrawableWithBoard2D* defaultStyle(const DGtal::VectorField<TCalculus, duality>& /*object*/, std::string /*mode*/ = "" )
619{
620 return new DGtal::VectorFieldStyle2D();
621}
622// VectorField
623
624// AngleLinearMinimizer
625inline
626DGtal::DrawableWithBoard2D* defaultStyle(const DGtal::AngleLinearMinimizer & /*a*/, std::string mode = "" )
627{
628 boost::ignore_unused_variable_warning(mode);
629 //only one style actually...
630 return new DGtal::DefaultDrawStyleCircular_AngleLinearMinimizer;
631}
632// AngleLinearMinimizer
633
634// ArithmeticalDSS
635template <typename TCoordinate, typename TInteger, unsigned short adjacency>
636inline
637DGtal::DrawableWithBoard2D* defaultStyle(const DGtal::ArithmeticalDSS<TCoordinate,TInteger,adjacency> & /*a*/, std::string mode = "" )
638{
639 if ( ( mode == "" ) || ( mode == "BoundingBox" ) )
640 return new DGtal::DefaultDrawStyleBB_ArithmeticalDSS;
641 else // mode == "Points"
642 return new DGtal::DefaultDrawStylePoints_ArithmeticalDSS;
643}
644// ArithmeticalDSS
645
646// ArithmeticalDSSComputer
647template <typename TIterator, typename TInteger, int connectivity>
648inline
649DGtal::DrawableWithBoard2D* defaultStyle(const DGtal::ArithmeticalDSSComputer<TIterator,TInteger,connectivity> & /*a*/, std::string mode = "" )
650{
651 if ( ( mode == "" ) || ( mode == "BoundingBox" ) )
652 return new DGtal::DefaultDrawStyleBB_ArithmeticalDSSComputer;
653 else // mode == "Points"
654 return new DGtal::DefaultDrawStylePoints_ArithmeticalDSSComputer;
655}
656// ArithmeticalDSSComputer
657
658
659// AlphaThickSegmentComputer
660template <typename TInputPoint, typename TConstIterator>
661inline
662DGtal::DrawableWithBoard2D* defaultStyle(const DGtal::AlphaThickSegmentComputer< TInputPoint, TConstIterator> & /*a*/, std::string mode = "" )
663{
664 if ( ( mode == "" ) || ( mode == "BoundingBox" ) )
665 return new DGtal::DefaultDrawStyleBB_AlphaThickSegmentComputer;
666 else // mode == "Points"
667 return new DGtal::DefaultDrawStylePoints_AlphaThickSegmentComputer;
668}
669// AlphaThickSegmentComputer
670
671
672// CircleFrom2Points
673template <typename TPoint>
674inline
675DGtal::DrawableWithBoard2D* defaultStyle(const DGtal::CircleFrom2Points<TPoint> & /*cf2p*/, std::string mode = "" )
676{
677 boost::ignore_unused_variable_warning(mode);
678 return new DGtal::DrawableWithBoard2D;
679}
680// CircleFrom2Points
681
682
683// CircleFrom3Points
684template <typename TPoint>
685inline
686DGtal::DrawableWithBoard2D* defaultStyle(const DGtal::CircleFrom3Points<TPoint> & /*cf3p*/, std::string mode = "" )
687{
688 boost::ignore_unused_variable_warning(mode);
689 return new DGtal::DrawableWithBoard2D;
690}
691// CircleFrom3Points
692
693
694// DigitalSetBySTLSet
695template<typename Domain, typename Compare>
696inline
697DGtal::DrawableWithBoard2D* defaultStyle(const DGtal::DigitalSetBySTLSet<Domain, Compare> & /*s*/, std::string mode = "" )
698{
699 boost::ignore_unused_variable_warning(mode);
700 return new DGtal::DefaultDrawStyle_DigitalSetBySTLSet;
701}
702// DigitalSetBySTLSet
703
704// DigitalSetByAssociativeContainer
705template<typename Domain, typename Container>
706inline
707DGtal::DrawableWithBoard2D* defaultStyle(const DGtal::DigitalSetByAssociativeContainer<Domain, Container> & /*s*/,
708 std::string mode = "" )
709{
710 boost::ignore_unused_variable_warning(mode);
711 return new DGtal::DefaultDrawStyle_DigitalSetByAssociativeContainer;
712}
713// DigitalSetBySTLSet
714
715// DigitalSetBySTLVector
716template<typename Domain>
717inline
718DGtal::DrawableWithBoard2D* defaultStyle(const DGtal::DigitalSetBySTLVector<Domain> & /*v*/, std::string mode = "" )
719{
720 boost::ignore_unused_variable_warning(mode);
721 return new DGtal::DefaultDrawStyle_DigitalSetBySTLVector;
722}
723// DigitalSetBySTLVector
724
725
726// FP
727template <typename TIterator, typename TInteger, int connectivity>
728inline
729DGtal::DrawableWithBoard2D* defaultStyle(const DGtal::FP<TIterator,TInteger,connectivity> & /*fp*/,
730 std::string mode = "" )
731{
732 boost::ignore_unused_variable_warning( mode );
733 return new DGtal::DefaultDrawStyle_FP;
734}
735// FP
736
737
738// FreemanChain
739template <typename TInteger>
740inline
741DGtal::DrawableWithBoard2D* defaultStyle(const DGtal::FreemanChain<TInteger> & /*f*/,
742 std::string mode = "" )
743{
744 if ( ( mode == "" ) || ( mode == "Grid" ) )
745 return new DGtal::DefaultDrawStyleGrid_FreemanChain;
746 else
747 return new DGtal::DefaultDrawStyleInterGrid_FreemanChain;
748}
749// FreemanChain
750
751
752// StabbingLineComputer
753template <typename TConstIterator>
754inline
755DGtal::DrawableWithBoard2D* defaultStyle(const DGtal::StabbingLineComputer<TConstIterator> & /*g*/,
756 std::string mode = "" )
757{
758 boost::ignore_unused_variable_warning(mode);
759 return new DGtal::DefaultDrawStyle_StabbingLineComputer;
760}
761// StabbingLineComputer
762
763// StabbingCircleComputer
764template <typename TConstIterator>
765inline
766DGtal::DrawableWithBoard2D* defaultStyle(const DGtal::StabbingCircleComputer<TConstIterator> & /*g*/,
767 std::string mode = "" )
768{
769 boost::ignore_unused_variable_warning(mode);
770 return new DGtal::DefaultDrawStyle_StabbingCircleComputer;
771}
772// StabbingCircleComputer
773
774// // FrechetShortcut
775template <typename TIterator, typename TInteger>
776inline
777DGtal::DrawableWithBoard2D* defaultStyle(const DGtal::FrechetShortcut<TIterator,TInteger> & /*f*/, std::string mode = "" )
778{
779 boost::ignore_unused_variable_warning(mode);
780 return new DGtal::DefaultDrawStyle_FrechetShortcut;
781}
782// // FrechetShortcut
783
784
785
786// GridCurve
787template <typename TKSpace>
788DGtal::DrawableWithBoard2D*
789defaultStyle(const DGtal::GridCurve<TKSpace> & /*object*/,
790 std::string mode = "" )
791{
792 boost::ignore_unused_variable_warning(mode);
793 return new DGtal::DrawableWithBoard2D;
794}
795// GridCurve
796
797// SCellsRange
798template <typename TIterator, typename TSCell>
799DGtal::DrawableWithBoard2D*
800defaultStyle(const DGtal::ConstRangeAdapter<TIterator, DGtal::functors::Identity, TSCell> & /*object*/,
801 std::string mode = "" )
802{
803 boost::ignore_unused_variable_warning(mode);
804 return new DGtal::DrawableWithBoard2D;
805}
806// SCellsRange
807
808// PointsRange
809template <typename TIterator, typename TKSpace>
810DGtal::DrawableWithBoard2D*
811defaultStyle(const DGtal::ConstRangeAdapter<TIterator, DGtal::functors::SCellToPoint<TKSpace>, typename TKSpace::Point> & /*object*/,
812 std::string mode = "" )
813{
814 boost::ignore_unused_variable_warning(mode);
815 return new DGtal::DrawableWithBoard2D;
816}
817// PointsRange
818
819// MidPointsRange
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 = "" )
825{
826 boost::ignore_unused_variable_warning( mode );
827 return new DGtal::DrawableWithBoard2D;
828}
829// MidPointsRange
830
831// ArrowsRange
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 = "" )
837{
838 boost::ignore_unused_variable_warning(mode);
839 return new DGtal::DrawableWithBoard2D;
840}
841// ArrowsRange
842
843// InnerPointsRange
844template <typename TIterator, typename TKSpace>
845DGtal::DrawableWithBoard2D*
846defaultStyle(const DGtal::ConstRangeAdapter<TIterator, DGtal::functors::SCellToInnerPoint<TKSpace>, typename TKSpace::Point> & /*object*/,
847 std::string mode = "" )
848{
849 boost::ignore_unused_variable_warning(mode);
850 return new DGtal::DrawableWithBoard2D;
851}
852// InnerPointsRange
853
854// OuterPointsRange
855template <typename TIterator, typename TKSpace>
856DGtal::DrawableWithBoard2D*
857defaultStyle(const DGtal::ConstRangeAdapter<TIterator, DGtal::functors::SCellToOuterPoint<TKSpace>, typename TKSpace::Point> & /*object*/,
858 std::string mode = "" )
859{
860 boost::ignore_unused_variable_warning( mode );
861 return new DGtal::DrawableWithBoard2D;
862}
863// OuterPointsRange
864
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 = "" )
871{
872 boost::ignore_unused_variable_warning(mode);
873 return new DGtal::DrawableWithBoard2D;
874}
875// IncidentPointsRange
876
877// HyperRectDomain
878template<typename TSpace>
879inline
880DGtal::DrawableWithBoard2D* defaultStyle(const DGtal::HyperRectDomain<TSpace> & /*h*/, std::string mode = "" )
881{
882 if ( ( mode == "" ) || ( mode == "Both" ) || ( mode == "Grid" ) )
883 return new DGtal::DefaultDrawStyleGrid_HyperRectDomain;
884 else // mode == "Paving"
885 return new DGtal::DefaultDrawStylePaving_HyperRectDomain;
886}
887// HyperRectDomain
888
889
890// ImageContainerByHashTree
891template <typename Domain, typename Value, typename HashKey >
892inline
893DGtal::DrawableWithBoard2D* defaultStyle(const DGtal::experimental::ImageContainerByHashTree<Domain, Value, HashKey > & /*icbht*/, std::string mode = "" )
894{
895 boost::ignore_unused_variable_warning(mode);
896 return new DGtal::DefaultDrawStyle_ImageContainerByHashTree;
897}
898// ImageContainerByHashTree
899
900
901// ImageContainerBySTLVector
902template <typename D, typename V>
903inline
904DGtal::DrawableWithBoard2D* defaultStyle(const DGtal::ImageContainerBySTLVector<D, V> & /*icbsv*/, std::string mode = "" )
905{
906 boost::ignore_unused_variable_warning( mode );
907 return new DGtal::DefaultDrawStyle_ImageContainerBySTLVector;
908}
909// ImageContainerBySTLVector
910
911
912// KhalimskyCell
913template < DGtal::Dimension dim, typename TInteger >
914inline
915DGtal::DrawableWithBoard2D* defaultStyle(const DGtal::KhalimskyCell<dim, TInteger> & /*k*/, std::string mode = "" )
916{
917 boost::ignore_unused_variable_warning(mode);
918 return new DGtal::DefaultDrawStyle_KhalimskyCell;
919}
920// KhalimskyCell
921
922// KhalimskyPreCell
923template < DGtal::Dimension dim, typename TInteger >
924inline
925DGtal::DrawableWithBoard2D* defaultStyle(const DGtal::KhalimskyPreCell<dim, TInteger> & /*k*/, std::string mode = "" )
926{
927 boost::ignore_unused_variable_warning(mode);
928 return new DGtal::DefaultDrawStyle_KhalimskyCell;
929}
930// KhalimskyPreCell
931
932// Object
933template <typename TDigitalTopology, typename TDigitalSet>
934inline
935DGtal::DrawableWithBoard2D* defaultStyle(const DGtal::Object<TDigitalTopology, TDigitalSet> & /*o*/, std::string mode = "" )
936{
937 boost::ignore_unused_variable_warning(mode);
938 return new DGtal::DefaultDrawStyle_Object;
939}
940// Object
941
942// CubicalComplex
943template < typename TKSpace,
944 typename TCellContainer >
945inline
946DGtal::DrawableWithBoard2D* defaultStyle(const DGtal::CubicalComplex<TKSpace, TCellContainer> & /*o*/, std::string mode = "" )
947{
948 boost::ignore_unused_variable_warning(mode);
949 return new DGtal::DefaultDrawStyle_CubicalComplex;
950}
951// CubicalComplex
952
953
954// PointVector
955template<DGtal::Dimension dim, typename TComponent, typename TContainer>
956inline
957DGtal::DrawableWithBoard2D* defaultStyle(const DGtal::PointVector<dim, TComponent, TContainer> & /*p*/, std::string mode = "")
958{
959 if ( ( mode == "" ) || ( mode == "Paving" ) )
960 return new DGtal::DefaultDrawStylePaving_PointVector;
961 else // mode == "Grid"
962 return new DGtal::DefaultDrawStyleGrid_PointVector;
963}
964// PointVector
965
966
967// Preimage2D
968template <typename Shape>
969inline
970DGtal::DrawableWithBoard2D* defaultStyle(const DGtal::Preimage2D<Shape> & /*p*/, std::string mode = "")
971{
972 boost::ignore_unused_variable_warning(mode);
973 return new DGtal::DrawableWithBoard2D;
974}
975// Preimage2D
976
977
978// SignedKhalimskyCell
979template < DGtal::Dimension dim, typename TInteger >
980inline
981DGtal::DrawableWithBoard2D* defaultStyle(const DGtal::SignedKhalimskyCell<dim, TInteger> & /*sk*/, std::string mode = "" )
982{
983 boost::ignore_unused_variable_warning( mode );
984 return new DGtal::DefaultDrawStyle_SignedKhalimskyCell;
985}
986// SignedKhalimskyCell
987
988// SignedKhalimskyPreCell
989template < DGtal::Dimension dim, typename TInteger >
990inline
991DGtal::DrawableWithBoard2D* defaultStyle(const DGtal::SignedKhalimskyPreCell<dim, TInteger> & /*sk*/, std::string mode = "" )
992{
993 boost::ignore_unused_variable_warning( mode );
994 return new DGtal::DefaultDrawStyle_SignedKhalimskyCell;
995}
996// SignedKhalimskyOreCell
997
998// StraightLineFrom2Points
999template <typename TPoint>
1000inline
1001DGtal::DrawableWithBoard2D* defaultStyle(const DGtal::StraightLineFrom2Points<TPoint> & /*slf2p*/, std::string mode = "" )
1002{
1003 boost::ignore_unused_variable_warning( mode );
1004 return new DGtal::DrawableWithBoard2D;
1005}
1006// StraightLineFrom2Points
1007
1008// LatticePolytope2D
1009template < typename TSpace, typename TSequence>
1010inline
1011DGtal::DrawableWithBoard2D*
1012defaultStyle( const DGtal::LatticePolytope2D<TSpace,TSequence> & /*cip*/,
1013 std::string mode = "" )
1014{
1015 if ( ( mode == "" ) || ( mode == "Transparent" ) )
1016 return new DGtal::DefaultDrawStyleTransparent_LatticePolytope2D;
1017 else // "Filled"
1018 return new DGtal::DefaultDrawStyleFilled_LatticePolytope2D;
1019}
1020// LatticePolytope2D
1021
1022//
1023
1024
1025inline
1026DGtal::DrawableWithBoard2D* defaultStyle(const DGtal::CustomStyle & /*cs*/, std::string mode = "" )
1027{
1028 boost::ignore_unused_variable_warning( mode );
1029 return 0;
1030}
1031
1032inline
1033DGtal::DrawableWithBoard2D* defaultStyle(const DGtal::SetMode & /*sm*/, std::string mode = "" )
1034{
1035 boost::ignore_unused_variable_warning( mode );
1036 return 0;
1037}
1038
1039
1040// //
1041///////////////////////////////////////////////////////////////////////////////
1042
1043