#include <FunctorAccessor.h>
Public Types | |
| typedef Acc1::value_type | image_type1 |
| value type of image 1 | |
| typedef Acc2::value_type | image_type2 |
| value type of image 2 | |
Public Member Functions | |
| ImageSplittingAccessor (Iter1 i1, Acc1 a1, Iter2 i2, Acc2 a2) | |
| Construct from two image iterators and associated accessors. | |
| template<class V, class ITERATOR> | |
| void | setComponent (V const &value, ITERATOR const &i, int idx) const |
| write value V into the two images. | |
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 | |
| 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 | |
| template<class V, class ITERATOR> | |
| void | setComponentScalarIsScalar (V const &value, ITERATOR const &i, int idx, vigra::VigraTrueType) const |
| if scalar & scalar image | |
| template<class V, class ITERATOR> | |
| void | setComponentScalarIsVector (V const &value, ITERATOR const &i, int idx, vigra::VigraTrueType) const |
| if scalar & vector image | |
| template<class V, class ITERATOR> | |
| void | setComponentVectorIsScalar (V const &value, ITERATOR const &i, int idx, vigra::VigraTrueType) const |
| if vector & scalar image | |
| template<class V, class ITERATOR> | |
| void | setComponentVectorIsVector (V const &value, ITERATOR const &i, int idx, vigra::VigraTrueType) const |
| if vector & vector image | |
Protected Attributes | |
| Iter1 | i1_ |
| Acc1 | a1_ |
| Iter2 | i2_ |
| Acc2 | a2_ |
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.
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.
|
|||||
|
value type of image 1
Definition at line 445 of file FunctorAccessor.h. |
|
|||||
|
value type of image 2
Definition at line 448 of file FunctorAccessor.h. |
|
||||||||||||||||||||||||
|
Construct from two image iterators and associated accessors.
Definition at line 455 of file FunctorAccessor.h. |
|
||||||||||||||||||||||||
|
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. |
|
||||||||||||||||||||||||||||
|
if first dest image is vector image
Definition at line 540 of file FunctorAccessor.h. |
|
||||||||||||||||||||||||||||
|
if first dest image is scalar
Definition at line 531 of file FunctorAccessor.h. |
|
||||||||||||||||||||||||||||
|
if scalar & scalar image
Definition at line 549 of file FunctorAccessor.h. |
|
||||||||||||||||||||||||||||
|
if scalar & vector image
Definition at line 566 of file FunctorAccessor.h. |
|
||||||||||||||||||||||||||||
|
if vector & scalar image
Definition at line 574 of file FunctorAccessor.h. |
|
||||||||||||||||||||||||||||
|
if vector & vector image
Definition at line 590 of file FunctorAccessor.h. |
|
|||||
|
Definition at line 597 of file FunctorAccessor.h. |
|
|||||
|
Definition at line 599 of file FunctorAccessor.h. |
|
|||||
|
Definition at line 596 of file FunctorAccessor.h. |
|
|||||
|
Definition at line 598 of file FunctorAccessor.h. |
1.3.9.1