OTB  6.7.0
Orfeo Toolbox
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
otb::MaskedIteratorDecorator< TIteratorType, TMaskIteratorType > Class Template Reference

#include <otbMaskedIteratorDecorator.h>

+ Collaboration diagram for otb::MaskedIteratorDecorator< TIteratorType, TMaskIteratorType >:

Public Types

typedef TIteratorType::ImageType ImageType
 
typedef ImageType::IndexType IndexType
 
typedef MaskType::PixelType MaskPixelType
 
typedef
TMaskIteratorType::ImageType 
MaskType
 
typedef ImageType::PixelType PixelType
 
typedef ImageType::RegionType RegionType
 
typedef
MaskedIteratorDecorator
< TIteratorType,
TMaskIteratorType > 
Self
 

Public Member Functions

TIteratorType & GetImageIterator ()
 
const TIteratorType & GetImageIterator () const
 
IndexType GetIndex () const
 
TMaskIteratorType & GetMaskIterator ()
 
const TMaskIteratorType & GetMaskIterator () const
 
void GoToBegin ()
 
void GoToEnd ()
 
const bool & HasMask () const
 
bool IsAtBegin () const
 
bool IsAtEnd () const
 
 itkTypeMacroNoParent (MaskedIteratorDecorator)
 
 MaskedIteratorDecorator (MaskType *mask, ImageType *image, const RegionType &region)
 
Selfoperator++ ()
 
Selfoperator-- ()
 
const PixelTypeValue (void) const
 

Private Member Functions

void ComputeMaskedBegin ()
 

Private Attributes

TIteratorType m_ItImage
 
TMaskIteratorType m_ItMask
 
TIteratorType m_StartImage
 
TMaskIteratorType m_StartMask
 
bool m_UseMask
 

Detailed Description

template<typename TIteratorType, typename TMaskIteratorType = TIteratorType>
class otb::MaskedIteratorDecorator< TIteratorType, TMaskIteratorType >

Decorate an iterator to ignore masked pixels.

An iterator that dispatches its operations on both an image and a mask using two iterators of the same type. It skips over pixels where the value of the mask is zero. There is a limitation that the image and the mask must both be of the same type.

Definition at line 40 of file otbMaskedIteratorDecorator.h.

Member Typedef Documentation

template<typename TIteratorType, typename TMaskIteratorType = TIteratorType>
typedef TIteratorType::ImageType otb::MaskedIteratorDecorator< TIteratorType, TMaskIteratorType >::ImageType

Definition at line 46 of file otbMaskedIteratorDecorator.h.

template<typename TIteratorType, typename TMaskIteratorType = TIteratorType>
typedef ImageType::IndexType otb::MaskedIteratorDecorator< TIteratorType, TMaskIteratorType >::IndexType

Definition at line 47 of file otbMaskedIteratorDecorator.h.

template<typename TIteratorType, typename TMaskIteratorType = TIteratorType>
typedef MaskType::PixelType otb::MaskedIteratorDecorator< TIteratorType, TMaskIteratorType >::MaskPixelType

Definition at line 50 of file otbMaskedIteratorDecorator.h.

template<typename TIteratorType, typename TMaskIteratorType = TIteratorType>
typedef TMaskIteratorType::ImageType otb::MaskedIteratorDecorator< TIteratorType, TMaskIteratorType >::MaskType

Definition at line 45 of file otbMaskedIteratorDecorator.h.

template<typename TIteratorType, typename TMaskIteratorType = TIteratorType>
typedef ImageType::PixelType otb::MaskedIteratorDecorator< TIteratorType, TMaskIteratorType >::PixelType

Definition at line 49 of file otbMaskedIteratorDecorator.h.

template<typename TIteratorType, typename TMaskIteratorType = TIteratorType>
typedef ImageType::RegionType otb::MaskedIteratorDecorator< TIteratorType, TMaskIteratorType >::RegionType

Definition at line 48 of file otbMaskedIteratorDecorator.h.

template<typename TIteratorType, typename TMaskIteratorType = TIteratorType>
typedef MaskedIteratorDecorator<TIteratorType,TMaskIteratorType> otb::MaskedIteratorDecorator< TIteratorType, TMaskIteratorType >::Self

Definition at line 44 of file otbMaskedIteratorDecorator.h.

Constructor & Destructor Documentation

template<typename TIteratorType , typename TMaskIteratorType >
otb::MaskedIteratorDecorator< TIteratorType, TMaskIteratorType >::MaskedIteratorDecorator ( MaskType mask,
ImageType image,
const RegionType region 
)

Constructors forward arguments to both iterators Beware that the iterator is in a undefinite state after construction GoToBegin() or GoToEnd() should be called

Definition at line 32 of file otbMaskedIteratorDecorator.hxx.

Member Function Documentation

template<typename TIteratorType , typename TMaskIteratorType >
void otb::MaskedIteratorDecorator< TIteratorType, TMaskIteratorType >::ComputeMaskedBegin ( )
private

Private method to compute the begin iterator position taking into account the mask. Called by the constructor.

Definition at line 221 of file otbMaskedIteratorDecorator.hxx.

template<typename TIteratorType , typename TMaskIteratorType >
TIteratorType & otb::MaskedIteratorDecorator< TIteratorType, TMaskIteratorType >::GetImageIterator ( )

Underlying image iterator accessor

Definition at line 196 of file otbMaskedIteratorDecorator.hxx.

template<typename TIteratorType , typename TMaskIteratorType >
const TIteratorType & otb::MaskedIteratorDecorator< TIteratorType, TMaskIteratorType >::GetImageIterator ( ) const

Underlying image iterator const accessor

Definition at line 204 of file otbMaskedIteratorDecorator.hxx.

template<typename TIteratorType , typename TMaskIteratorType >
MaskedIteratorDecorator< TIteratorType, TMaskIteratorType >::IndexType otb::MaskedIteratorDecorator< TIteratorType, TMaskIteratorType >::GetIndex ( void  ) const

Current iterator index. Wraps the underlying iterator GetIndex()

Definition at line 60 of file otbMaskedIteratorDecorator.hxx.

template<typename TIteratorType , typename TMaskIteratorType >
TMaskIteratorType & otb::MaskedIteratorDecorator< TIteratorType, TMaskIteratorType >::GetMaskIterator ( )

Underlying mask iterator accessor

Definition at line 180 of file otbMaskedIteratorDecorator.hxx.

template<typename TIteratorType , typename TMaskIteratorType >
const TMaskIteratorType & otb::MaskedIteratorDecorator< TIteratorType, TMaskIteratorType >::GetMaskIterator ( ) const

Underlying mask iterator const accessor

Definition at line 188 of file otbMaskedIteratorDecorator.hxx.

template<typename TIteratorType , typename TMaskIteratorType >
void otb::MaskedIteratorDecorator< TIteratorType, TMaskIteratorType >::GoToBegin ( void  )

Move to the first valid iteration position. Note that this is different from the underlying iterators GoToBegin because their first pixels might be masked

Definition at line 68 of file otbMaskedIteratorDecorator.hxx.

template<typename TIteratorType , typename TMaskIteratorType >
void otb::MaskedIteratorDecorator< TIteratorType, TMaskIteratorType >::GoToEnd ( void  )

Move one pixel past the last valid iteration index

Definition at line 83 of file otbMaskedIteratorDecorator.hxx.

template<typename TIteratorType , typename TMaskIteratorType >
const bool & otb::MaskedIteratorDecorator< TIteratorType, TMaskIteratorType >::HasMask ( ) const

Definition at line 212 of file otbMaskedIteratorDecorator.hxx.

template<typename TIteratorType , typename TMaskIteratorType >
bool otb::MaskedIteratorDecorator< TIteratorType, TMaskIteratorType >::IsAtBegin ( void  ) const

True if the iterator is at the beginning

Definition at line 98 of file otbMaskedIteratorDecorator.hxx.

template<typename TIteratorType , typename TMaskIteratorType >
bool otb::MaskedIteratorDecorator< TIteratorType, TMaskIteratorType >::IsAtEnd ( void  ) const

True if the iterator is at the end

Definition at line 110 of file otbMaskedIteratorDecorator.hxx.

template<typename TIteratorType, typename TMaskIteratorType = TIteratorType>
otb::MaskedIteratorDecorator< TIteratorType, TMaskIteratorType >::itkTypeMacroNoParent ( MaskedIteratorDecorator< TIteratorType, TMaskIteratorType >  )
template<typename TIteratorType , typename TMaskIteratorType >
MaskedIteratorDecorator< TIteratorType, TMaskIteratorType > & otb::MaskedIteratorDecorator< TIteratorType, TMaskIteratorType >::operator++ ( )

Advance to the next valid iteration position. That is the next non masked position of the image iterator

Definition at line 123 of file otbMaskedIteratorDecorator.hxx.

template<typename TIteratorType , typename TMaskIteratorType >
MaskedIteratorDecorator< TIteratorType, TMaskIteratorType > & otb::MaskedIteratorDecorator< TIteratorType, TMaskIteratorType >::operator-- ( )

Move to the previous valid iteration position. That is the previous non masked position of the image iterator

Definition at line 144 of file otbMaskedIteratorDecorator.hxx.

template<typename TIteratorType , typename TMaskIteratorType >
const MaskedIteratorDecorator< TIteratorType, TMaskIteratorType >::PixelType & otb::MaskedIteratorDecorator< TIteratorType, TMaskIteratorType >::Value ( void  ) const

Set the image pixel value Get the image pixel value

Definition at line 172 of file otbMaskedIteratorDecorator.hxx.

Member Data Documentation

template<typename TIteratorType, typename TMaskIteratorType = TIteratorType>
TIteratorType otb::MaskedIteratorDecorator< TIteratorType, TMaskIteratorType >::m_ItImage
private

Definition at line 118 of file otbMaskedIteratorDecorator.h.

template<typename TIteratorType, typename TMaskIteratorType = TIteratorType>
TMaskIteratorType otb::MaskedIteratorDecorator< TIteratorType, TMaskIteratorType >::m_ItMask
private

Definition at line 117 of file otbMaskedIteratorDecorator.h.

template<typename TIteratorType, typename TMaskIteratorType = TIteratorType>
TIteratorType otb::MaskedIteratorDecorator< TIteratorType, TMaskIteratorType >::m_StartImage
private

Definition at line 125 of file otbMaskedIteratorDecorator.h.

template<typename TIteratorType, typename TMaskIteratorType = TIteratorType>
TMaskIteratorType otb::MaskedIteratorDecorator< TIteratorType, TMaskIteratorType >::m_StartMask
private

Definition at line 124 of file otbMaskedIteratorDecorator.h.

template<typename TIteratorType, typename TMaskIteratorType = TIteratorType>
bool otb::MaskedIteratorDecorator< TIteratorType, TMaskIteratorType >::m_UseMask
private

Definition at line 121 of file otbMaskedIteratorDecorator.h.


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