![]() |
aimsdata 6.0.0
Neuroimaging data handling
|
Replacement of (label) values in a volume. More...
#include <aims/utility/linearcomb.h>
Public Types | |
| typedef std::map< T, T, carto::KeyComparatorLess< T > > | MapType |
Public Member Functions | |
| Replacer () | |
| ~Replacer () | |
Static Public Member Functions | |
| static void | replace (const carto::Volume< T > &ivol, carto::Volume< T > &ovol, const aims::Replacer< T >::MapType &repl) |
| Replace values from "repl" keys, from the input volume ivol, to the correspodinf repl values in the output volume ovol. | |
Replacement of (label) values in a volume.
Values are replaced at once, thus it does not suffer from overlapping values if ivol is ovol (which would happen for instance in a loop replacing one value after another).
Definition at line 100 of file linearcomb.h.
| typedef std::map<T, T, carto::KeyComparatorLess<T> > aims::Replacer< T >::MapType |
Definition at line 108 of file linearcomb.h.
|
inline |
Definition at line 110 of file linearcomb.h.
|
inline |
Definition at line 111 of file linearcomb.h.
|
inlinestatic |
Replace values from "repl" keys, from the input volume ivol, to the correspodinf repl values in the output volume ovol.
Only actually replaced values will be written in ovol, other will be left untouched.
It is OK to specify the same volume as ivol and ovol, then it will be replaced in-place.
Definition at line 166 of file linearcomb.h.
References carto::Volume< typename T >::at(), carto::NDIterator_base::ended(), carto::VolumeProxy< typename T >::getSize(), carto::Volume< typename T >::getStrides(), carto::const_line_NDIterator< typename T >::inc_line_ptr(), carto::line_NDIterator_base::line_direction(), carto::const_line_NDIterator< typename T >::line_length(), and carto::NDIterator_base::position().