Hugintrunk
0.1
|
An accessor to encapsulate write access to a multiband image, and move divide it into two images. More...
#include <FunctorAccessor.h>
Public Types | |
typedef Acc1::value_type | image_type1 |
value type of image 1 More... | |
typedef Acc2::value_type | image_type2 |
value type of image 2 More... | |
Public Member Functions | |
ImageSplittingAccessor (Iter1 i1, Acc1 a1, Iter2 i2, Acc2 a2) | |
Construct from two image iterators and associated accessors. More... | |
template<class V , class ITERATOR > | |
void | setComponent (V const &value, ITERATOR const &i, int idx) const |
write value V into the two images. More... | |
Protected Member Functions | |
template<class V , class ITERATOR > | |
void | setComponentIsScalar (V const &value, ITERATOR const &i, int idx, vigra::VigraTrueType) const |
if first dest image is scalar More... | |
template<class V , class ITERATOR > | |
void | setComponentIsScalar (V const &value, ITERATOR const &i, int idx, vigra::VigraFalseType) const |
if first dest image is vector image More... | |
template<class V , class ITERATOR > | |
void | setComponentScalarIsScalar (V const &value, ITERATOR const &i, int idx, vigra::VigraTrueType) const |
if scalar & scalar image More... | |
template<class V , class ITERATOR > | |
void | setComponentScalarIsVector (V const &value, ITERATOR const &i, int idx, vigra::VigraTrueType) const |
if scalar & vector image More... | |
template<class V , class ITERATOR > | |
void | setComponentVectorIsScalar (V const &value, ITERATOR const &i, int idx, vigra::VigraTrueType) const |
if vector & scalar image More... | |
template<class V , class ITERATOR > | |
void | setComponentVectorIsVector (V const &value, ITERATOR const &i, int idx, vigra::VigraTrueType) const |
if vector & vector image More... | |
Protected Attributes | |
Iter1 | i1_ |
Acc1 | a1_ |
Iter2 | i2_ |
Acc2 | a2_ |
An accessor to encapsulate write access to a multiband image, and move divide it into two images.
This is particulary useful, if a multiband image should be splitted into separate images during import operations. Then one doesn't need to create a temporary image.
This can be used to copy a 4 band image into a 3 band image and a 1 band image, with a single copyImage, or during other operations.
For example, some images contain an alpha channel, and depending on the application, this doesn't need to have the same type, for example, float RGB channels, uint8 mask channel. Many algorithms provided by vigra also expect the masks and the image in separate images.
The following image combinations are supported so far:
This accessor is quite slow. It checks the vector indicies on every access.
This is not a complete accessor, only write operations are supported.
value_type is not specified correctly, I don't know how to merge them properly with template programming.
Requirements: both images need to have the same elementary type
Definition at line 441 of file FunctorAccessor.h.
typedef Acc1::value_type vigra_ext::ImageSplittingAccessor< Iter1, Acc1, Iter2, Acc2, SIZE >::image_type1 |
value type of image 1
Definition at line 445 of file FunctorAccessor.h.
typedef Acc2::value_type vigra_ext::ImageSplittingAccessor< Iter1, Acc1, Iter2, Acc2, SIZE >::image_type2 |
value type of image 2
Definition at line 448 of file FunctorAccessor.h.
|
inline |
Construct from two image iterators and associated accessors.
Definition at line 455 of file FunctorAccessor.h.
|
inline |
write value V into the two images.
V has to be a stl compatible vector type, the two images can be of vector or scalar types.
Definition at line 466 of file FunctorAccessor.h.
References vigra_ext::ImageSplittingAccessor< Iter1, Acc1, Iter2, Acc2, SIZE >::setComponentIsScalar().
|
inlineprotected |
if first dest image is scalar
Definition at line 531 of file FunctorAccessor.h.
References vigra_ext::ImageSplittingAccessor< Iter1, Acc1, Iter2, Acc2, SIZE >::setComponentScalarIsScalar().
Referenced by vigra_ext::ImageSplittingAccessor< Iter1, Acc1, Iter2, Acc2, SIZE >::setComponent().
|
inlineprotected |
if first dest image is vector image
Definition at line 540 of file FunctorAccessor.h.
References vigra_ext::ImageSplittingAccessor< Iter1, Acc1, Iter2, Acc2, SIZE >::setComponentVectorIsScalar().
|
inlineprotected |
if scalar & scalar image
Definition at line 549 of file FunctorAccessor.h.
References vigra_ext::ImageSplittingAccessor< Iter1, Acc1, Iter2, Acc2, SIZE >::a1_, vigra_ext::ImageSplittingAccessor< Iter1, Acc1, Iter2, Acc2, SIZE >::a2_, vigra_ext::ImageSplittingAccessor< Iter1, Acc1, Iter2, Acc2, SIZE >::i1_, and vigra_ext::ImageSplittingAccessor< Iter1, Acc1, Iter2, Acc2, SIZE >::i2_.
Referenced by vigra_ext::ImageSplittingAccessor< Iter1, Acc1, Iter2, Acc2, SIZE >::setComponentIsScalar().
|
inlineprotected |
if scalar & vector image
Definition at line 566 of file FunctorAccessor.h.
|
inlineprotected |
if vector & scalar image
Definition at line 574 of file FunctorAccessor.h.
References vigra_ext::ImageSplittingAccessor< Iter1, Acc1, Iter2, Acc2, SIZE >::a1_, vigra_ext::ImageSplittingAccessor< Iter1, Acc1, Iter2, Acc2, SIZE >::a2_, vigra_ext::ImageSplittingAccessor< Iter1, Acc1, Iter2, Acc2, SIZE >::i1_, and vigra_ext::ImageSplittingAccessor< Iter1, Acc1, Iter2, Acc2, SIZE >::i2_.
Referenced by vigra_ext::ImageSplittingAccessor< Iter1, Acc1, Iter2, Acc2, SIZE >::setComponentIsScalar().
|
inlineprotected |
if vector & vector image
Definition at line 590 of file FunctorAccessor.h.
|
protected |
|
protected |
|
protected |
|
protected |