37 #ifndef AIMS_UTILITY_MERGE_H 38 #define AIMS_UTILITY_MERGE_H 61 template <
class T,
class U>
97 template <
class T,
class U>
107 template <
class T,
class U>
inline 122 for (it1=res.
begin(),it2=mask.
begin();it1<res.
end();it1++,it2++)
123 if (*it2) *it1 = (T)*it2;
126 for (it1=res.
begin(),it2=mask.
begin();it1<res.
end();it1++,it2++)
127 if (*it2==_label) *it1 = (T)_value;
130 for (it1=res.
begin(),it2=mask.
begin();it1<res.
end();it1++,it2++)
131 if (*it2) *it1 = (T)_value;
134 _value = res.maximum() + 1;
135 for (it1=res.
begin(),it2=mask.
begin();it1<res.
end();it1++,it2++)
136 if (*it2==_label) *it1 = (T)_value;
139 _value = res.maximum() + 1;
140 for (it1=res.
begin(),it2=mask.
begin();it1<res.
end();it1++,it2++)
141 if (*it2) *it1 = (T)_value;
BucketMap< Void > * mask(const BucketMap< Void > &src, const BucketMap< Void > &m, bool intersect=true)
mask src object with m.
const T * const_iterator
basic constant iterator
AimsData< T > operator()(const AimsData< T > &data, const AimsData< U > &mask)
Return the result of the merge of a data and a byte label data.
T * iterator
basic iterator
The template class to merge data and byte label data.
virtual ~AimsMerge()
Destructor does nothing.
AimsData< T > clone() const
U _label
Label to consider.
AimsMerge(merge_t type, T value=0, U label=0)
The programmer must provide a type of merging.