DGtal 1.3.0
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions
DGtal::SetFromImage< TSet > Struct Template Reference

Aim: Define utilities to convert a digital set into an image. More...

#include <DGtal/images/imagesSetsUtils/SetFromImage.h>

Public Types

typedef TSet Set
 

Public Member Functions

 BOOST_CONCEPT_ASSERT ((concepts::CDigitalSet< Set >))
 

Static Public Member Functions

template<typename Image , typename ForegroundPredicate >
static void append (Set &aSet, const ForegroundPredicate &isForeground, typename Image::Domain::ConstIterator itBegin, typename Image::Domain::ConstIterator itEnd)
 
template<typename Image >
static void append (Set &aSet, const Image &aImage, const typename Image::Value minVal, const typename Image::Value maxVal, typename Image::Domain::ConstIterator itBegin, typename Image::Domain::ConstIterator itEnd)
 
template<typename Image , typename ForegroundPredicate >
static void append (Set &aSet, const Image &aImage, const ForegroundPredicate &isForeground)
 
template<typename Image >
static void append (Set &aSet, const Image &aImage, const typename Image::Value minVal, const typename Image::Value maxVal)
 

Detailed Description

template<typename TSet>
struct DGtal::SetFromImage< TSet >

Aim: Define utilities to convert a digital set into an image.

Description of template class 'SetFromImage'

Template Parameters
TSetan model of CImageContainer concept.
Examples
geometry/surfaces/greedy-plane-segmentation-ex2.cpp, geometry/surfaces/greedy-plane-segmentation.cpp, graph/volDistanceTraversal.cpp, io/digitalSetFromVol.cpp, io/display3DToOFF.cpp, shapes/viewMarchingCubes.cpp, shapes/viewPolygonalMarchingCubes.cpp, topology/3dBorderExtractionImg.cpp, topology/ctopo-2-3d.cpp, topology/ctopo-2.cpp, topology/digitalSurfaceSlice.cpp, topology/volBreadthFirstTraversal.cpp, topology/volMarchingCubes.cpp, topology/volScanBoundary.cpp, topology/volToOFF.cpp, topology/volTrackBoundary.cpp, and tutorial-examples/freemanChainFromImage.cpp.

Definition at line 63 of file SetFromImage.h.

Member Typedef Documentation

◆ Set

template<typename TSet >
typedef TSet DGtal::SetFromImage< TSet >::Set

Definition at line 65 of file SetFromImage.h.

Member Function Documentation

◆ append() [1/4]

template<typename TSet >
template<typename Image , typename ForegroundPredicate >
static void DGtal::SetFromImage< TSet >::append ( Set aSet,
const ForegroundPredicate &  isForeground,
typename Image::Domain::ConstIterator  itBegin,
typename Image::Domain::ConstIterator  itEnd 
)
static

Append an Image value set to an existing Set (maybe empty).

Precondition
the ForegroundPredicate instance must have been created on the image aImage.
Parameters
aSetthe set (maybe empty) to which points are added.
isForegroundinstance of ForegroundPredicate to decide
itBeginstarting point in the input image Domain.
itEndending point in the input image domain. which points to copy.

Referenced by DGtal::SetFromImage< TSet >::append().

◆ append() [2/4]

template<typename TSet >
template<typename Image , typename ForegroundPredicate >
static void DGtal::SetFromImage< TSet >::append ( Set aSet,
const Image aImage,
const ForegroundPredicate &  isForeground 
)
inlinestatic

Append an Image value set to an existing Set (maybe empty).

Precondition
the ForegroundPredicate instance must have been created on the image aImage.
Parameters
aSetthe set (maybe empty) to which points are added.
aImageimage to convert to a Set.
isForegroundinstance of ForegroundPredicate to decide which points to copy.

Definition at line 125 of file SetFromImage.h.

126 {
127 typename Image::Domain domain=aImage.domain();
128
129 append<Image,ForegroundPredicate>(aSet,isForeground,domain.begin(),domain.end());
130 }
Domain domain

References DGtal::Image< TImageContainer >::domain(), and domain.

◆ append() [3/4]

template<typename TSet >
template<typename Image >
static void DGtal::SetFromImage< TSet >::append ( Set aSet,
const Image aImage,
const typename Image::Value  minVal,
const typename Image::Value  maxVal 
)
inlinestatic

Append an Image value set to an existing Set (maybe empty). This method will construct a default ForegroundPredicate instance as a simple thresholding (SimpleForegroundPredicate) of values in ]minVal,maxVal].

Parameters
aSetthe set (maybe empty) to which points are added.
aImageimage to convert to a Set.
minValminimum value of the thresholding
maxValmaximum value of the thresholding

Definition at line 146 of file SetFromImage.h.

149 {
150 functors::IntervalForegroundPredicate<Image> isForeground(aImage,minVal,maxVal);
151 append(aSet,aImage,isForeground);
152 }
static void append(Set &aSet, const ForegroundPredicate &isForeground, typename Image::Domain::ConstIterator itBegin, typename Image::Domain::ConstIterator itEnd)

References DGtal::SetFromImage< TSet >::append().

◆ append() [4/4]

template<typename TSet >
template<typename Image >
static void DGtal::SetFromImage< TSet >::append ( Set aSet,
const Image aImage,
const typename Image::Value  minVal,
const typename Image::Value  maxVal,
typename Image::Domain::ConstIterator  itBegin,
typename Image::Domain::ConstIterator  itEnd 
)
inlinestatic

Append an Image value set to an existing Set (maybe empty). This method will construct a default ForegroundPredicate instance as a simple thresholding (SimpleForegroundPredicate) of values in ]minVal,maxVal].

Parameters
aSetthe set (maybe empty) to which points are added.
aImagethe image.
minValminimum value of the thresholding
maxValmaximum value of the thresholding
itBeginstarting point in the input image Domain.
itEndending point in the input image domain.

Definition at line 102 of file SetFromImage.h.

107 {
108 functors::IntervalForegroundPredicate<Image> isForeground(aImage,minVal,maxVal);
109
110 append(aSet, isForeground,itBegin,itEnd);
111 }

References DGtal::SetFromImage< TSet >::append().

◆ BOOST_CONCEPT_ASSERT()

template<typename TSet >
DGtal::SetFromImage< TSet >::BOOST_CONCEPT_ASSERT ( (concepts::CDigitalSet< Set >)  )

The documentation for this struct was generated from the following file: