DGtal 2.1.0
|
Aim: This class is used to simplify shape and surface creation. With it, you can create new shapes and surface with few lines of code. The drawback is that you use specific types or objects, which could lead to faster code or more compact data structures. More...
#include <DGtal/helpers/Shortcuts.h>
Data Structures | |
struct | CellReader |
struct | CellWriter |
struct | is_double_nested_container |
struct | is_double_nested_container< C< D< T > > > |
struct | SCellReader |
struct | SCellWriter |
struct | ValueReader |
struct | ValueWriter |
Public Types | |
typedef TKSpace | KSpace |
Digital cellular space. | |
typedef KSpace::Space | Space |
Digital space. | |
typedef Space::Integer | Integer |
Integer numbers. | |
typedef Space::Point | Point |
Point with integer coordinates. | |
typedef Space::Vector | Vector |
Vector with integer coordinates. | |
typedef Space::RealVector | RealVector |
Vector with floating-point coordinates. | |
typedef Space::RealPoint | RealPoint |
Point with floating-point coordinates. | |
typedef RealVector::Component | Scalar |
Floating-point numbers. | |
typedef HyperRectDomain< Space > | Domain |
An (hyper-)rectangular domain. | |
typedef unsigned char | GrayScale |
The type for 8-bits gray-scale elements. | |
typedef MPolynomial< Space::dimension, Scalar > | ScalarPolynomial |
defines a multi-variate polynomial : RealPoint -> Scalar | |
typedef ImplicitPolynomial3Shape< Space > | ImplicitShape3D |
typedef GaussDigitizer< Space, ImplicitShape3D > | DigitizedImplicitShape3D |
defines the digitization of an implicit shape. | |
typedef ImageContainerBySTLVector< Domain, bool > | BinaryImage |
defines a black and white image with (hyper-)rectangular domain. | |
typedef ImageContainerBySTLVector< Domain, GrayScale > | GrayScaleImage |
defines a grey-level image with (hyper-)rectangular domain. | |
typedef ImageContainerBySTLVector< Domain, float > | FloatImage |
defines a float image with (hyper-)rectangular domain. | |
typedef ImageContainerBySTLVector< Domain, double > | DoubleImage |
defines a double image with (hyper-)rectangular domain. | |
typedef KSpace::SurfelSet | SurfelSet |
defines a set of surfels | |
typedef LightImplicitDigitalSurface< KSpace, BinaryImage > | LightSurfaceContainer |
typedef ::DGtal::DigitalSurface< LightSurfaceContainer > | LightDigitalSurface |
defines a connected digital surface over a binary image. | |
typedef SetOfSurfels< KSpace, SurfelSet > | ExplicitSurfaceContainer |
defines a heavy container that represents any digital surface. | |
typedef ::DGtal::DigitalSurface< ExplicitSurfaceContainer > | DigitalSurface |
defines an arbitrary digital surface over a binary image. | |
typedef IndexedDigitalSurface< ExplicitSurfaceContainer > | IdxDigitalSurface |
defines a connected or not indexed digital surface. | |
typedef LightDigitalSurface::Surfel | Surfel |
typedef LightDigitalSurface::Cell | Cell |
typedef LightDigitalSurface::SCell | SCell |
typedef LightDigitalSurface::Vertex | Vertex |
typedef LightDigitalSurface::Arc | Arc |
typedef LightDigitalSurface::Face | Face |
typedef LightDigitalSurface::ArcRange | ArcRange |
typedef IdxDigitalSurface::Vertex | IdxSurfel |
typedef IdxDigitalSurface::Vertex | IdxVertex |
typedef IdxDigitalSurface::Arc | IdxArc |
typedef IdxDigitalSurface::ArcRange | IdxArcRange |
typedef std::set< IdxSurfel > | IdxSurfelSet |
typedef std::vector< SCell > | SCellRange |
typedef std::vector< Cell > | CellRange |
typedef CellRange | PointelRange |
typedef SCellRange | SurfelRange |
typedef std::vector< IdxSurfel > | IdxSurfelRange |
typedef std::vector< Scalar > | Scalars |
typedef std::vector< RealVector > | RealVectors |
typedef std::vector< RealPoint > | RealPoints |
typedef IdxVertex | Idx |
typedef std::vector< IdxVertex > | IdxRange |
typedef ::DGtal::Mesh< RealPoint > | Mesh |
typedef ::DGtal::TriangulatedSurface< RealPoint > | TriangulatedSurface |
typedef ::DGtal::PolygonalSurface< RealPoint > | PolygonalSurface |
typedef ::DGtal::SurfaceMesh< RealPoint, RealPoint > | SurfaceMesh |
typedef std::map< Surfel, IdxSurfel > | Surfel2Index |
typedef std::map< Cell, IdxVertex > | Cell2Index |
typedef ::DGtal::Color | Color |
typedef std::vector< Color > | Colors |
typedef GradientColorMap< Scalar > | ColorMap |
typedef TickedColorMap< Scalar, ColorMap > | ZeroTickedColorMap |
Public Member Functions | |
Shortcuts ()=delete | |
~Shortcuts ()=delete | |
Shortcuts (const Shortcuts &other)=delete | |
Shortcuts (Shortcuts &&other)=delete | |
Shortcuts & | operator= (const Shortcuts &other)=delete |
Shortcuts & | operator= (Shortcuts &&other)=delete |
void | selfDisplay (std::ostream &out) const |
bool | isValid () const |
Static Public Member Functions | |
static Parameters | defaultParameters () |
static std::map< std::string, std::string > | getPolynomialList () |
static Parameters | parametersImplicitShape3D () |
static CountedPtr< ImplicitShape3D > | makeImplicitShape3D (const Parameters ¶ms=parametersImplicitShape3D()) |
static Parameters | parametersKSpace () |
static KSpace | getKSpace (const Point &low, const Point &up, Parameters params=parametersKSpace()) |
static KSpace | getKSpace (CountedPtr< BinaryImage > bimage, Parameters params=parametersKSpace()) |
static KSpace | getKSpace (CountedPtr< GrayScaleImage > gimage, Parameters params=parametersKSpace()) |
template<typename TDigitalSurfaceContainer > | |
static KSpace | getKSpace (CountedPtr< ::DGtal::DigitalSurface< TDigitalSurfaceContainer > > surface) |
template<typename TDigitalSurfaceContainer > | |
static KSpace | getKSpace (CountedPtr< ::DGtal::IndexedDigitalSurface< TDigitalSurfaceContainer > > surface) |
template<typename TDigitalSurfaceContainer > | |
static const KSpace & | refKSpace (CountedPtr< ::DGtal::DigitalSurface< TDigitalSurfaceContainer > > surface) |
template<typename TDigitalSurfaceContainer > | |
static const KSpace & | refKSpace (CountedPtr< ::DGtal::IndexedDigitalSurface< TDigitalSurfaceContainer > > surface) |
static CanonicCellEmbedder< KSpace > | getCellEmbedder (const KSpace &K) |
static CanonicSCellEmbedder< KSpace > | getSCellEmbedder (const KSpace &K) |
static Parameters | parametersDigitizedImplicitShape3D () |
static KSpace | getKSpace (Parameters params=parametersKSpace()|parametersDigitizedImplicitShape3D()) |
static CountedPtr< DigitizedImplicitShape3D > | makeDigitizedImplicitShape3D (CountedPtr< ImplicitShape3D > shape, Parameters params=parametersDigitizedImplicitShape3D()) |
static Parameters | parametersBinaryImage () |
static CountedPtr< BinaryImage > | makeBinaryImage (Domain shapeDomain) |
static CountedPtr< BinaryImage > | makeBinaryImage (CountedPtr< DigitizedImplicitShape3D > shape_digitization, Parameters params=parametersBinaryImage()) |
static CountedPtr< BinaryImage > | makeBinaryImage (CountedPtr< DigitizedImplicitShape3D > shape_digitization, Domain shapeDomain, Parameters params=parametersBinaryImage()) |
static CountedPtr< BinaryImage > | makeBinaryImage (CountedPtr< BinaryImage > bimage, Parameters params=parametersBinaryImage()) |
static CountedPtr< BinaryImage > | makeBinaryImage (std::string input, Parameters params=parametersBinaryImage()) |
template<typename T , typename __U = std::enable_if_t<std::is_arithmetic_v<T>>> | |
static CountedPtr< BinaryImage > | makeBinaryImage (const std::vector< T > &values, const Domain &d) |
template<typename T , template< class... > class C1, template< class... > class C2, template< class... > class C3> | |
static CountedPtr< BinaryImage > | makeBinaryImage (const C1< C2< C3< T > > > &values, std::optional< Domain > override_domain=std::nullopt) |
template<typename T , std::enable_if_t<!is_double_nested_container< T >::value, int > = 0> | |
static CountedPtr< BinaryImage > | makeBinaryImage (const std::vector< T > &positions, std::optional< Domain > override_domain=std::nullopt) |
static CountedPtr< BinaryImage > | makeBinaryImage (CountedPtr< GrayScaleImage > gray_scale_image, Parameters params=parametersBinaryImage()) |
static bool | saveBinaryImage (CountedPtr< BinaryImage > bimage, std::string output) |
static Parameters | parametersGrayScaleImage () |
static CountedPtr< GrayScaleImage > | makeGrayScaleImage (Domain aDomain) |
static CountedPtr< GrayScaleImage > | makeGrayScaleImage (std::string input) |
static CountedPtr< GrayScaleImage > | makeGrayScaleImage (CountedPtr< BinaryImage > binary_image, std::function< GrayScale(bool) > const &bool2grayscale=[](bool v) { return v ?(unsigned char) 255 :(unsigned char) 0;}) |
static bool | saveGrayScaleImage (CountedPtr< GrayScaleImage > gray_scale_image, std::string output) |
static CountedPtr< GrayScaleImage > | makeGrayScaleImage (CountedPtr< FloatImage > fimage, Parameters params=parametersGrayScaleImage()) |
static CountedPtr< GrayScaleImage > | makeGrayScaleImage (CountedPtr< DoubleImage > fimage, Parameters params=parametersGrayScaleImage()) |
template<typename T , typename __U = std::enable_if_t<std::is_arithmetic_v<T>>> | |
static CountedPtr< GrayScaleImage > | makeGrayScaleImage (const std::vector< T > &values, const Domain &d) |
template<typename T , template< class... > class C1, template< class... > class C2, template< class... > class C3> | |
static CountedPtr< GrayScaleImage > | makeGrayScaleImage (const C1< C2< C3< T > > > &values, std::optional< Domain > override_domain=std::nullopt) |
template<typename T , typename U , std::enable_if_t<!is_double_nested_container< T >::value, int > = 0> | |
static CountedPtr< GrayScaleImage > | makeGrayScaleImage (const std::vector< T > &positions, const std::vector< U > &values, std::optional< Domain > override_domain=std::nullopt) |
static CountedPtr< FloatImage > | makeFloatImage (Domain aDomain) |
static CountedPtr< FloatImage > | makeFloatImage (std::string input) |
static CountedPtr< FloatImage > | makeFloatImage (CountedPtr< ImplicitShape3D > shape, Parameters params=parametersDigitizedImplicitShape3D()) |
static CountedPtr< DoubleImage > | makeDoubleImage (Domain aDomain) |
static CountedPtr< DoubleImage > | makeDoubleImage (std::string input) |
static CountedPtr< DoubleImage > | makeDoubleImage (CountedPtr< ImplicitShape3D > shape, Parameters params=parametersDigitizedImplicitShape3D()) |
static Parameters | parametersDigitalSurface () |
template<typename TDigitalSurfaceContainer > | |
static CanonicCellEmbedder< KSpace > | getCellEmbedder (CountedPtr< ::DGtal::DigitalSurface< TDigitalSurfaceContainer > > surface) |
template<typename TDigitalSurfaceContainer > | |
static CanonicSCellEmbedder< KSpace > | getSCellEmbedder (CountedPtr< ::DGtal::DigitalSurface< TDigitalSurfaceContainer > > surface) |
template<typename TDigitalSurfaceContainer > | |
static CanonicCellEmbedder< KSpace > | getCellEmbedder (CountedPtr< ::DGtal::IndexedDigitalSurface< TDigitalSurfaceContainer > > surface) |
template<typename TDigitalSurfaceContainer > | |
static CanonicSCellEmbedder< KSpace > | getSCellEmbedder (CountedPtr< ::DGtal::IndexedDigitalSurface< TDigitalSurfaceContainer > > surface) |
static CountedPtr< LightDigitalSurface > | makeLightDigitalSurface (CountedPtr< BinaryImage > bimage, const KSpace &K, const Parameters ¶ms=parametersDigitalSurface()) |
static std::vector< CountedPtr< LightDigitalSurface > > | makeLightDigitalSurfaces (CountedPtr< BinaryImage > bimage, const KSpace &K, const Parameters ¶ms=parametersDigitalSurface()) |
static std::vector< CountedPtr< LightDigitalSurface > > | makeLightDigitalSurfaces (SurfelRange &surfel_reps, CountedPtr< BinaryImage > bimage, const KSpace &K, const Parameters ¶ms=parametersDigitalSurface()) |
template<typename TPointPredicate > | |
static CountedPtr< DigitalSurface > | makeDigitalSurface (CountedPtr< TPointPredicate > bimage, const KSpace &K, const Parameters ¶ms=parametersDigitalSurface()) |
static CountedPtr< DigitalSurface > | makeDigitalSurface (CountedPtr< IdxDigitalSurface > idx_surface, const Parameters ¶ms=parametersDigitalSurface()) |
static CountedPtr< IdxDigitalSurface > | makeIdxDigitalSurface (CountedPtr< BinaryImage > bimage, const KSpace &K, const Parameters ¶ms=parametersDigitalSurface()) |
template<typename TSurfelRange > | |
static CountedPtr< IdxDigitalSurface > | makeIdxDigitalSurface (const TSurfelRange &surfels, ConstAlias< KSpace > K, const Parameters ¶ms=parametersDigitalSurface()) |
template<typename TDigitalSurfaceContainer > | |
static CountedPtr< IdxDigitalSurface > | makeIdxDigitalSurface (CountedPtr< ::DGtal::DigitalSurface< TDigitalSurfaceContainer > > surface, const Parameters ¶ms=parametersDigitalSurface()) |
static CountedPtr< IdxDigitalSurface > | makeIdxDigitalSurface (const std::vector< CountedPtr< LightDigitalSurface > > &surfaces, const Parameters ¶ms=parametersDigitalSurface()) |
template<typename TDigitalSurfaceContainer > | |
static CellRange | getCellRange (Cell2Index &c2i, CountedPtr< ::DGtal::DigitalSurface< TDigitalSurfaceContainer > > surface, const Dimension k) |
template<typename TDigitalSurfaceContainer > | |
static PointelRange | getCellRange (CountedPtr< ::DGtal::DigitalSurface< TDigitalSurfaceContainer > > surface, const Dimension k) |
template<typename TDigitalSurfaceContainer > | |
static PointelRange | getPointelRange (Cell2Index &c2i, CountedPtr< ::DGtal::DigitalSurface< TDigitalSurfaceContainer > > surface) |
template<typename TDigitalSurfaceContainer > | |
static PointelRange | getPointelRange (CountedPtr< ::DGtal::DigitalSurface< TDigitalSurfaceContainer > > surface) |
static PointelRange | getPointelRange (const KSpace &K, const SCell &surfel) |
template<typename TDigitalSurfaceContainer > | |
static SurfelRange | getSurfelRange (CountedPtr< ::DGtal::DigitalSurface< TDigitalSurfaceContainer > > surface, const Parameters ¶ms=parametersDigitalSurface()) |
template<typename TDigitalSurfaceContainer > | |
static SurfelRange | getSurfelRange (CountedPtr< ::DGtal::DigitalSurface< TDigitalSurfaceContainer > > surface, const Surfel &start_surfel, const Parameters ¶ms=parametersDigitalSurface()) |
static IdxSurfelRange | getIdxSurfelRange (CountedPtr< IdxDigitalSurface > surface, const Parameters ¶ms=parametersDigitalSurface()) |
static IdxSurfelRange | getIdxSurfelRange (CountedPtr< IdxDigitalSurface > surface, const IdxSurfel &start_surfel, const Parameters ¶ms=parametersDigitalSurface()) |
template<typename TDigitalSurfaceContainer , typename TCellEmbedder > | |
static bool | saveOFF (CountedPtr< ::DGtal::DigitalSurface< TDigitalSurfaceContainer > > digsurf, const TCellEmbedder &embedder, std::string off_file, const Color &face_color=DGtal::Color::None) |
template<typename TDigitalSurfaceContainer , typename TCellEmbedder > | |
static bool | saveOBJ (CountedPtr< ::DGtal::DigitalSurface< TDigitalSurfaceContainer > > digsurf, const TCellEmbedder &embedder, const RealVectors &normals, const Colors &diffuse_colors, std::string objfile, const Color &ambient_color=Color(32, 32, 32), const Color &diffuse_color=Color(200, 200, 255), const Color &specular_color=Color::White) |
template<typename TDigitalSurfaceContainer > | |
static bool | saveOBJ (CountedPtr< ::DGtal::DigitalSurface< TDigitalSurfaceContainer > > digsurf, const RealVectors &normals, const Colors &diffuse_colors, std::string objfile, const Color &ambient_color=Color(32, 32, 32), const Color &diffuse_color=Color(200, 200, 255), const Color &specular_color=Color::White) |
template<typename TDigitalSurfaceContainer > | |
static bool | saveOFF (CountedPtr< ::DGtal::DigitalSurface< TDigitalSurfaceContainer > > digsurf, std::string off_file, const Color &face_color=Color(32, 32, 32)) |
template<typename TDigitalSurfaceContainer > | |
static bool | saveOBJ (CountedPtr< ::DGtal::DigitalSurface< TDigitalSurfaceContainer > > digsurf, std::string objfile, const Color &ambient_color=Color(32, 32, 32), const Color &diffuse_color=Color(200, 200, 255), const Color &specular_color=Color::White) |
static bool | saveVectorFieldOBJ (const RealPoints &positions, const RealVectors &vf, double thickness, const Colors &diffuse_colors, std::string objfile, const Color &ambient_color=Color(32, 32, 32), const Color &diffuse_color=Color(200, 200, 255), const Color &specular_color=Color::White) |
static Parameters | parametersMesh () |
static CountedPtr< TriangulatedSurface > | makeTriangulatedSurface (CountedPtr< Mesh > aMesh) |
static CountedPtr< Mesh > | makeMesh (CountedPtr< TriangulatedSurface > triSurf, const Color &aColor=Color::White) |
static CountedPtr< Mesh > | makeMesh (CountedPtr< PolygonalSurface > polySurf, const Color &aColor=Color::White) |
template<typename TContainer > | |
static CountedPtr< TriangulatedSurface > | makeTriangulatedSurface (Surfel2Index &s2i, CountedPtr< ::DGtal::DigitalSurface< TContainer > > aSurface) |
template<typename TContainer > | |
static CountedPtr< TriangulatedSurface > | makeTriangulatedSurface (CountedPtr< ::DGtal::DigitalSurface< TContainer > > aSurface) |
static CountedPtr< TriangulatedSurface > | makeTriangulatedSurface (CountedPtr< PolygonalSurface > polySurf, const Parameters ¶ms=parametersMesh()) |
static CountedPtr< PolygonalSurface > | makePolygonalSurface (CountedPtr< Mesh > aMesh) |
static CountedPtr< PolygonalSurface > | makePolygonalSurface (CountedPtr< GrayScaleImage > gray_scale_image, const Parameters ¶ms=parametersKSpace()|parametersBinaryImage()|parametersDigitalSurface()) |
static CountedPtr< TriangulatedSurface > | makeTriangulatedSurface (CountedPtr< GrayScaleImage > gray_scale_image, const Parameters ¶ms=parametersKSpace()|parametersBinaryImage()|parametersDigitalSurface()) |
template<typename TContainer > | |
static CountedPtr< PolygonalSurface > | makeDualPolygonalSurface (Surfel2Index &s2i, CountedPtr< ::DGtal::DigitalSurface< TContainer > > aSurface) |
template<typename TContainer > | |
static CountedPtr< PolygonalSurface > | makeDualPolygonalSurface (CountedPtr< ::DGtal::DigitalSurface< TContainer > > aSurface) |
template<typename TContainer > | |
static CountedPtr< PolygonalSurface > | makeDualPolygonalSurface (CountedPtr< ::DGtal::IndexedDigitalSurface< TContainer > > aSurface) |
template<typename TContainer > | |
static CountedPtr< PolygonalSurface > | makePrimalPolygonalSurface (Cell2Index &c2i, CountedPtr< ::DGtal::DigitalSurface< TContainer > > aSurface) |
template<typename TContainer > | |
static CountedPtr< PolygonalSurface > | makePrimalPolygonalSurface (CountedPtr< ::DGtal::DigitalSurface< TContainer > > aSurface) |
template<typename TContainer > | |
static CountedPtr< PolygonalSurface > | makePrimalPolygonalSurface (CountedPtr< ::DGtal::IndexedDigitalSurface< TContainer > > aSurface) |
template<typename TContainer > | |
static CountedPtr< SurfaceMesh > | makePrimalSurfaceMesh (Cell2Index &c2i, CountedPtr< ::DGtal::DigitalSurface< TContainer > > aSurface) |
template<typename TContainer > | |
static CountedPtr< SurfaceMesh > | makePrimalSurfaceMesh (CountedPtr< ::DGtal::DigitalSurface< TContainer > > aSurface) |
template<typename TContainer > | |
static CountedPtr< SurfaceMesh > | makePrimalSurfaceMesh (CountedPtr< ::DGtal::IndexedDigitalSurface< TContainer > > aSurface) |
static CountedPtr< SurfaceMesh > | makeSurfaceMesh (const std::string &path) |
template<typename TPoint , typename TVector > | |
static bool | saveOBJ (CountedPtr< ::DGtal::SurfaceMesh< TPoint, TVector > > surf, const std::string &objfile) |
template<typename TPoint > | |
static bool | saveOBJ (CountedPtr< ::DGtal::PolygonalSurface< TPoint > > polysurf, const std::string &objfile) |
template<typename TPoint > | |
static bool | saveOFF (CountedPtr< ::DGtal::PolygonalSurface< TPoint > > polysurf, std::string off_file, const Color &face_color=DGtal::Color::None) |
template<typename TPoint > | |
static bool | saveOBJ (CountedPtr< ::DGtal::TriangulatedSurface< TPoint > > trisurf, const std::string &objfile) |
template<typename TPoint > | |
static bool | saveOBJ (CountedPtr< ::DGtal::PolygonalSurface< TPoint > > polysurf, const RealVectors &normals, const Colors &diffuse_colors, std::string objfile, const Color &ambient_color=Color(32, 32, 32), const Color &diffuse_color=Color(200, 200, 255), const Color &specular_color=Color::White) |
template<typename TPoint > | |
static bool | saveOBJ (CountedPtr< ::DGtal::TriangulatedSurface< TPoint > > trisurf, const RealVectors &normals, const Colors &diffuse_colors, std::string objfile, const Color &ambient_color=Color(32, 32, 32), const Color &diffuse_color=Color(200, 200, 255), const Color &specular_color=Color::White) |
template<typename TPoint , typename TVector > | |
static bool | saveOBJ (CountedPtr< ::DGtal::SurfaceMesh< TPoint, TVector > > surf, const RealVectors &normals, const Colors &diffuse_colors, std::string objfile, const Color &ambient_color=Color(32, 32, 32), const Color &diffuse_color=Color(200, 200, 255), const Color &specular_color=Color::White) |
template<typename TPoint > | |
static bool | saveOFF (CountedPtr< ::DGtal::TriangulatedSurface< TPoint > > trisurf, std::string off_file, const Color &face_color=DGtal::Color::None) |
static Parameters | parametersUtilities () |
template<typename TValue > | |
static IdxRange | getRangeMatch (const std::vector< TValue > &s1, const std::vector< TValue > &s2, bool perfect=false) |
template<typename TValue > | |
static std::vector< TValue > | getMatchedRange (const std::vector< TValue > &range, const IdxRange &match) |
static ColorMap | getColorMap (Scalar min, Scalar max, const Parameters ¶ms=parametersUtilities()) |
static ZeroTickedColorMap | getZeroTickedColorMap (Scalar min, Scalar max, const Parameters ¶ms=parametersUtilities()) |
template<typename TCellEmbedder = CanonicCellEmbedder< KSpace >> | |
static bool | outputSurfelsAsObj (std::ostream &output, const SurfelRange &surfels, const TCellEmbedder &embedder) |
template<typename TAnyDigitalSurface > | |
static bool | outputPrimalDigitalSurfaceAsObj (std::ostream &output, CountedPtr< TAnyDigitalSurface > surface) |
template<typename TAnyDigitalSurface , typename TCellEmbedder = CanonicCellEmbedder< KSpace >> | |
static bool | outputPrimalDigitalSurfaceAsObj (std::ostream &output, CountedPtr< TAnyDigitalSurface > surface, const TCellEmbedder &embedder) |
static bool | outputPrimalIdxDigitalSurfaceAsObj (std::ostream &output, CountedPtr< IdxDigitalSurface > surface) |
template<typename TCellEmbedder = CanonicCellEmbedder< KSpace >> | |
static bool | outputPrimalIdxDigitalSurfaceAsObj (std::ostream &output, CountedPtr< IdxDigitalSurface > surface, const TCellEmbedder &embedder) |
template<typename TDigitalSurfaceContainer > | |
static bool | outputDualDigitalSurfaceAsObj (std::ostream &output, CountedPtr< ::DGtal::DigitalSurface< TDigitalSurfaceContainer > > surface, const Parameters ¶ms=parametersMesh()) |
template<typename TDigitalSurfaceContainer , typename TCellEmbedder = CanonicCellEmbedder< KSpace >> | |
static bool | outputDualDigitalSurfaceAsObj (std::ostream &output, CountedPtr< ::DGtal::DigitalSurface< TDigitalSurfaceContainer > > surface, const TCellEmbedder &embedder, const Parameters ¶ms=parametersMesh()) |
template<typename TSCellMap , typename TValueWriter > | |
static bool | outputSCellMapAsCSV (std::ostream &output, const KSpace &K, const TSCellMap &anyMap, const TValueWriter &writer) |
template<typename TCellMap , typename TValueWriter > | |
static bool | outputCellMapAsCSV (std::ostream &output, const KSpace &K, const TCellMap &anyMap, const TValueWriter &writer) |
static CellRange | getPrimalCells (const KSpace &K, const SCell &s, const Dimension k) |
static CellRange | getPrimalVertices (const KSpace &K, const SCell &s) |
static CellRange | getPrimalVertices (const KSpace &K, const Surfel &s, bool ccw) |
Private Member Functions | |
BOOST_CONCEPT_ASSERT ((concepts::CCellularGridSpaceND< TKSpace >)) | |
Aim: This class is used to simplify shape and surface creation. With it, you can create new shapes and surface with few lines of code. The drawback is that you use specific types or objects, which could lead to faster code or more compact data structures.
Description of template class 'Shortcuts'
TKSpace | any cellular grid space, a model of concepts::CCellularGridSpaceND like KhalimskySpaceND. |
Definition at line 101 of file Shortcuts.h.
typedef LightDigitalSurface::Arc DGtal::Shortcuts< TKSpace >::Arc |
Definition at line 162 of file Shortcuts.h.
typedef LightDigitalSurface::ArcRange DGtal::Shortcuts< TKSpace >::ArcRange |
Definition at line 164 of file Shortcuts.h.
typedef ImageContainerBySTLVector<Domain, bool> DGtal::Shortcuts< TKSpace >::BinaryImage |
defines a black and white image with (hyper-)rectangular domain.
Definition at line 138 of file Shortcuts.h.
typedef LightDigitalSurface::Cell DGtal::Shortcuts< TKSpace >::Cell |
Definition at line 159 of file Shortcuts.h.
typedef std::map<Cell, IdxVertex> DGtal::Shortcuts< TKSpace >::Cell2Index |
Definition at line 186 of file Shortcuts.h.
typedef std::vector< Cell > DGtal::Shortcuts< TKSpace >::CellRange |
Definition at line 171 of file Shortcuts.h.
typedef ::DGtal::Color DGtal::Shortcuts< TKSpace >::Color |
Definition at line 188 of file Shortcuts.h.
typedef GradientColorMap<Scalar> DGtal::Shortcuts< TKSpace >::ColorMap |
Definition at line 190 of file Shortcuts.h.
typedef std::vector< Color > DGtal::Shortcuts< TKSpace >::Colors |
Definition at line 189 of file Shortcuts.h.
typedef ::DGtal::DigitalSurface< ExplicitSurfaceContainer > DGtal::Shortcuts< TKSpace >::DigitalSurface |
defines an arbitrary digital surface over a binary image.
Definition at line 155 of file Shortcuts.h.
typedef GaussDigitizer< Space, ImplicitShape3D > DGtal::Shortcuts< TKSpace >::DigitizedImplicitShape3D |
defines the digitization of an implicit shape.
Definition at line 136 of file Shortcuts.h.
typedef HyperRectDomain<Space> DGtal::Shortcuts< TKSpace >::Domain |
An (hyper-)rectangular domain.
Definition at line 124 of file Shortcuts.h.
typedef ImageContainerBySTLVector<Domain, double> DGtal::Shortcuts< TKSpace >::DoubleImage |
defines a double image with (hyper-)rectangular domain.
Definition at line 144 of file Shortcuts.h.
typedef SetOfSurfels< KSpace, SurfelSet > DGtal::Shortcuts< TKSpace >::ExplicitSurfaceContainer |
defines a heavy container that represents any digital surface.
Definition at line 153 of file Shortcuts.h.
typedef LightDigitalSurface::Face DGtal::Shortcuts< TKSpace >::Face |
Definition at line 163 of file Shortcuts.h.
typedef ImageContainerBySTLVector<Domain, float> DGtal::Shortcuts< TKSpace >::FloatImage |
defines a float image with (hyper-)rectangular domain.
Definition at line 142 of file Shortcuts.h.
typedef unsigned char DGtal::Shortcuts< TKSpace >::GrayScale |
The type for 8-bits gray-scale elements.
Definition at line 126 of file Shortcuts.h.
typedef ImageContainerBySTLVector<Domain, GrayScale> DGtal::Shortcuts< TKSpace >::GrayScaleImage |
defines a grey-level image with (hyper-)rectangular domain.
Definition at line 140 of file Shortcuts.h.
typedef IdxVertex DGtal::Shortcuts< TKSpace >::Idx |
Definition at line 178 of file Shortcuts.h.
typedef IdxDigitalSurface::Arc DGtal::Shortcuts< TKSpace >::IdxArc |
Definition at line 167 of file Shortcuts.h.
typedef IdxDigitalSurface::ArcRange DGtal::Shortcuts< TKSpace >::IdxArcRange |
Definition at line 168 of file Shortcuts.h.
typedef IndexedDigitalSurface< ExplicitSurfaceContainer > DGtal::Shortcuts< TKSpace >::IdxDigitalSurface |
defines a connected or not indexed digital surface.
Definition at line 157 of file Shortcuts.h.
typedef std::vector< IdxVertex > DGtal::Shortcuts< TKSpace >::IdxRange |
Definition at line 179 of file Shortcuts.h.
typedef IdxDigitalSurface::Vertex DGtal::Shortcuts< TKSpace >::IdxSurfel |
Definition at line 165 of file Shortcuts.h.
typedef std::vector< IdxSurfel > DGtal::Shortcuts< TKSpace >::IdxSurfelRange |
Definition at line 174 of file Shortcuts.h.
typedef std::set< IdxSurfel > DGtal::Shortcuts< TKSpace >::IdxSurfelSet |
Definition at line 169 of file Shortcuts.h.
typedef IdxDigitalSurface::Vertex DGtal::Shortcuts< TKSpace >::IdxVertex |
Definition at line 166 of file Shortcuts.h.
typedef ImplicitPolynomial3Shape<Space> DGtal::Shortcuts< TKSpace >::ImplicitShape3D |
defines an implicit shape of the space, which is the zero-level set of a ScalarPolynomial.
Definition at line 134 of file Shortcuts.h.
typedef Space::Integer DGtal::Shortcuts< TKSpace >::Integer |
Integer numbers.
Definition at line 112 of file Shortcuts.h.
typedef TKSpace DGtal::Shortcuts< TKSpace >::KSpace |
Digital cellular space.
Definition at line 108 of file Shortcuts.h.
typedef ::DGtal::DigitalSurface< LightSurfaceContainer > DGtal::Shortcuts< TKSpace >::LightDigitalSurface |
defines a connected digital surface over a binary image.
Definition at line 151 of file Shortcuts.h.
typedef LightImplicitDigitalSurface< KSpace, BinaryImage > DGtal::Shortcuts< TKSpace >::LightSurfaceContainer |
defines a light container that represents a connected digital surface over a binary image.
Definition at line 149 of file Shortcuts.h.
typedef ::DGtal::Mesh<RealPoint> DGtal::Shortcuts< TKSpace >::Mesh |
Definition at line 181 of file Shortcuts.h.
typedef Space::Point DGtal::Shortcuts< TKSpace >::Point |
Point with integer coordinates.
Definition at line 114 of file Shortcuts.h.
typedef CellRange DGtal::Shortcuts< TKSpace >::PointelRange |
Definition at line 172 of file Shortcuts.h.
typedef ::DGtal::PolygonalSurface<RealPoint> DGtal::Shortcuts< TKSpace >::PolygonalSurface |
Definition at line 183 of file Shortcuts.h.
typedef Space::RealPoint DGtal::Shortcuts< TKSpace >::RealPoint |
Point with floating-point coordinates.
Definition at line 120 of file Shortcuts.h.
typedef std::vector< RealPoint > DGtal::Shortcuts< TKSpace >::RealPoints |
Definition at line 177 of file Shortcuts.h.
typedef Space::RealVector DGtal::Shortcuts< TKSpace >::RealVector |
Vector with floating-point coordinates.
Definition at line 118 of file Shortcuts.h.
typedef std::vector< RealVector > DGtal::Shortcuts< TKSpace >::RealVectors |
Definition at line 176 of file Shortcuts.h.
typedef RealVector::Component DGtal::Shortcuts< TKSpace >::Scalar |
Floating-point numbers.
Definition at line 122 of file Shortcuts.h.
typedef MPolynomial< Space::dimension, Scalar > DGtal::Shortcuts< TKSpace >::ScalarPolynomial |
defines a multi-variate polynomial : RealPoint -> Scalar
Definition at line 131 of file Shortcuts.h.
typedef std::vector< Scalar > DGtal::Shortcuts< TKSpace >::Scalars |
Definition at line 175 of file Shortcuts.h.
typedef LightDigitalSurface::SCell DGtal::Shortcuts< TKSpace >::SCell |
Definition at line 160 of file Shortcuts.h.
typedef std::vector< SCell > DGtal::Shortcuts< TKSpace >::SCellRange |
Definition at line 170 of file Shortcuts.h.
typedef KSpace::Space DGtal::Shortcuts< TKSpace >::Space |
Digital space.
Definition at line 110 of file Shortcuts.h.
typedef ::DGtal::SurfaceMesh<RealPoint,RealPoint> DGtal::Shortcuts< TKSpace >::SurfaceMesh |
Definition at line 184 of file Shortcuts.h.
typedef LightDigitalSurface::Surfel DGtal::Shortcuts< TKSpace >::Surfel |
Definition at line 158 of file Shortcuts.h.
typedef std::map<Surfel, IdxSurfel> DGtal::Shortcuts< TKSpace >::Surfel2Index |
Definition at line 185 of file Shortcuts.h.
typedef SCellRange DGtal::Shortcuts< TKSpace >::SurfelRange |
Definition at line 173 of file Shortcuts.h.
typedef KSpace::SurfelSet DGtal::Shortcuts< TKSpace >::SurfelSet |
defines a set of surfels
Definition at line 146 of file Shortcuts.h.
typedef ::DGtal::TriangulatedSurface<RealPoint> DGtal::Shortcuts< TKSpace >::TriangulatedSurface |
Definition at line 182 of file Shortcuts.h.
typedef Space::Vector DGtal::Shortcuts< TKSpace >::Vector |
Vector with integer coordinates.
Definition at line 116 of file Shortcuts.h.
typedef LightDigitalSurface::Vertex DGtal::Shortcuts< TKSpace >::Vertex |
Definition at line 161 of file Shortcuts.h.
typedef TickedColorMap<Scalar,ColorMap> DGtal::Shortcuts< TKSpace >::ZeroTickedColorMap |
Definition at line 191 of file Shortcuts.h.
|
delete |
Default constructor.
|
delete |
Destructor.
|
delete |
Copy constructor.
other | the object to clone. |
|
delete |
Move constructor.
other | the object to move. |
|
private |
|
inlinestatic |
Definition at line 200 of file Shortcuts.h.
References DGtal::Shortcuts< TKSpace >::parametersBinaryImage(), DGtal::Shortcuts< TKSpace >::parametersDigitalSurface(), DGtal::Shortcuts< TKSpace >::parametersDigitizedImplicitShape3D(), DGtal::Shortcuts< TKSpace >::parametersGrayScaleImage(), DGtal::Shortcuts< TKSpace >::parametersImplicitShape3D(), DGtal::Shortcuts< TKSpace >::parametersKSpace(), DGtal::Shortcuts< TKSpace >::parametersMesh(), and DGtal::Shortcuts< TKSpace >::parametersUtilities().
Referenced by main(), and precompute().
|
inlinestatic |
[in] | K | any Khalimsky space. |
Definition at line 435 of file Shortcuts.h.
References K.
Referenced by DGtal::Shortcuts< TKSpace >::getCellEmbedder(), DGtal::Shortcuts< TKSpace >::getCellEmbedder(), DGtal::Shortcuts< TKSpace >::makeDualPolygonalSurface(), DGtal::Shortcuts< TKSpace >::makePrimalPolygonalSurface(), DGtal::Shortcuts< TKSpace >::makePrimalSurfaceMesh(), DGtal::Shortcuts< TKSpace >::makeTriangulatedSurface(), DGtal::Shortcuts< TKSpace >::outputDualDigitalSurfaceAsObj(), DGtal::Shortcuts< TKSpace >::outputPrimalDigitalSurfaceAsObj(), DGtal::Shortcuts< TKSpace >::outputPrimalIdxDigitalSurfaceAsObj(), DGtal::Shortcuts< TKSpace >::saveOBJ(), DGtal::Shortcuts< TKSpace >::saveOBJ(), and DGtal::Shortcuts< TKSpace >::saveOFF().
|
inlinestatic |
TDigitalSurfaceContainer | either kind of DigitalSurfaceContainer |
[in] | surface | a smart pointer on a (light or not) digital surface (e.g. DigitalSurface or LightDigitalSurface). |
Definition at line 1271 of file Shortcuts.h.
References DGtal::Shortcuts< TKSpace >::getCellEmbedder(), DGtal::Shortcuts< TKSpace >::refKSpace(), and surface.
|
inlinestatic |
TDigitalSurfaceContainer | either kind of DigitalSurfaceContainer |
[in] | surface | a smart pointer on any indexed digital surface. |
Definition at line 1293 of file Shortcuts.h.
References DGtal::Shortcuts< TKSpace >::getCellEmbedder(), DGtal::Shortcuts< TKSpace >::refKSpace(), and surface.
|
inlinestatic |
Given any digital surface, returns the vector of its k-dimensional cells.
TDigitalSurfaceContainer | either kind of DigitalSurfaceContainer |
[out] | c2i | the map Cell -> Cell index in the cell range. |
[in] | surface | a smart pointer on a (light or not) digital surface (e.g. DigitalSurface or LightDigitalSurface). |
[in] | k | the dimension of the output cells |
Definition at line 1659 of file Shortcuts.h.
References DGtal::Shortcuts< TKSpace >::getPrimalCells(), K, DGtal::Shortcuts< TKSpace >::refKSpace(), and surface.
Referenced by DGtal::Shortcuts< TKSpace >::getCellRange().
|
inlinestatic |
Given any digital surface, returns the vector of its k-dimensional cells.
TDigitalSurfaceContainer | either kind of DigitalSurfaceContainer |
[in] | surface | a smart pointer on a (light or not) digital surface (e.g. DigitalSurface or LightDigitalSurface). |
[in] | k | the dimension of the output cells |
Definition at line 1698 of file Shortcuts.h.
References DGtal::Shortcuts< TKSpace >::getCellRange(), and surface.
|
inlinestatic |
[in] | min | the minimum considered value for the colormap. |
[in] | max | the maximum considered value for the colormap. |
[in] | params | the parameters:
|
Definition at line 3011 of file Shortcuts.h.
References DGtal::GradientColorMap< PValue, PDefaultPreset, PDefaultFirstColor, PDefaultLastColor >::addColor(), DGtal::CMAP_AUTUMN, DGtal::CMAP_COOL, DGtal::CMAP_COPPER, DGtal::CMAP_HOT, DGtal::CMAP_JET, DGtal::CMAP_SPRING, DGtal::CMAP_SUMMER, DGtal::CMAP_WINTER, and max().
Referenced by DGtal::Shortcuts< TKSpace >::getZeroTickedColorMap().
|
inlinestatic |
Given an indexed digital surface, returns a vector of surfels in some specified order.
[in] | surface | a smart pointer on a digital surface. |
[in] | start_surfel | the surfel where the traversal starts in case of depth-first/breadth-first traversal. |
[in] | params | the parameters:
|
Definition at line 1892 of file Shortcuts.h.
References surface.
|
inlinestatic |
Given an indexed digital surface, returns a vector of surfels in some specified order.
[in] | surface | a smart pointer on a digital surface. |
[in] | params | the parameters:
|
Definition at line 1872 of file Shortcuts.h.
References DGtal::Shortcuts< TKSpace >::getIdxSurfelRange(), and surface.
Referenced by DGtal::Shortcuts< TKSpace >::getIdxSurfelRange(), DGtal::Shortcuts< TKSpace >::makeDigitalSurface(), and DGtal::Shortcuts< TKSpace >::outputPrimalIdxDigitalSurfaceAsObj().
|
inlinestatic |
Builds a Khalimsky space that encompasses the lower and upper digital points. Note that digital points are cells of the Khalimsky space with maximal dimensions. A closed Khalimsky space adds lower dimensional cells all around its boundary to define a closed complex.
[in] | low | the lowest point in the space |
[in] | up | the highest point in the space |
[in] | params | the parameters:
|
Definition at line 329 of file Shortcuts.h.
References DGtal::Trace::error(), K, and DGtal::trace.
Referenced by DGtal::DigitalSurfaceRegularization< TDigitalSurface >::DigitalSurfaceRegularization(), main(), DGtal::Shortcuts< TKSpace >::makePolygonalSurface(), and DGtal::Shortcuts< TKSpace >::makeTriangulatedSurface().
|
inlinestatic |
TDigitalSurfaceContainer | either kind of DigitalSurfaceContainer |
[in] | surface | a smart pointer on a (light or not) digital surface (e.g. DigitalSurface or LightDigitalSurface). |
Definition at line 393 of file Shortcuts.h.
References surface.
|
inlinestatic |
TDigitalSurfaceContainer | either kind of DigitalSurfaceContainer |
[in] | surface | a smart pointer on any indexed digital surface. |
Definition at line 404 of file Shortcuts.h.
References surface.
|
inlinestatic |
Builds a Khalimsky space that encompasses the domain of the given image. Note that digital points are cells of the Khalimsky space with maximal dimensions. A closed Khalimsky space adds lower dimensional cells all around its boundary to define a closed complex.
[in] | bimage | any binary image |
[in] | params | the parameters:
|
Definition at line 351 of file Shortcuts.h.
References DGtal::Trace::error(), K, and DGtal::trace.
|
inlinestatic |
Builds a Khalimsky space that encompasses the domain of the given image. Note that digital points are cells of the Khalimsky space with maximal dimensions. A closed Khalimsky space adds lower dimensional cells all around its boundary to define a closed complex.
[in] | gimage | any gray-scale image |
[in] | params | the parameters:
|
Definition at line 375 of file Shortcuts.h.
References DGtal::Trace::error(), K, and DGtal::trace.
|
inlinestatic |
Builds a Khalimsky space that encompasses the bounding box specified by a digitization in params. It is useful when digitizing an implicit shape.
[in] | params | the parameters:
|
Definition at line 483 of file Shortcuts.h.
References domain, DGtal::Trace::error(), K, DGtal::HyperRectDomain< TSpace >::lowerBound(), DGtal::trace, and DGtal::HyperRectDomain< TSpace >::upperBound().
|
inlinestatic |
Given a perfect or approximate match, returns the corresponding reordered/rematched range.
[in] | range | any range. |
[in] | match | a function V: Idx -> Idx such that result[ i ] = range[ match[ i ] ] . |
Definition at line 2996 of file Shortcuts.h.
|
inlinestatic |
Given any digital surface, returns the vector of its pointels.
TDigitalSurfaceContainer | either kind of DigitalSurfaceContainer |
[out] | c2i | the map Cell -> Vertex index in the pointel range. |
[in] | surface | a smart pointer on a (light or not) digital surface (e.g. DigitalSurface or LightDigitalSurface). |
Definition at line 1729 of file Shortcuts.h.
References DGtal::Shortcuts< TKSpace >::getPointelRange(), K, DGtal::Shortcuts< TKSpace >::refKSpace(), and surface.
Referenced by DGtal::Shortcuts< TKSpace >::getPointelRange(), DGtal::Shortcuts< TKSpace >::getPointelRange(), DGtal::Shortcuts< TKSpace >::outputSurfelsAsObj(), DGtal::Shortcuts< TKSpace >::saveOBJ(), and DGtal::Shortcuts< TKSpace >::saveOFF().
|
inlinestatic |
Given any surfel, returns its 4 pointels in ccw order.
[in] | K | the Khalimsky space |
[in] | surfel | any surfel that lives in the Khalimsky space |
Definition at line 1786 of file Shortcuts.h.
References DGtal::KhalimskySpaceND< dim, TInteger >::dimension, DGtal::Shortcuts< TKSpace >::getPrimalVertices(), and K.
|
inlinestatic |
Given any digital surface, returns the vector of its pointels.
TDigitalSurfaceContainer | either kind of DigitalSurfaceContainer |
[in] | surface | a smart pointer on a (light or not) digital surface (e.g. DigitalSurface or LightDigitalSurface). |
Definition at line 1770 of file Shortcuts.h.
References DGtal::Shortcuts< TKSpace >::getPointelRange(), and surface.
|
inlinestatic |
Returns a map associating a name and a polynomial, e.g. "sphere1", "x^2+y^2+z^2-1".
{ "sphere1", "x^2+y^2+z^2-1" }, { "sphere9", "x^2+y^2+z^2-81" }, { "ellipsoid", "3*x^2+2*y^2+z^2-90" }, { "cylinder", "x^2+2*z^2-90" }, { "torus", "(x^2+y^2+z^2+6*6-2*2)^2-4*6*6*(x^2+y^2)" }, { "rcube", "x^4+y^4+z^4-6561" }, { "goursat", "-1*(8-0.03*x^4-0.03*y^4-0.03*z^4+2*x^2+2*y^2+2*z^2)" }, { "distel", "10000-(x^2+y^2+z^2+1000*(x^2+y^2)*(x^2+z^2)*(y^2+z^2))"}, { "leopold", "(x^2*y^2*z^2+4*x^2+4*y^2+3*z^2)-100" }, { "diabolo", "x^2-(y^2+z^2)^2" }, { "heart", "-1*(x^2+2.25*y^2+z^2-1)^3+x^2*z^3+0.1125*y^2*z^3" }, { "crixxi", "-0.9*(y^2+z^2-1)^2-(x^2+y^2-1)^3" }
Definition at line 233 of file Shortcuts.h.
References DGtal::L.
Referenced by DGtal::Shortcuts< TKSpace >::makeImplicitShape3D().
|
inlinestatic |
Given a space K and an oriented cell s, returns its vertices.
K | any cellular grid space. |
s | any signed cell. |
k | any dimension between 0 and K.sdim(s) . |
Definition at line 3507 of file Shortcuts.h.
References K.
Referenced by DGtal::Shortcuts< TKSpace >::getCellRange(), and DGtal::Shortcuts< TKSpace >::getPrimalVertices().
|
inlinestatic |
Given a space K and an oriented cell s, returns its vertices.
K | any cellular grid space. |
s | any signed cell. |
Definition at line 3523 of file Shortcuts.h.
References DGtal::Shortcuts< TKSpace >::getPrimalCells(), and K.
Referenced by DGtal::Shortcuts< TKSpace >::getPointelRange(), and DGtal::Shortcuts< TKSpace >::getPrimalVertices().
|
inlinestatic |
Given a space K and a surfel s, returns its vertices in ccw or cw order.
K | any cellular grid space of dimension 3. |
s | any surfel, a signed cell of dimension 2. |
ccw | when 'true', the order corresponds to a ccw orientation seen from the exterior normal to the surfel, otherwise it is a cw order. |
Definition at line 3535 of file Shortcuts.h.
References DGtal::PointVector< dim, TEuclideanRing, TContainer >::crossProduct(), DGtal::KhalimskySpaceND< dim, TInteger >::dimension, DGtal::Shortcuts< TKSpace >::getPrimalVertices(), and K.
|
inlinestatic |
Given two ranges with same elements but not necessarily in the same order, returns a vector V: index -> index such that s1[ i ] == s2[ V[ i ] ]
.
TValue | a model of boost::Assignable, boost::CopyConstructible, boost::LessThanComparable |
[in] | s1 | a range of values |
[in] | s2 | another range of values which contains the same values as s1 but in any order. |
[in] | perfect | if 'true' ask for a perfect match, otherwise extracts correspondences. |
s1[ i ] == s2[ V[ i ] ]
. If perfect is true, then an empty range is returned in case of mismatch.perfect==false
and s1[ i ]
is not in s2
, then V[ i ] = s2.size()
. Definition at line 2961 of file Shortcuts.h.
|
inlinestatic |
[in] | K | any Khalimsky space. |
Definition at line 443 of file Shortcuts.h.
References K.
Referenced by DGtal::Shortcuts< TKSpace >::getSCellEmbedder(), and DGtal::Shortcuts< TKSpace >::getSCellEmbedder().
|
inlinestatic |
TDigitalSurfaceContainer | either kind of DigitalSurfaceContainer |
[in] | surface | a smart pointer on a (light or not) digital surface (e.g. DigitalSurface or LightDigitalSurface). |
Definition at line 1282 of file Shortcuts.h.
References DGtal::Shortcuts< TKSpace >::getSCellEmbedder(), DGtal::Shortcuts< TKSpace >::refKSpace(), and surface.
|
inlinestatic |
TDigitalSurfaceContainer | either kind of DigitalSurfaceContainer |
[in] | surface | a smart pointer on any indexed digital surface. |
Definition at line 1304 of file Shortcuts.h.
References DGtal::Shortcuts< TKSpace >::getSCellEmbedder(), DGtal::Shortcuts< TKSpace >::refKSpace(), and surface.
|
inlinestatic |
Given any digital surface, returns a vector of surfels in some specified order.
TDigitalSurfaceContainer | either kind of DigitalSurfaceContainer |
[in] | surface | a smart pointer on a (light or not) digital surface (e.g. DigitalSurface or LightDigitalSurface). |
[in] | params | the parameters:
|
Definition at line 1807 of file Shortcuts.h.
References DGtal::Shortcuts< TKSpace >::getSurfelRange(), and surface.
Referenced by DGtal::Shortcuts< TKSpace >::getSurfelRange(), main(), DGtal::Shortcuts< TKSpace >::outputPrimalDigitalSurfaceAsObj(), and precompute().
|
inlinestatic |
Given a light digital surface, returns a vector of surfels in some specified order.
TDigitalSurfaceContainer | either kind of DigitalSurfaceContainer |
[in] | surface | a smart pointer on a (light or not) digital surface (e.g. DigitalSurface or LightDigitalSurface). |
[in] | start_surfel | the surfel where the traversal starts in case of depth-first/breadth-first traversal. |
[in] | params | the parameters:
|
Definition at line 1830 of file Shortcuts.h.
References surface.
|
inlinestatic |
[in] | min | the minimum considered value for the colormap. |
[in] | max | the maximum considered value for the colormap. |
[in] | params | the parameters:
|
Definition at line 3049 of file Shortcuts.h.
References DGtal::Color::Black, DGtal::Shortcuts< TKSpace >::getColorMap(), and max().
|
inline |
Checks the validity/consistency of the object.
Definition at line 3607 of file Shortcuts.h.
|
inlinestatic |
Create an arbitrary image from a vector where non zero values indicates voxels
[in] | values | A vector (of vector of vector) where non-zero values indicates a voxel |
[in] | override_domain | Overrides computed domain if needed |
Definition at line 720 of file Shortcuts.h.
References image(), and DGtal::HyperRectDomain< TSpace >::lowerBound().
|
inlinestatic |
Create an arbitrary image from a vector of positions
[in] | positions | A vector of positions to indicates locations of voxels |
[in] | override_domain | Overrides computed domain if needed |
Definition at line 767 of file Shortcuts.h.
References image().
|
inlinestatic |
Create an arbitrary image from a vector where non zero values indicates voxels
[in] | values | A vector where non-zero values indicates voxels |
[in] | d | The domain of the image |
Definition at line 690 of file Shortcuts.h.
References DGtal::HyperRectDomain< TSpace >::begin(), DGtal::HyperRectDomain< TSpace >::end(), and image().
|
inlinestatic |
Adds Kanungo noise to a binary image and returns the resulting new image.
[in] | bimage | a smart pointer on a binary image. |
[in] | params | the parameters:
|
Definition at line 625 of file Shortcuts.h.
References DGtal::HyperRectDomain< TSpace >::begin(), and DGtal::HyperRectDomain< TSpace >::end().
|
inlinestatic |
Vectorizes an implicitly defined digital shape into a binary image, in the specified (hyper-)rectangular domain, and possibly add Kanungo noise to the result depending on parameters given in params.
[in] | shape_digitization | a smart pointer on an implicit digital shape. |
[in] | shapeDomain | any domain. |
[in] | params | the parameters:
|
Definition at line 593 of file Shortcuts.h.
References DGtal::HyperRectDomain< TSpace >::begin(), and DGtal::HyperRectDomain< TSpace >::end().
|
inlinestatic |
Vectorizes an implicitly defined digital shape into a binary image, and possibly add Kanungo noise to the result depending on parameters given in params.
[in] | shape_digitization | a smart pointer on an implicit digital shape. |
[in] | params | the parameters:
|
Definition at line 573 of file Shortcuts.h.
References DGtal::Shortcuts< TKSpace >::makeBinaryImage().
|
inlinestatic |
Binarizes an arbitrary gray scale image file and returns the binary image corresponding to the threshold/noise parameters.
[in] | gray_scale_image | the input gray scale image. |
[in] | params | the parameters:
|
Definition at line 817 of file Shortcuts.h.
References DGtal::HyperRectDomain< TSpace >::begin(), domain, DGtal::HyperRectDomain< TSpace >::end(), and DGtal::Shortcuts< TKSpace >::makeBinaryImage().
|
inlinestatic |
Makes an empty binary image within a given domain.
[in] | shapeDomain | any domain. |
Definition at line 558 of file Shortcuts.h.
Referenced by main(), DGtal::Shortcuts< TKSpace >::makeBinaryImage(), DGtal::Shortcuts< TKSpace >::makeBinaryImage(), DGtal::Shortcuts< TKSpace >::makeBinaryImage(), DGtal::Shortcuts< TKSpace >::makePolygonalSurface(), and DGtal::Shortcuts< TKSpace >::makeTriangulatedSurface().
|
inlinestatic |
Loads an arbitrary image file (e.g. vol file in 3D) and returns the binary image corresponding to the threshold/noise parameters.
[in] | input | the input filename. |
[in] | params | the parameters:
|
Definition at line 652 of file Shortcuts.h.
References DGtal::HyperRectDomain< TSpace >::begin(), domain, DGtal::HyperRectDomain< TSpace >::end(), image(), DGtal::GenericReader< TContainer, Tdim, TValue >::import(), and DGtal::Shortcuts< TKSpace >::makeBinaryImage().
|
inlinestatic |
Builds a explicit digital surface from an indexed digital surface.
[in] | idx_surface | any indexed digital surface. |
[in] | params | the parameters:
|
Definition at line 1500 of file Shortcuts.h.
References DGtal::Shortcuts< TKSpace >::getIdxSurfelRange(), K, and DGtal::Shortcuts< TKSpace >::refKSpace().
|
inlinestatic |
Creates a explicit digital surface representing the boundaries in the binary image bimage, or any one of its big components according to parameters.
TPointPredicate | any type representing a point predicate (e.g. a BinaryImage or a DigitizedImplicitShape3D). |
[in] | bimage | any point predicate: Point -> boolean that represents the characteristic function of a digital shape |
[in] | K | the Khalimsky space whose domain encompasses the digital shape. |
[in] | params | the parameters:
|
Definition at line 1469 of file Shortcuts.h.
References K, and DGtal::Surfaces< TKSpace >::sMakeBoundary().
Referenced by main(), DGtal::Shortcuts< TKSpace >::makePolygonalSurface(), DGtal::Shortcuts< TKSpace >::makePrimalPolygonalSurface(), DGtal::Shortcuts< TKSpace >::makePrimalSurfaceMesh(), and DGtal::Shortcuts< TKSpace >::makeTriangulatedSurface().
|
inlinestatic |
Makes the Gauss digitization of the given implicit shape according to parameters. Use getKSpace to build the associated digital space.
[in] | shape | a smart pointer on the implicit shape. |
[in] | params | the parameters:
|
Definition at line 519 of file Shortcuts.h.
Referenced by main().
|
inlinestatic |
Makes a double image from the given implicit shape according to parameters. Use getKSpace to build the associated digital space.
[in] | shape | a smart pointer on the implicit shape. |
[in] | params | the parameters:
|
Definition at line 1224 of file Shortcuts.h.
References domain, and DGtal::Shortcuts< TKSpace >::makeDoubleImage().
|
inlinestatic |
Makes an empty double image within a given domain (values are unsigned char).
[in] | aDomain | any domain. |
Definition at line 1191 of file Shortcuts.h.
Referenced by DGtal::Shortcuts< TKSpace >::makeDoubleImage().
|
inlinestatic |
Loads an arbitrary image file (e.g. vol file in 3D) and returns the corresponding double image.
[in] | input | the input filename. |
Definition at line 1203 of file Shortcuts.h.
References image(), and DGtal::GenericReader< TContainer, Tdim, TValue >::import().
|
inlinestatic |
Builds the dual polygonal surface associated to the given digital surface.
TContainer | the digital surface container |
[in] | aSurface | any digital surface (e.g. DigitalSurface or LightDigitalSurface) |
Definition at line 2549 of file Shortcuts.h.
References DGtal::Shortcuts< TKSpace >::makeDualPolygonalSurface().
|
inlinestatic |
Builds the dual polygonal surface associated to the given indexed digital surface.
TContainer | the digital surface container |
[in] | aSurface | any indexed digital surface (e.g. IdxDigitalSurface) |
Definition at line 2563 of file Shortcuts.h.
References DGtal::KhalimskySpaceND< dim, TInteger >::dimension.
|
inlinestatic |
Builds the dual polygonal surface associated to the given digital surface.
TContainer | the digital surface container |
[out] | s2i | the map Surfel -> Vertex index in the polygonal surface. |
[in] | aSurface | any digital surface (e.g. DigitalSurface or LightDigitalSurface) |
Definition at line 2529 of file Shortcuts.h.
References DGtal::MeshHelpers::digitalSurface2DualPolygonalSurface(), DGtal::KhalimskySpaceND< dim, TInteger >::dimension, and DGtal::Shortcuts< TKSpace >::getCellEmbedder().
Referenced by DGtal::Shortcuts< TKSpace >::makeDualPolygonalSurface().
|
inlinestatic |
Makes a float image from the given implicit shape according to parameters. Use getKSpace to build the associated digital space.
[in] | shape | a smart pointer on the implicit shape. |
[in] | params | the parameters:
|
Definition at line 1158 of file Shortcuts.h.
References domain, and DGtal::Shortcuts< TKSpace >::makeFloatImage().
|
inlinestatic |
Makes an empty float image within a given domain (values are unsigned char).
[in] | aDomain | any domain. |
Definition at line 1125 of file Shortcuts.h.
Referenced by DGtal::Shortcuts< TKSpace >::makeFloatImage().
|
inlinestatic |
Loads an arbitrary image file (e.g. vol file in 3D) and returns the corresponding float image.
[in] | input | the input filename. |
Definition at line 1137 of file Shortcuts.h.
References image(), and DGtal::GenericReader< TContainer, Tdim, TValue >::import().
|
inlinestatic |
Create an arbitrary image from a vector
[in] | values | A vector (of vector of vector) where non-zero values indicates a voxel |
[in] | override_domain | Overrides infered domain if needed |
Definition at line 1028 of file Shortcuts.h.
References image(), and DGtal::HyperRectDomain< TSpace >::lowerBound().
|
inlinestatic |
Create an arbitrary image from a vector of positions
[in] | positions | A vector of positions to indicates locations of voxels |
[in] | values | A vector of values for each voxel |
[in] | override_domain | Overrides infered domain if needed |
Definition at line 1076 of file Shortcuts.h.
References image().
|
inlinestatic |
Create an arbitrary image from a vector
[in] | values | A vector where non-zero values indicates voxels |
[in] | d | The domain of the image |
Definition at line 999 of file Shortcuts.h.
References DGtal::HyperRectDomain< TSpace >::begin(), DGtal::HyperRectDomain< TSpace >::end(), and image().
|
inlinestatic |
Makes a gray-scale image from a binary image using the given transformation
[in] | binary_image | the input binary image. |
[in] | bool2grayscale | the binarizing function. |
Definition at line 895 of file Shortcuts.h.
|
inlinestatic |
Makes a gray-scale image from the given double image. (i.e. quantify the given image)..
[in] | fimage | a smart pointer on the double image. |
[in] | params | the parameters:
|
Definition at line 968 of file Shortcuts.h.
References domain, and DGtal::Shortcuts< TKSpace >::makeGrayScaleImage().
|
inlinestatic |
Makes a gray-scale image from the given float image (i.e. quantify the given image)..
[in] | fimage | a smart pointer on the float image. |
[in] | params | the parameters:
|
Definition at line 936 of file Shortcuts.h.
References domain, and DGtal::Shortcuts< TKSpace >::makeGrayScaleImage().
|
inlinestatic |
Makes an empty gray scale image within a given domain (values are unsigned char).
[in] | aDomain | any domain. |
Definition at line 869 of file Shortcuts.h.
Referenced by DGtal::Shortcuts< TKSpace >::makeGrayScaleImage(), DGtal::Shortcuts< TKSpace >::makeGrayScaleImage(), and DGtal::Shortcuts< TKSpace >::saveBinaryImage().
|
inlinestatic |
Loads an arbitrary binary image file (e.g. vol file in 3D) and returns the corresponding gray-scale image.
[in] | input | the input filename. |
Definition at line 881 of file Shortcuts.h.
References image(), and DGtal::GenericReader< TContainer, Tdim, TValue >::import().
|
inlinestatic |
Builds an indexed digital surface from a vector of light digital surfaces. Note that the surfel adjacency may be changed and a connected light digital surface could be disconnected in the process.
[in] | surfaces | a vector of smart pointers on light digital surfaces. |
[in] | params | the parameters:
|
Definition at line 1624 of file Shortcuts.h.
References K, DGtal::Shortcuts< TKSpace >::makeIdxDigitalSurface(), DGtal::trace, and DGtal::Trace::warning().
|
inlinestatic |
Builds an indexed digital surface from a space K and an arbitrary range of surfels.
[in] | surfels | an arbitrary range of surfels. |
[in] | K | the Khalimsky space whose domain encompasses the given surfels. |
[in] | params | the parameters:
|
Definition at line 1568 of file Shortcuts.h.
References K, DGtal::trace, and DGtal::Trace::warning().
|
inlinestatic |
Builds an indexed digital surface from a light digital surface. Note that the surfel adjacency may be changed and a connected light digital surface could be disconnected in the process.
TDigitalSurfaceContainer | either kind of DigitalSurfaceContainer |
[in] | surface | a smart pointer on a (light or not) digital surface (e.g. DigitalSurface or LightDigitalSurface). |
[in] | params | the parameters:
|
Definition at line 1601 of file Shortcuts.h.
References K, DGtal::Shortcuts< TKSpace >::makeIdxDigitalSurface(), DGtal::Shortcuts< TKSpace >::refKSpace(), and surface.
|
inlinestatic |
Builds an indexed digital surface from a space K and a binary image bimage. Note that it may connected or not depending on parameters.
[in] | bimage | a binary image representing the characteristic function of a digital shape. |
[in] | K | the Khalimsky space whose domain encompasses the digital shape. |
[in] | params | the parameters:
|
Definition at line 1535 of file Shortcuts.h.
References K, DGtal::Shortcuts< TKSpace >::makeIdxDigitalSurface(), DGtal::Shortcuts< TKSpace >::makeLightDigitalSurface(), and DGtal::Surfaces< TKSpace >::sMakeBoundary().
Referenced by DGtal::Shortcuts< TKSpace >::makeIdxDigitalSurface(), DGtal::Shortcuts< TKSpace >::makeIdxDigitalSurface(), and DGtal::Shortcuts< TKSpace >::makeIdxDigitalSurface().
|
inlinestatic |
Builds a 3D implicit shape from parameters
[in] | params | the parameters:
|
Definition at line 279 of file Shortcuts.h.
References DGtal::Trace::error(), DGtal::Shortcuts< TKSpace >::getPolynomialList(), and DGtal::trace.
Referenced by main().
|
inlinestatic |
Builds a light digital surface from a space K and a binary image bimage.
[in] | bimage | a binary image representing the characteristic function of a digital shape. |
[in] | K | the Khalimsky space whose domain encompasses the digital shape. |
[in] | params | the parameters:
|
Definition at line 1322 of file Shortcuts.h.
References DGtal::Trace::error(), DGtal::Surfaces< TKSpace >::findABel(), K, DGtal::trace, and DGtal::Trace::warning().
Referenced by DGtal::Shortcuts< TKSpace >::makeIdxDigitalSurface(), and DGtal::Shortcuts< TKSpace >::makeLightDigitalSurfaces().
|
inlinestatic |
Returns a vector containing either all the light digital surfaces in the binary image bimage, or any one of its big components according to parameters.
[in] | bimage | a binary image representing the characteristic function of a digital shape. |
[in] | K | the Khalimsky space whose domain encompasses the digital shape. |
[in] | params | the parameters:
|
Definition at line 1379 of file Shortcuts.h.
References K, and DGtal::Shortcuts< TKSpace >::makeLightDigitalSurfaces().
Referenced by DGtal::Shortcuts< TKSpace >::makeLightDigitalSurfaces().
|
inlinestatic |
Returns a vector containing either all the light digital surfaces in the binary image bimage, or any one of its big components according to parameters.
[out] | surfel_reps | a vector of surfels, one surfel per digital surface component. |
[in] | bimage | a binary image representing the characteristic function of a digital shape. |
[in] | K | the Khalimsky space whose domain encompasses the digital shape. |
[in] | params | the parameters:
|
Definition at line 1409 of file Shortcuts.h.
References K, DGtal::Shortcuts< TKSpace >::makeLightDigitalSurface(), and DGtal::Surfaces< TKSpace >::sMakeBoundary().
|
inlinestatic |
Builds a mesh (class Mesh) from a polygonal surface (class PolygonalSurface). Note that the mesh looses the topology of the polygonal surface, since it is essentially a soup of triangles.
[in] | polySurf | the input polygonal surface mesh. |
[in] | aColor | the default color of the mesh. |
Definition at line 2349 of file Shortcuts.h.
References DGtal::MeshHelpers::polygonalSurface2Mesh().
|
inlinestatic |
Builds a mesh (class Mesh) from a triangulated surface (class TriangulatedSurface). Note that the mesh looses the topology of the triangulated surface, since it is essentially a soup of triangles.
[in] | triSurf | the input triangulated surface mesh. |
[in] | aColor | the default color of the mesh. |
Definition at line 2332 of file Shortcuts.h.
References DGtal::MeshHelpers::triangulatedSurface2Mesh().
|
inlinestatic |
Builds the polygonal marching-cubes surface that approximate an iso-surface of value "thresholdMin+0.5" in the given 3D gray-scale image.
[in] | gray_scale_image | any gray-scale image. |
[in] | params | the parameters:
|
Definition at line 2449 of file Shortcuts.h.
References DGtal::MeshHelpers::digitalSurface2DualPolygonalSurface(), DGtal::Shortcuts< TKSpace >::getKSpace(), DGtal::ImageLinearCellEmbedder< TKSpace, TImage, TEmbedder >::init(), K, DGtal::Shortcuts< TKSpace >::makeBinaryImage(), and DGtal::Shortcuts< TKSpace >::makeDigitalSurface().
|
inlinestatic |
Builds a polygon mesh (class PolygonalSurface) from a mesh (class Mesh). The output polygonal surface rebuilds a topology between faces.
[in] | aMesh | any mesh (which should be a valid combinatorial surface). |
Definition at line 2427 of file Shortcuts.h.
References DGtal::MeshHelpers::mesh2PolygonalSurface().
|
inlinestatic |
Builds the primal polygonal surface associated to the given digital surface.
TContainer | the digital surface container |
[out] | c2i | the map Cell -> Vertex index in the polygonal surface. |
[in] | aSurface | any digital surface (e.g. DigitalSurface or LightDigitalSurface) |
Definition at line 2582 of file Shortcuts.h.
References DGtal::MeshHelpers::digitalSurface2PrimalPolygonalSurface(), DGtal::KhalimskySpaceND< dim, TInteger >::dimension, and DGtal::Shortcuts< TKSpace >::getCellEmbedder().
Referenced by DGtal::Shortcuts< TKSpace >::makePrimalPolygonalSurface(), and DGtal::Shortcuts< TKSpace >::makePrimalPolygonalSurface().
|
inlinestatic |
Builds the primal polygonal surface associated to the given digital surface.
TContainer | the digital surface container |
[in] | aSurface | any digital surface (e.g. DigitalSurface or LightDigitalSurface) |
Definition at line 2602 of file Shortcuts.h.
References DGtal::Shortcuts< TKSpace >::makePrimalPolygonalSurface().
|
inlinestatic |
Builds the primal polygonal surface associated to the given indexed digital surface.
TContainer | the digital surface container |
[in] | aSurface | any indexed digital surface (e.g. IdxDigitalSurface) |
Definition at line 2616 of file Shortcuts.h.
References DGtal::Shortcuts< TKSpace >::makeDigitalSurface(), and DGtal::Shortcuts< TKSpace >::makePrimalPolygonalSurface().
|
inlinestatic |
Builds the primal polygonal surface mesh associated to the given digital surface.
TContainer | the digital surface container |
[out] | c2i | the map Cell -> Vertex index in the polygonal surface. |
[in] | aSurface | any digital surface (e.g. DigitalSurface or LightDigitalSurface) |
Definition at line 2633 of file Shortcuts.h.
References DGtal::MeshHelpers::digitalSurface2PrimalSurfaceMesh(), DGtal::KhalimskySpaceND< dim, TInteger >::dimension, and DGtal::Shortcuts< TKSpace >::getCellEmbedder().
Referenced by DGtal::ShortcutsGeometry< TKSpace >::getCNCGaussianCurvatures(), DGtal::ShortcutsGeometry< TKSpace >::getCNCMeanCurvatures(), DGtal::ShortcutsGeometry< TKSpace >::getCNCPrincipalCurvaturesAndDirections(), main(), DGtal::Shortcuts< TKSpace >::makePrimalSurfaceMesh(), and DGtal::Shortcuts< TKSpace >::makePrimalSurfaceMesh().
|
inlinestatic |
Builds the primal polygonal surface associated to the given digital surface.
TContainer | the digital surface container |
[in] | aSurface | any digital surface (e.g. DigitalSurface or LightDigitalSurface) |
Definition at line 2651 of file Shortcuts.h.
References DGtal::Shortcuts< TKSpace >::makePrimalSurfaceMesh().
|
inlinestatic |
Builds the primal polygonal surface associated to the given indexed digital surface.
TContainer | the digital surface container |
[in] | aSurface | any indexed digital surface (e.g. IdxDigitalSurface) |
Definition at line 2665 of file Shortcuts.h.
References DGtal::Shortcuts< TKSpace >::makeDigitalSurface(), and DGtal::Shortcuts< TKSpace >::makePrimalSurfaceMesh().
|
inlinestatic |
Loads a surface mesh
[in] | path | Path to file |
Definition at line 2677 of file Shortcuts.h.
References DGtal::SurfaceMeshReader< TRealPoint, TRealVector >::readOBJ().
|
inlinestatic |
Builds the dual triangulated surface associated to the given digital surface.
TContainer | the digital surface container |
[in] | aSurface | any digital surface (e.g. LightDigitalSurface or DigitalSurface) |
Definition at line 2383 of file Shortcuts.h.
References DGtal::Shortcuts< TKSpace >::makeTriangulatedSurface().
|
inlinestatic |
Builds the marching-cubes surface that approximate an iso-surface of value "thresholdMin+0.5" in the given 3D gray-scale image. Non triangular faces are triangulated by putting a centroid vertex.
[in] | gray_scale_image | any gray-scale image. |
[in] | params | the parameters:
|
Definition at line 2492 of file Shortcuts.h.
References DGtal::MeshHelpers::digitalSurface2DualTriangulatedSurface(), DGtal::Shortcuts< TKSpace >::getKSpace(), DGtal::ImageLinearCellEmbedder< TKSpace, TImage, TEmbedder >::init(), K, DGtal::Shortcuts< TKSpace >::makeBinaryImage(), and DGtal::Shortcuts< TKSpace >::makeDigitalSurface().
|
inlinestatic |
Builds a triangulated surface (class TriangulatedSurface) from a mesh (class Mesh). Note that a triangulated surface contains only triangles, so polygonal faces (0,1,2,3,4,...) of the input mesh are (naively) triangulated (triangles (0,1,2), (0,2,3), (0,3,4), etc). Furthermore, the output triangulated surface rebuilds a topology between faces.
[in] | aMesh | any mesh (which should be a valid combinatorial surface). |
Definition at line 2315 of file Shortcuts.h.
References DGtal::MeshHelpers::mesh2TriangulatedSurface().
Referenced by DGtal::Shortcuts< TKSpace >::makeTriangulatedSurface().
|
inlinestatic |
Builds a triangulated surface from a polygonal surface.
[in] | polySurf | any polygonal surface. |
[in] | params | the parameters:
|
Definition at line 2407 of file Shortcuts.h.
References DGtal::MeshHelpers::polygonalSurface2TriangulatedSurface().
|
inlinestatic |
Builds the dual triangulated surface associated to the given digital surface.
TContainer | the digital surface container |
[out] | s2i | the map Surfel -> Vertex index in the triangulated surface. |
[in] | aSurface | any digital surface (e.g. LightDigitalSurface or DigitalSurface) |
Definition at line 2365 of file Shortcuts.h.
References DGtal::MeshHelpers::digitalSurface2DualTriangulatedSurface(), and DGtal::Shortcuts< TKSpace >::getCellEmbedder().
|
delete |
Copy assignment operator.
other | the object to copy. |
|
delete |
Move assignment operator.
other | the object to move. |
|
inlinestatic |
Definition at line 3485 of file Shortcuts.h.
References K.
|
inlinestatic |
Outputs a digital surface, seen from the dual point of view (surfels=vertices), as an OBJ file (3D only). Note that faces are oriented consistently (normals toward outside).
TDigitalSurfaceContainer | either model of concepts::CDigitalSurfaceContainer. |
[out] | output | the output stream. |
[in] | surface | a smart pointer on a digital surface (a DigitalSurface or a LightDigitalSurface). |
[in] | params | the parameters:
|
Definition at line 3225 of file Shortcuts.h.
References DGtal::Shortcuts< TKSpace >::getCellEmbedder(), DGtal::Shortcuts< TKSpace >::outputDualDigitalSurfaceAsObj(), and surface.
Referenced by DGtal::Shortcuts< TKSpace >::outputDualDigitalSurfaceAsObj().
|
inlinestatic |
Outputs a digital surface, seen from the dual point of view (surfels=vertices), as an OBJ file (3D only). Note that faces are oriented consistently (normals toward outside). Each vertex is mapped to a 3D point using the given cell embedder.
TDigitalSurfaceContainer | either model of concepts::CDigitalSurfaceContainer. |
TCellEmbedder | any model of CCellEmbedder |
[out] | output | the output stream. |
[in] | surface | a smart pointer on a digital surface (either DigitalSurface or LightDigitalSurface). |
[in] | embedder | the embedder for mapping (unsigned) surfels (cells of dimension 2) to points in space. |
[in] | params | the parameters:
|
Definition at line 3259 of file Shortcuts.h.
References DGtal::Shortcuts< TKSpace >::BOOST_CONCEPT_ASSERT(), DGtal::KhalimskySpaceND< dim, TInteger >::dimension, K, surface, and DGtal::PointVector< dim, TEuclideanRing, TContainer >::zero.
|
inlinestatic |
Outputs a digital surface, seen from the primal point of view (surfels=face), as an OBJ file (3D only). Note that faces are oriented consistently (normals toward outside).
TAnyDigitalSurface | either kind of DigitalSurface, like Shortcuts::LightDigitalSurface or Shortcuts::DigitalSurface. |
[out] | output | the output stream. |
[in] | surface | a smart pointer on a digital surface. |
Definition at line 3125 of file Shortcuts.h.
References DGtal::Shortcuts< TKSpace >::getCellEmbedder(), DGtal::Shortcuts< TKSpace >::outputPrimalDigitalSurfaceAsObj(), and surface.
Referenced by DGtal::Shortcuts< TKSpace >::outputPrimalDigitalSurfaceAsObj().
|
inlinestatic |
Outputs a digital surface, seen from the primal point of view (surfels=face), as an OBJ file (3D only). Note that faces are oriented consistently (normals toward outside). Each vertex is mapped to a 3D point using the given cell embedder.
TAnyDigitalSurface | either kind of DigitalSurface, like Shortcuts::LightDigitalSurface or Shortcuts::DigitalSurface. |
TCellEmbedder | any model of CCellEmbedder |
[out] | output | the output stream. |
[in] | surface | a smart pointer on a digital surface. |
[in] | embedder | the embedder for mapping surfel vertices (cells of dimension 0) to points in space. |
Definition at line 3153 of file Shortcuts.h.
References DGtal::Shortcuts< TKSpace >::getSurfelRange(), DGtal::Shortcuts< TKSpace >::outputSurfelsAsObj(), and surface.
|
inlinestatic |
Outputs an indexed digital surface, seen from the primal point of view (surfels=face), as an OBJ file (3D only). Note that faces are oriented consistently (normals toward outside).
[out] | output | the output stream. |
[in] | surface | a smart pointer on an indexed digital surface. |
Definition at line 3171 of file Shortcuts.h.
References DGtal::Shortcuts< TKSpace >::getCellEmbedder(), DGtal::Shortcuts< TKSpace >::outputPrimalIdxDigitalSurfaceAsObj(), and surface.
Referenced by DGtal::Shortcuts< TKSpace >::outputPrimalIdxDigitalSurfaceAsObj().
|
inlinestatic |
Outputs an indexed digital surface, seen from the primal point of view (surfels=face), as an OBJ file (3D only). Note that faces are oriented consistently (normals toward outside). Each vertex is mapped to a 3D point using the given cell embedder.
TCellEmbedder | any model of CCellEmbedder |
[out] | output | the output stream. |
[in] | surface | a smart pointer on an indexed digital surface. |
[in] | embedder | the embedder for mapping surfel vertices (cells of dimension 0) to points in space. |
Definition at line 3194 of file Shortcuts.h.
References DGtal::Shortcuts< TKSpace >::getIdxSurfelRange(), DGtal::Shortcuts< TKSpace >::outputSurfelsAsObj(), and surface.
|
inlinestatic |
Definition at line 3455 of file Shortcuts.h.
References K.
|
inlinestatic |
Outputs a range of surfels as an OBJ file, embedding each vertex using the given cell embedder (3D only).
TCellEmbedder | any model of CCellEmbedder |
[out] | output | the output stream. |
[in] | surfels | the range of surfels (oriented cells of dimension 2). |
[in] | embedder | the embedder for mapping surfel vertices (cells of dimension 0) to points in space. |
Definition at line 3074 of file Shortcuts.h.
References DGtal::Shortcuts< TKSpace >::BOOST_CONCEPT_ASSERT(), DGtal::KhalimskySpaceND< dim, TInteger >::dimension, DGtal::Shortcuts< TKSpace >::getPointelRange(), and K.
Referenced by DGtal::Shortcuts< TKSpace >::outputPrimalDigitalSurfaceAsObj(), and DGtal::Shortcuts< TKSpace >::outputPrimalIdxDigitalSurfaceAsObj().
|
inlinestatic |
Definition at line 544 of file Shortcuts.h.
Referenced by DGtal::Shortcuts< TKSpace >::defaultParameters().
|
inlinestatic |
Definition at line 1257 of file Shortcuts.h.
Referenced by DGtal::Shortcuts< TKSpace >::defaultParameters().
|
inlinestatic |
Definition at line 458 of file Shortcuts.h.
Referenced by DGtal::Shortcuts< TKSpace >::defaultParameters().
|
inlinestatic |
Definition at line 856 of file Shortcuts.h.
Referenced by DGtal::Shortcuts< TKSpace >::defaultParameters().
|
inlinestatic |
Definition at line 262 of file Shortcuts.h.
Referenced by DGtal::Shortcuts< TKSpace >::defaultParameters().
|
inlinestatic |
Definition at line 308 of file Shortcuts.h.
Referenced by DGtal::Shortcuts< TKSpace >::defaultParameters().
|
inlinestatic |
Definition at line 2297 of file Shortcuts.h.
Referenced by DGtal::Shortcuts< TKSpace >::defaultParameters().
|
inlinestatic |
Definition at line 2936 of file Shortcuts.h.
Referenced by DGtal::Shortcuts< TKSpace >::defaultParameters().
|
inlinestatic |
TDigitalSurfaceContainer | either kind of DigitalSurfaceContainer |
[in] | surface | a smart pointer on a (light or not) digital surface (e.g. DigitalSurface or LightDigitalSurface). |
Definition at line 415 of file Shortcuts.h.
References surface.
Referenced by DGtal::Shortcuts< TKSpace >::getCellEmbedder(), DGtal::Shortcuts< TKSpace >::getCellEmbedder(), DGtal::Shortcuts< TKSpace >::getCellRange(), DGtal::Shortcuts< TKSpace >::getPointelRange(), DGtal::Shortcuts< TKSpace >::getSCellEmbedder(), DGtal::Shortcuts< TKSpace >::getSCellEmbedder(), DGtal::Shortcuts< TKSpace >::makeDigitalSurface(), DGtal::Shortcuts< TKSpace >::makeIdxDigitalSurface(), DGtal::Shortcuts< TKSpace >::saveOBJ(), and DGtal::Shortcuts< TKSpace >::saveOFF().
|
inlinestatic |
TDigitalSurfaceContainer | either kind of DigitalSurfaceContainer |
[in] | surface | a smart pointer on any indexed digital surface. |
Definition at line 426 of file Shortcuts.h.
References surface.
|
inlinestatic |
Saves an arbitrary binary image file (e.g. vol file in 3D).
[in] | bimage | the input binary image. |
[in] | output | the output filename . |
Definition at line 840 of file Shortcuts.h.
References DGtal::Shortcuts< TKSpace >::makeGrayScaleImage(), and DGtal::Shortcuts< TKSpace >::saveGrayScaleImage().
|
inlinestatic |
Saves an arbitrary gray-scale image file (e.g. vol file in 3D).
[in] | gray_scale_image | the input gray-scale image. |
[in] | output | the output filename . |
Definition at line 916 of file Shortcuts.h.
Referenced by DGtal::Shortcuts< TKSpace >::saveBinaryImage().
|
inlinestatic |
Outputs a digital surface as an OBJ file (with its topology) and a material MTL file. Optionnaly you can specify the surfels normals and diffuse colors. Here surfels are canonically embedded into the space.
TDigitalSurfaceContainer | any model of concepts::CDigitalSurfaceContainer |
[in] | digsurf | the digital surface to output as an OBJ file |
[in] | normals | the normal vector per face. |
[in] | diffuse_colors | either empty or a vector of size trisurf.nbFaces specifying the diffuse color for each face. |
[in] | objfile | the output filename. |
[in] | ambient_color | the ambient color of all faces. |
[in] | diffuse_color | the diffuse color of all faces (if diffuse_colors is empty). |
[in] | specular_color | the specular color of all faces. |
Definition at line 2119 of file Shortcuts.h.
References DGtal::Shortcuts< TKSpace >::getCellEmbedder(), and DGtal::Shortcuts< TKSpace >::saveOBJ().
|
inlinestatic |
Outputs a digital surface as an OBJ file (with its topology) and a material MTL file. Optionnaly you can specify the surfels normals and diffuse colors, and even specify how 0-cells are embedded into the space.
TDigitalSurfaceContainer | any model of concepts::CDigitalSurfaceContainer |
TCellEmbedder | any type for maping Cell -> RealPoint. |
[in] | digsurf | the digital surface to output as an OBJ file |
[in] | embedder | any map Cell->RealPoint |
[in] | normals | the normal vector per face. |
[in] | diffuse_colors | either empty or a vector of size trisurf.nbFaces specifying the diffuse color for each face. |
[in] | objfile | the output filename. |
[in] | ambient_color | the ambient color of all faces. |
[in] | diffuse_color | the diffuse color of all faces (if diffuse_colors is empty). |
[in] | specular_color | the specular color of all faces. |
Definition at line 1999 of file Shortcuts.h.
References DGtal::KhalimskySpaceND< dim, TInteger >::dimension, DGtal::MeshHelpers::exportMTLNewMaterial(), DGtal::Shortcuts< TKSpace >::getPointelRange(), K, DGtal::Shortcuts< TKSpace >::refKSpace(), and DGtal::PointVector< dim, TEuclideanRing, TContainer >::size().
Referenced by DGtal::Shortcuts< TKSpace >::saveOBJ(), and DGtal::Shortcuts< TKSpace >::saveOBJ().
|
inlinestatic |
Outputs a digital surface as an OBJ file (with its topology) and a simple MTL file. Here surfels are canonically embedded into the space.
TDigitalSurfaceContainer | any model of concepts::CDigitalSurfaceContainer |
[in] | digsurf | the digital surface to output as an OBJ file |
[in] | objfile | the output filename. |
[in] | ambient_color | the ambient color of all faces. |
[in] | diffuse_color | the diffuse color of all faces (if diffuse_colors is empty). |
[in] | specular_color | the specular color of all faces. |
Definition at line 2170 of file Shortcuts.h.
References DGtal::Shortcuts< TKSpace >::getCellEmbedder(), and DGtal::Shortcuts< TKSpace >::saveOBJ().
|
inlinestatic |
Outputs a polygonal surface as an OBJ file (with its topology) (and a material MTL file).
TPoint | any model of point |
[in] | polysurf | the polygonal surface to output as an OBJ file |
[in] | normals | the normal vector per face. |
[in] | diffuse_colors | either empty or a vector of size polysurf.nbFaces specifying the diffuse color for each face. |
[in] | objfile | the output filename. |
[in] | ambient_color | the ambient color of all faces. |
[in] | diffuse_color | the diffuse color of all faces (if diffuse_colors is empty). |
[in] | specular_color | the specular color of all faces. |
Definition at line 2788 of file Shortcuts.h.
References DGtal::MeshHelpers::exportOBJwithFaceNormalAndColor().
|
inlinestatic |
Outputs a polygonal surface as an OBJ file (with its topology).
TPoint | any model of point |
[in] | polysurf | the polygonal surface to output as an OBJ file |
[in] | objfile | the output filename. |
Definition at line 2719 of file Shortcuts.h.
References DGtal::MeshHelpers::exportOBJ().
|
inlinestatic |
Outputs a SurfaceMesh as an OBJ file (with its topology) (and a material MTL file).
TPoint | any model of point |
TVector | any model of vector |
[in] | surf | the surface to output as an OBJ file |
[in] | normals | the normal vector per face. |
[in] | diffuse_colors | either empty or a vector of size trisurf.nbFaces specifying the diffuse color for each face. |
[in] | objfile | the output filename. |
[in] | ambient_color | the ambient color of all faces. |
[in] | diffuse_color | the diffuse color of all faces (if diffuse_colors is empty). |
[in] | specular_color | the specular color of all faces. |
Definition at line 2873 of file Shortcuts.h.
References DGtal::MeshHelpers::exportOBJwithFaceNormalAndColor().
|
inlinestatic |
Outputs a SurfaceMesh as an OBJ file (with its topology).
TPoint | any model of point |
TVector | any model of vector |
[in] | surf | the surface to output as an OBJ file |
[in] | objfile | the output filename. |
Definition at line 2701 of file Shortcuts.h.
References DGtal::MeshHelpers::exportOBJ().
|
inlinestatic |
Outputs a triangulated surface as an OBJ file (with its topology) (and a material MTL file).
TPoint | any model of point |
[in] | trisurf | the triangulated surface to output as an OBJ file |
[in] | normals | the normal vector per face. |
[in] | diffuse_colors | either empty or a vector of size trisurf.nbFaces specifying the diffuse color for each face. |
[in] | objfile | the output filename. |
[in] | ambient_color | the ambient color of all faces. |
[in] | diffuse_color | the diffuse color of all faces (if diffuse_colors is empty). |
[in] | specular_color | the specular color of all faces. |
Definition at line 2830 of file Shortcuts.h.
References DGtal::MeshHelpers::exportOBJwithFaceNormalAndColor().
|
inlinestatic |
Outputs a triangulated surface as an OBJ file (with its topology).
TPoint | any model of point |
[in] | trisurf | the triangulated surface to output as an OBJ file |
[in] | objfile | the output filename. |
Definition at line 2764 of file Shortcuts.h.
References DGtal::MeshHelpers::exportOBJ().
|
inlinestatic |
Outputs a digital surface as an OFF file (with its topology). Optionnaly you can specify the face colors (see saveOBJ for a more advanced export).
TDigitalSurfaceContainer | any model of concepts::CDigitalSurfaceContainer |
TCellEmbedder | any type for maping Cell -> RealPoint. |
[in] | digsurf | the digital surface to output as an OBJ file |
[in] | embedder | any map Cell->RealPoint |
[in] | face_color | the color of every face. |
[in] | off_file | the output filename. |
Definition at line 1933 of file Shortcuts.h.
References DGtal::KhalimskySpaceND< dim, TInteger >::dimension, DGtal::Shortcuts< TKSpace >::getPointelRange(), K, DGtal::Color::None, and DGtal::Shortcuts< TKSpace >::refKSpace().
Referenced by DGtal::Shortcuts< TKSpace >::saveOFF().
|
inlinestatic |
Outputs a digital surface as an OFF file (with its topology). Here surfels are canonically embedded into the space. Optionnaly you can specify the face colors (see saveOBJ for a more advanced export).
Outputs a digital surface as an OFF.
TDigitalSurfaceContainer | any model of concepts::CDigitalSurfaceContainer |
[in] | digsurf | the digital surface to output as an OBJ file |
[in] | off_file | the output filename. |
[in] | face_color | the color of every face. |
Definition at line 2148 of file Shortcuts.h.
References DGtal::Shortcuts< TKSpace >::getCellEmbedder(), and DGtal::Shortcuts< TKSpace >::saveOFF().
|
inlinestatic |
Outputs a triangulated surface as an OFF file.
TPoint | any model of point |
[in] | polysurf | the polygonal surface to output as an OBJ file |
[in] | off_file | the output filename. |
[in] | face_color | the color of every face. |
Definition at line 2739 of file Shortcuts.h.
References DGtal::MeshWriter< TPoint >::export2OFF(), DGtal::Mesh< TPoint >::nbFaces(), DGtal::MeshHelpers::polygonalSurface2Mesh(), and DGtal::Mesh< TPoint >::setFaceColor().
|
inlinestatic |
Outputs a triangulated surface as an OFF file.
TPoint | any model of point |
[in] | trisurf | the triangulated surface to output as an OBJ file |
[in] | off_file | the output filename. |
[in] | face_color | the color of all faces. |
Definition at line 2911 of file Shortcuts.h.
References DGtal::MeshWriter< TPoint >::export2OFF(), DGtal::Mesh< TPoint >::nbFaces(), DGtal::Mesh< TPoint >::setFaceColor(), and DGtal::MeshHelpers::triangulatedSurface2Mesh().
|
inlinestatic |
Outputs any vector field vf anchored at positions as an OBJ file and a material MTL file. Optionnaly you can specify the diffuse colors.
[in] | positions | the bases of the vectors of the vector field. |
[in] | vf | the vector field (an array of real vectors). |
[in] | thickness | the thickness of the sticks representing the vector field. |
[in] | diffuse_colors | either empty or a vector of size normals.size() specifying the diffuse color for each face. |
[in] | objfile | the output filename. |
[in] | ambient_color | the ambient color of all vectors. |
[in] | diffuse_color | the diffuse color of all vectors (if diffuse_colors is empty). |
[in] | specular_color | the specular color of all vectors. |
Definition at line 2199 of file Shortcuts.h.
References DGtal::PointVector< dim, TEuclideanRing, TContainer >::begin(), DGtal::PointVector< dim, TEuclideanRing, TContainer >::crossProduct(), DGtal::KhalimskySpaceND< dim, TInteger >::dimension, DGtal::PointVector< dim, TEuclideanRing, TContainer >::end(), and DGtal::MeshHelpers::exportMTLNewMaterial().
|
inline |
Writes/Displays the object on an output stream.
out | the output stream where the object is written. |
Definition at line 3598 of file Shortcuts.h.