Hugintrunk  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Private Types | Private Attributes | List of all members
vigra_ext::ImageMaskInterpolator< SrcImageIterator, SrcAccessor, MaskIterator, MaskAccessor, INTERPOLATOR > Class Template Reference

"wrapper" for efficient interpolation access to an image More...

#include <Interpolators.h>

Public Types

typedef SrcAccessor::value_type PixelType
 
typedef MaskAccessor::value_type MaskType
 

Public Member Functions

 ImageMaskInterpolator (vigra::triple< SrcImageIterator, SrcImageIterator, SrcAccessor > const &src, std::pair< MaskIterator, MaskAccessor > mask, INTERPOLATOR &inter, bool warparound)
 Construct interpolator for an given image. More...
 
 ImageMaskInterpolator (SrcImageIterator src_upperleft, SrcImageIterator src_lowerright, SrcAccessor sa, MaskIterator mask_upperleft, MaskAccessor ma, INTERPOLATOR &inter, bool warparound)
 Construct interpolator for specific image. More...
 
bool operator() (double x, double y, PixelType &result, MaskType &mask) const
 Interpolate the data item at a non-integer position x, y. More...
 
bool interpolateInside (int srcx, int srcy, double dx, double dy, PixelType &result, MaskType &mask) const
 Interpolate without boundary check. More...
 

Private Types

typedef vigra::NumericTraits
< PixelType >::RealPromote 
RealPixelType
 

Private Attributes

SrcImageIterator m_sIter
 
SrcAccessor m_sAcc
 
MaskIterator m_mIter
 
MaskAccessor m_mAcc
 
int m_w
 
int m_h
 
bool m_warparound
 
INTERPOLATOR m_inter
 

Detailed Description

template<typename SrcImageIterator, typename SrcAccessor, typename MaskIterator, typename MaskAccessor, typename INTERPOLATOR>
class vigra_ext::ImageMaskInterpolator< SrcImageIterator, SrcAccessor, MaskIterator, MaskAccessor, INTERPOLATOR >

"wrapper" for efficient interpolation access to an image

Tailored for panorama remapping. Supports warparound boundary condition of left and right as well as masks

Definition at line 474 of file Interpolators.h.

Member Typedef Documentation

template<typename SrcImageIterator , typename SrcAccessor , typename MaskIterator , typename MaskAccessor , typename INTERPOLATOR >
typedef MaskAccessor::value_type vigra_ext::ImageMaskInterpolator< SrcImageIterator, SrcAccessor, MaskIterator, MaskAccessor, INTERPOLATOR >::MaskType

Definition at line 478 of file Interpolators.h.

template<typename SrcImageIterator , typename SrcAccessor , typename MaskIterator , typename MaskAccessor , typename INTERPOLATOR >
typedef SrcAccessor::value_type vigra_ext::ImageMaskInterpolator< SrcImageIterator, SrcAccessor, MaskIterator, MaskAccessor, INTERPOLATOR >::PixelType

Definition at line 477 of file Interpolators.h.

template<typename SrcImageIterator , typename SrcAccessor , typename MaskIterator , typename MaskAccessor , typename INTERPOLATOR >
typedef vigra::NumericTraits<PixelType>::RealPromote vigra_ext::ImageMaskInterpolator< SrcImageIterator, SrcAccessor, MaskIterator, MaskAccessor, INTERPOLATOR >::RealPixelType
private

Definition at line 480 of file Interpolators.h.

Constructor & Destructor Documentation

template<typename SrcImageIterator , typename SrcAccessor , typename MaskIterator , typename MaskAccessor , typename INTERPOLATOR >
vigra_ext::ImageMaskInterpolator< SrcImageIterator, SrcAccessor, MaskIterator, MaskAccessor, INTERPOLATOR >::ImageMaskInterpolator ( vigra::triple< SrcImageIterator, SrcImageIterator, SrcAccessor > const &  src,
std::pair< MaskIterator, MaskAccessor >  mask,
INTERPOLATOR &  inter,
bool  warparound 
)
inline

Construct interpolator for an given image.

Definition at line 495 of file Interpolators.h.

template<typename SrcImageIterator , typename SrcAccessor , typename MaskIterator , typename MaskAccessor , typename INTERPOLATOR >
vigra_ext::ImageMaskInterpolator< SrcImageIterator, SrcAccessor, MaskIterator, MaskAccessor, INTERPOLATOR >::ImageMaskInterpolator ( SrcImageIterator  src_upperleft,
SrcImageIterator  src_lowerright,
SrcAccessor  sa,
MaskIterator  mask_upperleft,
MaskAccessor  ma,
INTERPOLATOR &  inter,
bool  warparound 
)
inline

Construct interpolator for specific image.

Definition at line 513 of file Interpolators.h.

Member Function Documentation

template<typename SrcImageIterator , typename SrcAccessor , typename MaskIterator , typename MaskAccessor , typename INTERPOLATOR >
bool vigra_ext::ImageMaskInterpolator< SrcImageIterator, SrcAccessor, MaskIterator, MaskAccessor, INTERPOLATOR >::interpolateInside ( int  srcx,
int  srcy,
double  dx,
double  dy,
PixelType result,
MaskType mask 
) const
inline
template<typename SrcImageIterator , typename SrcAccessor , typename MaskIterator , typename MaskAccessor , typename INTERPOLATOR >
bool vigra_ext::ImageMaskInterpolator< SrcImageIterator, SrcAccessor, MaskIterator, MaskAccessor, INTERPOLATOR >::operator() ( double  x,
double  y,
PixelType result,
MaskType mask 
) const
inline

Interpolate the data item at a non-integer position x, y.

It checks if the interpolation would access a pixel with alpha = 0 and returns false in that case.

be careful, no bounds checking is done here. take INTERPOLATOR::size into accout before iterating over the picture.

the used image pixels are [i-(n/2 -1) .. i+n/2], where n is the size of the interpolator

Parameters
xx position, relative to i and alpha.first
yy position, relative to i and alpha.first
resultthe interpolation result
Returns
true if interpolation ok, false if one or more pixels were masked out

Definition at line 661 of file Interpolators.h.

References vigra_ext::ImageMaskInterpolator< SrcImageIterator, SrcAccessor, MaskIterator, MaskAccessor, INTERPOLATOR >::interpolateInside(), vigra_ext::ImageMaskInterpolator< SrcImageIterator, SrcAccessor, MaskIterator, MaskAccessor, INTERPOLATOR >::m_h, vigra_ext::ImageMaskInterpolator< SrcImageIterator, SrcAccessor, MaskIterator, MaskAccessor, INTERPOLATOR >::m_inter, vigra_ext::ImageMaskInterpolator< SrcImageIterator, SrcAccessor, MaskIterator, MaskAccessor, INTERPOLATOR >::m_mIter, vigra_ext::ImageMaskInterpolator< SrcImageIterator, SrcAccessor, MaskIterator, MaskAccessor, INTERPOLATOR >::m_sAcc, vigra_ext::ImageMaskInterpolator< SrcImageIterator, SrcAccessor, MaskIterator, MaskAccessor, INTERPOLATOR >::m_sIter, vigra_ext::ImageMaskInterpolator< SrcImageIterator, SrcAccessor, MaskIterator, MaskAccessor, INTERPOLATOR >::m_w, and vigra_ext::ImageMaskInterpolator< SrcImageIterator, SrcAccessor, MaskIterator, MaskAccessor, INTERPOLATOR >::m_warparound.

Member Data Documentation

template<typename SrcImageIterator , typename SrcAccessor , typename MaskIterator , typename MaskAccessor , typename INTERPOLATOR >
int vigra_ext::ImageMaskInterpolator< SrcImageIterator, SrcAccessor, MaskIterator, MaskAccessor, INTERPOLATOR >::m_h
private
template<typename SrcImageIterator , typename SrcAccessor , typename MaskIterator , typename MaskAccessor , typename INTERPOLATOR >
INTERPOLATOR vigra_ext::ImageMaskInterpolator< SrcImageIterator, SrcAccessor, MaskIterator, MaskAccessor, INTERPOLATOR >::m_inter
private
template<typename SrcImageIterator , typename SrcAccessor , typename MaskIterator , typename MaskAccessor , typename INTERPOLATOR >
MaskAccessor vigra_ext::ImageMaskInterpolator< SrcImageIterator, SrcAccessor, MaskIterator, MaskAccessor, INTERPOLATOR >::m_mAcc
private

Definition at line 485 of file Interpolators.h.

template<typename SrcImageIterator , typename SrcAccessor , typename MaskIterator , typename MaskAccessor , typename INTERPOLATOR >
MaskIterator vigra_ext::ImageMaskInterpolator< SrcImageIterator, SrcAccessor, MaskIterator, MaskAccessor, INTERPOLATOR >::m_mIter
private
template<typename SrcImageIterator , typename SrcAccessor , typename MaskIterator , typename MaskAccessor , typename INTERPOLATOR >
SrcAccessor vigra_ext::ImageMaskInterpolator< SrcImageIterator, SrcAccessor, MaskIterator, MaskAccessor, INTERPOLATOR >::m_sAcc
private
template<typename SrcImageIterator , typename SrcAccessor , typename MaskIterator , typename MaskAccessor , typename INTERPOLATOR >
SrcImageIterator vigra_ext::ImageMaskInterpolator< SrcImageIterator, SrcAccessor, MaskIterator, MaskAccessor, INTERPOLATOR >::m_sIter
private
template<typename SrcImageIterator , typename SrcAccessor , typename MaskIterator , typename MaskAccessor , typename INTERPOLATOR >
int vigra_ext::ImageMaskInterpolator< SrcImageIterator, SrcAccessor, MaskIterator, MaskAccessor, INTERPOLATOR >::m_w
private
template<typename SrcImageIterator , typename SrcAccessor , typename MaskIterator , typename MaskAccessor , typename INTERPOLATOR >
bool vigra_ext::ImageMaskInterpolator< SrcImageIterator, SrcAccessor, MaskIterator, MaskAccessor, INTERPOLATOR >::m_warparound
private

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