DGtal  1.5.beta
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.

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  }
TImageContainer::Domain Domain
Definition: Image.h:82
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: