Aim: Define utilities to convert a digital set into an image.
More...
#include <DGtal/images/imagesSetsUtils/ImageFromSet.h>
|
template<typename Set > |
static Image | create (const Set &aSet, const Value &defaultValue, const bool addBorder, typename Set::ConstIterator itBegin, typename Set::ConstIterator itEnd, const bool keepSetDomain=false) |
|
template<typename Set > |
static Image | create (const Set &aSet, const Value &defaultValue, const bool addBorder=false, const bool keepSetDomain=false) |
|
template<typename Set > |
static void | append (Image &aImage, const Value &defaultValue, typename Set::ConstIterator itBegin, typename Set::ConstIterator itEnd) |
|
template<typename Set > |
static void | append (Image &aImage, const Set &aSet, const Value &defaultValue) |
|
template<typename TImage>
struct DGtal::ImageFromSet< TImage >
Aim: Define utilities to convert a digital set into an image.
Description of template class 'ImageFromSet'
- Template Parameters
-
TImage | an model of CImageContainer concept. |
Definition at line 63 of file ImageFromSet.h.
◆ Image
template<typename TImage >
◆ Value
template<typename TImage >
◆ append() [1/2]
template<typename TImage >
template<typename Set >
Append a Set to an existing image. Only points in the Set contained in the image domain are considered.
- Template Parameters
-
- Parameters
-
aImage | an image |
aSet | an instance of Set to convert into an image |
defaultValue | the default value for points in the set to copy. |
Definition at line 152 of file ImageFromSet.h.
153 {
154 append<Set>(aImage,defaultValue,aSet.begin(),aSet.end());
155 }
static void append(Image &aImage, const Value &defaultValue, typename Set::ConstIterator itBegin, typename Set::ConstIterator itEnd)
References DGtal::ImageFromSet< TImage >::append().
◆ append() [2/2]
template<typename TImage >
template<typename Set >
static void DGtal::ImageFromSet< TImage >::append |
( |
Image & | aImage, |
|
|
const Value & | defaultValue, |
|
|
typename Set::ConstIterator | itBegin, |
|
|
typename Set::ConstIterator | itEnd ) |
|
static |
Append a Set to an existing image. Only points in the Set between itBegin and itEnd contained in the image domain are considered.
- Template Parameters
-
- Parameters
-
aImage | an image |
defaultValue | the default value for points in the set |
itBegin | ConstIterator on the set to specify the first point to copy of a Set. |
itEnd | ConstIterator on the set to specify the last point to copy of a Set. |
Referenced by DGtal::ImageFromSet< TImage >::append().
◆ BOOST_CONCEPT_ASSERT()
template<typename TImage >
◆ create() [1/2]
template<typename TImage >
template<typename Set >
static Image DGtal::ImageFromSet< TImage >::create |
( |
const Set & | aSet, |
|
|
const Value & | defaultValue, |
|
|
const bool | addBorder, |
|
|
typename Set::ConstIterator | itBegin, |
|
|
typename Set::ConstIterator | itEnd, |
|
|
const bool | keepSetDomain = false ) |
|
static |
Create an Image from a DigitalSet. The size of the output image is given from the set bounding box.
- Template Parameters
-
- Parameters
-
aSet | an instance of Set to convert into an image |
defaultValue | the default value for points in the set |
addBorder | if true, we add a border of size 1 of defaultValue around the set. |
itBegin | ConstIterator on the set to specify the first point to copy. |
itEnd | ConstIterator on the set to specify the last point to copy. |
keepSetDomain | if true, the set domain is used to create the resulting image, else the bouding box of the set is used. |
- Returns
- an image.
Referenced by DGtal::ImageFromSet< TImage >::create(), testBreadthFirstPropagation(), testDepthFirstPropagation(), and testDistancePropagation().
◆ create() [2/2]
template<typename TImage >
template<typename Set >
static Image DGtal::ImageFromSet< TImage >::create |
( |
const Set & | aSet, |
|
|
const Value & | defaultValue, |
|
|
const bool | addBorder = false, |
|
|
const bool | keepSetDomain = false ) |
|
inlinestatic |
Create an Image from a DigitalSet. The size of the output image is given from the set bounding box.
- Template Parameters
-
- Parameters
-
aSet | an instance of Set to convert into an image |
defaultValue | the default value for points in the set |
addBorder | if true, we add a border of size 1 of defaultValue around the set. |
keepSetDomain | if true, the set domain is used to create the resulting image, else the bouding box of the set is used. |
- Returns
- an image.
Definition at line 114 of file ImageFromSet.h.
116 {
117 return create(aSet,defaultValue,addBorder,aSet.begin(), aSet.end(), keepSetDomain);
118 }
static Image create(const Set &aSet, const Value &defaultValue, const bool addBorder, typename Set::ConstIterator itBegin, typename Set::ConstIterator itEnd, const bool keepSetDomain=false)
References DGtal::ImageFromSet< TImage >::create().
The documentation for this struct was generated from the following file: