OTB  9.0.0
Orfeo Toolbox
Public Types | Public Member Functions | Static Public Attributes | List of all members
otb::SubsampledImageRegionConstIterator< TImage > Class Template Reference

#include <otbSubsampledImageRegionConstIterator.h>

+ Inheritance diagram for otb::SubsampledImageRegionConstIterator< TImage >:
+ Collaboration diagram for otb::SubsampledImageRegionConstIterator< TImage >:

Public Types

typedef Superclass::AccessorType AccessorType
 
typedef Superclass::ImageType ImageType
 
typedef Superclass::IndexType IndexType
 
typedef IndexType::IndexValueType IndexValueType
 
typedef Superclass::InternalPixelType InternalPixelType
 
typedef unsigned long OffsetType
 
typedef Superclass::PixelContainer PixelContainer
 
typedef Superclass::PixelContainerPointer PixelContainerPointer
 
typedef Superclass::PixelType PixelType
 
typedef Superclass::RegionType RegionType
 
typedef SubsampledImageRegionConstIterator Self
 
typedef Superclass::SizeType SizeType
 
typedef itk::ImageRegionConstIterator< TImage > Superclass
 

Public Member Functions

IndexType GetIndex () const
 
virtual const char * GetNameOfClass () const
 
const IndexTypeGetSubsampleFactor () const
 
void GoToBegin ()
 
void GoToEnd ()
 
bool IsAtBegin (void) const
 
bool IsAtEnd (void) const
 
void SetIndex (const IndexType &ind) override
 
void SetSubsampleFactor (const IndexType &factor)
 
void SetSubsampleFactor (IndexValueType factor)
 
 SubsampledImageRegionConstIterator ()
 
 SubsampledImageRegionConstIterator (const ImageType *ptr, const RegionType &region)
 
 SubsampledImageRegionConstIterator (const itk::ImageConstIterator< TImage > &it)
 
 SubsampledImageRegionConstIterator (const itk::ImageIterator< TImage > &it)
 

Static Public Attributes

static const unsigned int ImageIteratorDimension = Superclass::ImageIteratorDimension
 
IndexType m_SubsampleFactor
 
unsigned long m_SubSampledBeginOffset
 
long m_SubSampledEndOffset
 
IndexType m_FirstUsableIndex
 
IndexType m_LastUsableIndex
 
Selfoperator++ ()
 
Selfoperator-- ()
 
void SetOffset (const OffsetType &offset)
 
OffsetType GetOffset () const
 
RegionType GenerateOutputInformation () const
 
void Increment ()
 
void Decrement ()
 

Detailed Description

template<class TImage>
class otb::SubsampledImageRegionConstIterator< TImage >

Regular subsample iterator over an image.

SubsampledImageRegionConstIterator This iterator is a itk::ImageRegionConstIterator that perform a subsampled scan over an image. It runs one pixel over X (in row, line, slice... dimensions), if X is the (integer) value of the SubsampleFactor.

Specific value of the subsample factor may be given for each dimension.

See also
WaveletFilterBank

Definition at line 44 of file otbSubsampledImageRegionConstIterator.h.

Member Typedef Documentation

◆ AccessorType

template<class TImage >
typedef Superclass::AccessorType otb::SubsampledImageRegionConstIterator< TImage >::AccessorType

Accessor type that convert data between internal and external representations.

Definition at line 95 of file otbSubsampledImageRegionConstIterator.h.

◆ ImageType

template<class TImage >
typedef Superclass::ImageType otb::SubsampledImageRegionConstIterator< TImage >::ImageType

Image typedef support. While this was already typdef'ed in the superclass it needs to be redone here for this subclass to compile properly with gcc.

Definition at line 74 of file otbSubsampledImageRegionConstIterator.h.

◆ IndexType

template<class TImage >
typedef Superclass::IndexType otb::SubsampledImageRegionConstIterator< TImage >::IndexType

Index typedef support. While this was already typdef'ed in the superclass it needs to be redone here for this subclass to compile properly with gcc.

Definition at line 63 of file otbSubsampledImageRegionConstIterator.h.

◆ IndexValueType

template<class TImage >
typedef IndexType::IndexValueType otb::SubsampledImageRegionConstIterator< TImage >::IndexValueType

Index value used for pixel location

Definition at line 99 of file otbSubsampledImageRegionConstIterator.h.

◆ InternalPixelType

template<class TImage >
typedef Superclass::InternalPixelType otb::SubsampledImageRegionConstIterator< TImage >::InternalPixelType

Internal Pixel Type

Definition at line 88 of file otbSubsampledImageRegionConstIterator.h.

◆ OffsetType

template<class TImage >
typedef unsigned long otb::SubsampledImageRegionConstIterator< TImage >::OffsetType

Offset typedef support. This explicit redefinition allows Setting/Getting the location of the iterator.

Definition at line 79 of file otbSubsampledImageRegionConstIterator.h.

◆ PixelContainer

template<class TImage >
typedef Superclass::PixelContainer otb::SubsampledImageRegionConstIterator< TImage >::PixelContainer

PixelContainer typedef support. Used to refer to the container for the pixel data. While this was already typdef'ed in the superclass it needs to be redone here for this subclass to compile properly with gcc.

Definition at line 84 of file otbSubsampledImageRegionConstIterator.h.

◆ PixelContainerPointer

template<class TImage >
typedef Superclass::PixelContainerPointer otb::SubsampledImageRegionConstIterator< TImage >::PixelContainerPointer

Definition at line 85 of file otbSubsampledImageRegionConstIterator.h.

◆ PixelType

template<class TImage >
typedef Superclass::PixelType otb::SubsampledImageRegionConstIterator< TImage >::PixelType

External Pixel Type

Definition at line 91 of file otbSubsampledImageRegionConstIterator.h.

◆ RegionType

template<class TImage >
typedef Superclass::RegionType otb::SubsampledImageRegionConstIterator< TImage >::RegionType

Region typedef support.

Definition at line 70 of file otbSubsampledImageRegionConstIterator.h.

◆ Self

Standard typedef.

Definition at line 49 of file otbSubsampledImageRegionConstIterator.h.

◆ SizeType

template<class TImage >
typedef Superclass::SizeType otb::SubsampledImageRegionConstIterator< TImage >::SizeType

Size typedef support. While this was already typdef'ed in the superclass it needs to be redone here for this subclass to compile properly with gcc.

Definition at line 67 of file otbSubsampledImageRegionConstIterator.h.

◆ Superclass

template<class TImage >
typedef itk::ImageRegionConstIterator<TImage> otb::SubsampledImageRegionConstIterator< TImage >::Superclass

Definition at line 50 of file otbSubsampledImageRegionConstIterator.h.

Constructor & Destructor Documentation

◆ SubsampledImageRegionConstIterator() [1/4]

◆ SubsampledImageRegionConstIterator() [2/4]

template<class TImage >
otb::SubsampledImageRegionConstIterator< TImage >::SubsampledImageRegionConstIterator ( const ImageType ptr,
const RegionType region 
)

◆ SubsampledImageRegionConstIterator() [3/4]

template<class TImage >
otb::SubsampledImageRegionConstIterator< TImage >::SubsampledImageRegionConstIterator ( const itk::ImageIterator< TImage > &  it)

Constructor that can be used to cast from an ImageIterator to an SubsampledImageRegionConstIterator. Many routines return an ImageIterator but for a particular task, you may want an SubsampledImageRegionConstIterator. Rather than provide overloaded APIs that return different types of Iterators, itk returns ImageIterators and uses constructors to cast from an ImageIterator to a SubsampledImageRegionConstIterator.

Definition at line 65 of file otbSubsampledImageRegionConstIterator.hxx.

References otb::SubsampledImageRegionConstIterator< TImage >::ImageIteratorDimension, otb::SubsampledImageRegionConstIterator< TImage >::m_FirstUsableIndex, otb::SubsampledImageRegionConstIterator< TImage >::m_LastUsableIndex, otb::SubsampledImageRegionConstIterator< TImage >::m_SubSampledEndOffset, and otb::SubsampledImageRegionConstIterator< TImage >::m_SubsampleFactor.

◆ SubsampledImageRegionConstIterator() [4/4]

template<class TImage >
otb::SubsampledImageRegionConstIterator< TImage >::SubsampledImageRegionConstIterator ( const itk::ImageConstIterator< TImage > &  it)

Constructor that can be used to cast from an ImageConstIterator to an SubsampledImageRegionConstIterator. Many routines return an ImageIterator but for a particular task, you may want an SubsampledImageRegionConstIterator. Rather than provide overloaded APIs that return different types of Iterators, itk returns ImageIterators and uses constructors to cast from an ImageIterator to a SubsampledImageRegionConstIterator.

Definition at line 81 of file otbSubsampledImageRegionConstIterator.hxx.

References otb::SubsampledImageRegionConstIterator< TImage >::ImageIteratorDimension, otb::SubsampledImageRegionConstIterator< TImage >::m_FirstUsableIndex, otb::SubsampledImageRegionConstIterator< TImage >::m_LastUsableIndex, otb::SubsampledImageRegionConstIterator< TImage >::m_SubSampledEndOffset, and otb::SubsampledImageRegionConstIterator< TImage >::m_SubsampleFactor.

Member Function Documentation

◆ Decrement()

template<class TImage >
void otb::SubsampledImageRegionConstIterator< TImage >::Decrement
private

Increment (prefix) the fastest moving dimension of the iterator's index. This operator will constrain the iterator within the region (i.e. the iterator will automatically wrap from the end of the row of the region to the beginning of the next row of the region) up until the iterator tries to moves past the last pixel of the region. Here, the iterator will be set to be one pixel past the end of the region.

See also
operator++(int)

Definition at line 282 of file otbSubsampledImageRegionConstIterator.hxx.

◆ GenerateOutputInformation()

template<class TImage >
SubsampledImageRegionConstIterator< TImage >::RegionType otb::SubsampledImageRegionConstIterator< TImage >::GenerateOutputInformation

GenerateOutputInformation. In order to help copy into a new Image, give the new region parameters

Definition at line 192 of file otbSubsampledImageRegionConstIterator.hxx.

◆ GetIndex()

template<class TImage >
IndexType otb::SubsampledImageRegionConstIterator< TImage >::GetIndex ( ) const
inline

◆ GetNameOfClass()

template<class TImage >
virtual const char* otb::SubsampledImageRegionConstIterator< TImage >::GetNameOfClass ( ) const
virtual

Run-time type information (and related methods).

Reimplemented in otb::SubsampledImageRegionIterator< TImage >.

◆ GetOffset()

template<class TImage >
OffsetType otb::SubsampledImageRegionConstIterator< TImage >::GetOffset ( ) const
inline

Increment (prefix) the fastest moving dimension of the iterator's index. This operator will constrain the iterator within the region (i.e. the iterator will automatically wrap from the end of the row of the region to the beginning of the next row of the region) up until the iterator tries to moves past the last pixel of the region. Here, the iterator will be set to be one pixel past the end of the region.

See also
operator++(int)

Definition at line 229 of file otbSubsampledImageRegionConstIterator.h.

Referenced by otb::SubsampleImageFilter< TInputImage, TOutputImage, TDirectionOfTransformation >::ThreadedGenerateData().

◆ GetSubsampleFactor()

template<class TImage >
const IndexType& otb::SubsampledImageRegionConstIterator< TImage >::GetSubsampleFactor ( ) const
inline

Definition at line 130 of file otbSubsampledImageRegionConstIterator.h.

◆ GoToBegin()

template<class TImage >
void otb::SubsampledImageRegionConstIterator< TImage >::GoToBegin

Move an iterator to the beginning of the region. "Begin" is defined as the first pixel in the region.

Definition at line 132 of file otbSubsampledImageRegionConstIterator.hxx.

Referenced by otb::DecimateImageFilter< TInputImage, TOutputImage >::ThreadedGenerateData(), and otb::SubsampleImageFilter< TInputImage, TOutputImage, TDirectionOfTransformation >::ThreadedGenerateData().

◆ GoToEnd()

template<class TImage >
void otb::SubsampledImageRegionConstIterator< TImage >::GoToEnd

Move an iterator to the end of the region. "End" is defined as one pixel past the last pixel of the region.

Definition at line 143 of file otbSubsampledImageRegionConstIterator.hxx.

◆ Increment()

template<class TImage >
void otb::SubsampledImageRegionConstIterator< TImage >::Increment
private

Increment (prefix) the fastest moving dimension of the iterator's index. This operator will constrain the iterator within the region (i.e. the iterator will automatically wrap from the end of the row of the region to the beginning of the next row of the region) up until the iterator tries to moves past the last pixel of the region. Here, the iterator will be set to be one pixel past the end of the region.

See also
operator++(int)

Definition at line 244 of file otbSubsampledImageRegionConstIterator.hxx.

◆ IsAtBegin()

template<class TImage >
bool otb::SubsampledImageRegionConstIterator< TImage >::IsAtBegin ( void  ) const
inline

Is the iterator at the beginning of the region? "Begin" is defined here as before the first pixel of the region. On the contrary to Superclasses, now you cannot get *it even if IsAtBegin() is true!!!

Definition at line 149 of file otbSubsampledImageRegionConstIterator.h.

◆ IsAtEnd()

template<class TImage >
bool otb::SubsampledImageRegionConstIterator< TImage >::IsAtEnd ( void  ) const
inline

Is the iterator at the end of the region? "End" is defined as past the last candidate pixel of the region (under the subsample point of view).

For instance, if in 1D, the Size is 10 with a subsample factor of 4, the last candidate offset would be 8.

Definition at line 161 of file otbSubsampledImageRegionConstIterator.h.

Referenced by otb::DecimateImageFilter< TInputImage, TOutputImage >::ThreadedGenerateData(), and otb::SubsampleImageFilter< TInputImage, TOutputImage, TDirectionOfTransformation >::ThreadedGenerateData().

◆ operator++()

template<class TImage >
Self& otb::SubsampledImageRegionConstIterator< TImage >::operator++ ( )
inline

Increment (prefix) the fastest moving dimension of the iterator's index. This operator will constrain the iterator within the region (i.e. the iterator will automatically wrap from the end of the row of the region to the beginning of the next row of the region) up until the iterator tries to moves past the last pixel of the region. Here, the iterator will be set to be one pixel past the end of the region.

See also
operator++(int)

Definition at line 184 of file otbSubsampledImageRegionConstIterator.h.

◆ operator--()

template<class TImage >
Self& otb::SubsampledImageRegionConstIterator< TImage >::operator-- ( )
inline

Decrement (prefix) the fastest moving dimension of the iterator's index. This operator will constrain the iterator within the region (i.e. the iterator will automatically wrap from the beginning of the row of the region to the end of the next row of the region) up until the iterator tries to moves past the first pixel of the region. Here, the iterator will be set to be one pixel past the beginning of the region.

See also
operator--(int)

Definition at line 208 of file otbSubsampledImageRegionConstIterator.h.

◆ SetIndex()

template<class TImage >
void otb::SubsampledImageRegionConstIterator< TImage >::SetIndex ( const IndexType ind)
override

Set the index. It is moved to the next available (usable) index.

See also
GetIndex

Definition at line 151 of file otbSubsampledImageRegionConstIterator.hxx.

Referenced by otb::SubsampleImageFilter< TInputImage, TOutputImage, TDirectionOfTransformation >::ThreadedGenerateData().

◆ SetOffset()

template<class TImage >
void otb::SubsampledImageRegionConstIterator< TImage >::SetOffset ( const OffsetType offset)

This iterator give the possibility to Set/Get the current location if scanning. No Bound checking is performed when setting the position.

Definition at line 181 of file otbSubsampledImageRegionConstIterator.hxx.

Referenced by otb::SubsampleImageFilter< TInputImage, TOutputImage, TDirectionOfTransformation >::ThreadedGenerateData().

◆ SetSubsampleFactor() [1/2]

template<class TImage >
void otb::SubsampledImageRegionConstIterator< TImage >::SetSubsampleFactor ( const IndexType factor)

Set / Get the subsample factor

Definition at line 107 of file otbSubsampledImageRegionConstIterator.hxx.

◆ SetSubsampleFactor() [2/2]

template<class TImage >
void otb::SubsampledImageRegionConstIterator< TImage >::SetSubsampleFactor ( typename IndexType::IndexValueType  factor)

Member Data Documentation

◆ ImageIteratorDimension

template<class TImage >
const unsigned int otb::SubsampledImageRegionConstIterator< TImage >::ImageIteratorDimension = Superclass::ImageIteratorDimension
static

Dimension of the image the iterator walks. This constant is needed so functions that are templated over image iterator type (as opposed to being templated over pixel type and dimension) can have compile time access to the dimension of the image that the iterator walks.

Definition at line 59 of file otbSubsampledImageRegionConstIterator.h.

Referenced by otb::SubsampledImageRegionConstIterator< TImage >::SubsampledImageRegionConstIterator().

◆ m_FirstUsableIndex

template<class TImage >
IndexType otb::SubsampledImageRegionConstIterator< TImage >::m_FirstUsableIndex
protected

Increment (prefix) the fastest moving dimension of the iterator's index. This operator will constrain the iterator within the region (i.e. the iterator will automatically wrap from the end of the row of the region to the beginning of the next row of the region) up until the iterator tries to moves past the last pixel of the region. Here, the iterator will be set to be one pixel past the end of the region.

See also
operator++(int)

Definition at line 245 of file otbSubsampledImageRegionConstIterator.h.

Referenced by otb::SubsampledImageRegionConstIterator< TImage >::SubsampledImageRegionConstIterator().

◆ m_LastUsableIndex

template<class TImage >
IndexType otb::SubsampledImageRegionConstIterator< TImage >::m_LastUsableIndex
protected

Increment (prefix) the fastest moving dimension of the iterator's index. This operator will constrain the iterator within the region (i.e. the iterator will automatically wrap from the end of the row of the region to the beginning of the next row of the region) up until the iterator tries to moves past the last pixel of the region. Here, the iterator will be set to be one pixel past the end of the region.

See also
operator++(int)

Definition at line 246 of file otbSubsampledImageRegionConstIterator.h.

Referenced by otb::SubsampledImageRegionConstIterator< TImage >::SubsampledImageRegionConstIterator().

◆ m_SubSampledBeginOffset

template<class TImage >
unsigned long otb::SubsampledImageRegionConstIterator< TImage >::m_SubSampledBeginOffset
protected

Increment (prefix) the fastest moving dimension of the iterator's index. This operator will constrain the iterator within the region (i.e. the iterator will automatically wrap from the end of the row of the region to the beginning of the next row of the region) up until the iterator tries to moves past the last pixel of the region. Here, the iterator will be set to be one pixel past the end of the region.

See also
operator++(int)

Definition at line 242 of file otbSubsampledImageRegionConstIterator.h.

◆ m_SubSampledEndOffset

template<class TImage >
long otb::SubsampledImageRegionConstIterator< TImage >::m_SubSampledEndOffset
protected

Increment (prefix) the fastest moving dimension of the iterator's index. This operator will constrain the iterator within the region (i.e. the iterator will automatically wrap from the end of the row of the region to the beginning of the next row of the region) up until the iterator tries to moves past the last pixel of the region. Here, the iterator will be set to be one pixel past the end of the region.

See also
operator++(int)

Definition at line 244 of file otbSubsampledImageRegionConstIterator.h.

Referenced by otb::SubsampledImageRegionConstIterator< TImage >::SubsampledImageRegionConstIterator().

◆ m_SubsampleFactor

template<class TImage >
IndexType otb::SubsampledImageRegionConstIterator< TImage >::m_SubsampleFactor
protected

Increment (prefix) the fastest moving dimension of the iterator's index. This operator will constrain the iterator within the region (i.e. the iterator will automatically wrap from the end of the row of the region to the beginning of the next row of the region) up until the iterator tries to moves past the last pixel of the region. Here, the iterator will be set to be one pixel past the end of the region.

See also
operator++(int)

Definition at line 241 of file otbSubsampledImageRegionConstIterator.h.

Referenced by otb::SubsampledImageRegionConstIterator< TImage >::SubsampledImageRegionConstIterator().


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