Hugin trunk 0.1
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | List of all members
vigra_ext::SplitVector2Accessor< Iter1, Acc1, Iter2, Acc2 > Class Template Reference

define a write only accessor for a virtual Image<TinyVector<Acc1::value_type>, 2> image, which actually consists of two Images. More...

#include <FunctorAccessor.h>

Public Types

typedef vigra::TinyVector< typename Acc1::value_type, 2 > value_type
 the vector's value_type
 
typedef value_type::value_type component_type
 

Public Member Functions

 SplitVector2Accessor (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
 scalar & scalar image
 
template<class ITERATOR >
unsigned int size (ITERATOR const &i) const
 return the size (Number of Bands)
 

Public Attributes

Iter1 i1_
 
Acc1 a1_
 
Iter2 i2_
 
Acc2 a2_
 

Detailed Description

template<class Iter1, class Acc1, class Iter2, class Acc2>
class vigra_ext::SplitVector2Accessor< Iter1, Acc1, Iter2, Acc2 >

define a write only accessor for a virtual Image<TinyVector<Acc1::value_type>, 2> image, which actually consists of two Images.

Useful to split an image into gray and alpha images while loading, like it is shown in the following example:

vigra::ImageImportInfo info(argv[1]);
if(info.numBands() == 2 && info.numExtraBands() == 1)
{
vigra::BImage image;
vigra::BImage mask;
image.resize(info.width(), info.height());
mask.resize(info.width(), info.height());
// construct special reading accessor, to split
// the image into two images while reading
BImage::Accessor,
BImage::Iterator,
BImage::Accessor>
splitA(image.upperLeft(), image.accessor(),
mask.upperLeft(), mask.accessor());
importImage(info, Diff2D(), splitA );
define a write only accessor for a virtual Image<TinyVector<Acc1::value_type>, 2> image,...
std::vector< deghosting::BImagePtr > threshold(const std::vector< deghosting::FImagePtr > &inputImages, const double threshold, const uint16_t flags)
Threshold function used for creating alpha masks for images.
Definition threshold.h:41

Definition at line 146 of file FunctorAccessor.h.

Member Typedef Documentation

◆ component_type

template<class Iter1 , class Acc1 , class Iter2 , class Acc2 >
typedef value_type::value_type vigra_ext::SplitVector2Accessor< Iter1, Acc1, Iter2, Acc2 >::component_type

Definition at line 152 of file FunctorAccessor.h.

◆ value_type

template<class Iter1 , class Acc1 , class Iter2 , class Acc2 >
typedef vigra::TinyVector<typename Acc1::value_type, 2> vigra_ext::SplitVector2Accessor< Iter1, Acc1, Iter2, Acc2 >::value_type

the vector's value_type

Definition at line 151 of file FunctorAccessor.h.

Constructor & Destructor Documentation

◆ SplitVector2Accessor()

template<class Iter1 , class Acc1 , class Iter2 , class Acc2 >
vigra_ext::SplitVector2Accessor< Iter1, Acc1, Iter2, Acc2 >::SplitVector2Accessor ( Iter1  i1,
Acc1  a1,
Iter2  i2,
Acc2  a2 
)
inline

Construct from two image iterators and associated accessors.

Definition at line 156 of file FunctorAccessor.h.

Member Function Documentation

◆ setComponent()

template<class Iter1 , class Acc1 , class Iter2 , class Acc2 >
template<class V , class ITERATOR >
void vigra_ext::SplitVector2Accessor< Iter1, Acc1, Iter2, Acc2 >::setComponent ( V const value,
ITERATOR const i,
int  idx 
) const
inline

◆ size()

return the size (Number of Bands)

Definition at line 178 of file FunctorAccessor.h.

Member Data Documentation

◆ a1_

◆ a2_

◆ i1_

◆ i2_


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