DGtal  0.6.devel
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Static Public Member Functions
InsertAndAlwaysSetValue< I, S, D, V > Struct Template Reference

Static Public Member Functions

static bool implementation (I &aImg, S &aSet, const typename D::Point &aPoint, const V &aValue)

Detailed Description

template<typename I, typename S, typename D, typename V>
struct InsertAndAlwaysSetValue< I, S, D, V >

Definition at line 228 of file ImageHelper.ih.


Member Function Documentation

template<typename I , typename S , typename D , typename V >
static bool InsertAndAlwaysSetValue< I, S, D, V >::implementation ( I &  aImg,
S &  aSet,
const typename D::Point &  aPoint,
const V &  aValue 
)
inlinestatic

Definition at line 230 of file ImageHelper.ih.

Referenced by DGtal::insertAndAlwaysSetValue().

{
// std::pair<typename S::Iterator, bool> res
// = aSet.insert( aPoint );
// aImg.setValue( aPoint, aValue );
// return res.second;
bool found = false;
if ( aSet.find( aPoint ) != aSet.end() )
found = true;
//always set value
aSet.insert( aPoint );
aImg.setValue( aPoint, aValue );
return !found;
}

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