Orfeo ToolBox  4.2
Orfeo ToolBox is not a black box
Public Types | Public Member Functions | Static Public Attributes | Protected Attributes | Private Member Functions | List of all members
otb::SubsampledImageRegionConstIterator< TImage > Class Template Reference

Regular subsample iterator over an image. More...

#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 Types inherited from itk::ImageRegionConstIterator< TImage >
typedef Superclass::AccessorType AccessorType
 
typedef Superclass::ImageType ImageType
 
typedef Superclass::IndexType IndexType
 
typedef
Superclass::InternalPixelType 
InternalPixelType
 
typedef Superclass::OffsetType OffsetType
 
typedef Superclass::PixelContainer PixelContainer
 
typedef
Superclass::PixelContainerPointer 
PixelContainerPointer
 
typedef Superclass::PixelType PixelType
 
typedef Superclass::RegionType RegionType
 
typedef ImageRegionConstIterator Self
 
typedef Superclass::SizeType SizeType
 
typedef ImageConstIterator
< TImage > 
Superclass
 
- Public Types inherited from itk::ImageConstIterator< TImage >
typedef TImage::AccessorFunctorType AccessorFunctorType
 
typedef TImage::AccessorType AccessorType
 
typedef TImage ImageType
 
typedef TImage::IndexType IndexType
 
typedef TImage::InternalPixelType InternalPixelType
 
typedef TImage::OffsetType OffsetType
 
typedef TImage::PixelContainer PixelContainer
 
typedef PixelContainer::Pointer PixelContainerPointer
 
typedef TImage::PixelType PixelType
 
typedef TImage::RegionType RegionType
 
typedef ImageConstIterator Self
 
typedef TImage::SizeType SizeType
 

Public Member Functions

 SubsampledImageRegionConstIterator ()
 
 SubsampledImageRegionConstIterator (const ImageType *ptr, const RegionType &region)
 
 SubsampledImageRegionConstIterator (const itk::ImageIterator< TImage > &it)
 
 SubsampledImageRegionConstIterator (const itk::ImageConstIterator< TImage > &it)
 
RegionType GenerateOutputInformation () const
 
IndexType GetIndex () const
 
virtual const char * GetNameOfClass () const
 
OffsetType GetOffset () const
 
const IndexTypeGetSubsampleFactor () const
 
void GoToBegin ()
 
void GoToEnd ()
 
bool IsAtBegin (void) const
 
bool IsAtEnd (void) const
 
Selfoperator++ ()
 
Selfoperator-- ()
 
void SetIndex (const IndexType &ind)
 
void SetOffset (const OffsetType &offset)
 
void SetSubsampleFactor (IndexValueType factor)
 
void SetSubsampleFactor (const IndexType &factor)
 
- Public Member Functions inherited from itk::ImageRegionConstIterator< TImage >
 ImageRegionConstIterator ()
 
 ImageRegionConstIterator (const ImageIterator< TImage > &it)
 
 ImageRegionConstIterator (const ImageType *ptr, const RegionType &region)
 
 ImageRegionConstIterator (const ImageConstIterator< TImage > &it)
 
void GoToBegin ()
 
void GoToEnd ()
 
 itkLegacyMacro (Self End(void) const)
 
 itkLegacyMacro (Self Begin(void) const)
 
Selfoperator++ ()
 
Selfoperator-- ()
 
- Public Member Functions inherited from itk::ImageConstIterator< TImage >
 ImageConstIterator (const Self &it)
 
 ImageConstIterator (const ImageType *ptr, const RegionType &region)
 
 ImageConstIterator ()
 
virtual ~ImageConstIterator ()
 
PixelType Get (void) const
 
const ImageTypeGetImage () const
 
const IndexType GetIndex () const
 
const RegionTypeGetRegion () const
 
void GoToBegin ()
 
void GoToEnd ()
 
bool IsAtBegin (void) const
 
bool IsAtEnd (void) const
 
 itkLegacyMacro (Self Begin(void) const)
 
 itkLegacyMacro (Self End(void) const)
 
bool operator!= (const Self &it) const
 
bool operator< (const Self &it) const
 
bool operator<= (const Self &it) const
 
Selfoperator= (const Self &it)
 
bool operator== (const Self &it) const
 
bool operator> (const Self &it) const
 
bool operator>= (const Self &it) const
 
virtual void SetRegion (const RegionType &region)
 
const PixelTypeValue (void) const
 

Static Public Attributes

static const unsigned int ImageIteratorDimension = Superclass::ImageIteratorDimension
 
- Static Public Attributes inherited from itk::ImageRegionConstIterator< TImage >
static const unsigned int ImageIteratorDimension
 
- Static Public Attributes inherited from itk::ImageConstIterator< TImage >
static const unsigned int ImageIteratorDimension
 

Protected Attributes

IndexType m_FirstUsableIndex
 
IndexType m_LastUsableIndex
 
unsigned long m_SubSampledBeginOffset
 
long m_SubSampledEndOffset
 
IndexType m_SubsampleFactor
 
- Protected Attributes inherited from itk::ImageRegionConstIterator< TImage >
OffsetValueType m_SpanBeginOffset
 
OffsetValueType m_SpanEndOffset
 
- Protected Attributes inherited from itk::ImageConstIterator< TImage >
OffsetValueType m_BeginOffset
 
const InternalPixelTypem_Buffer
 
OffsetValueType m_EndOffset
 
TImage::ConstWeakPointer m_Image
 
OffsetValueType m_Offset
 
AccessorType m_PixelAccessor
 
AccessorFunctorType m_PixelAccessorFunctor
 
RegionType m_Region
 

Private Member Functions

void Decrement ()
 
void Increment ()
 

Additional Inherited Members

- Static Public Member Functions inherited from itk::ImageConstIterator< TImage >
static unsigned int GetImageIteratorDimension ()
 

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 41 of file otbSubsampledImageRegionConstIterator.h.

Member Typedef Documentation

Accessor type that convert data between internal and external representations.

Definition at line 93 of file otbSubsampledImageRegionConstIterator.h.

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 72 of file otbSubsampledImageRegionConstIterator.h.

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 61 of file otbSubsampledImageRegionConstIterator.h.

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

Index value used for pixel location

Definition at line 97 of file otbSubsampledImageRegionConstIterator.h.

Internal Pixel Type

Definition at line 86 of file otbSubsampledImageRegionConstIterator.h.

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

Offset typedef support. This explicit redefinition allows to Set/Get the location of the iterator.

Definition at line 77 of file otbSubsampledImageRegionConstIterator.h.

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 82 of file otbSubsampledImageRegionConstIterator.h.

Definition at line 83 of file otbSubsampledImageRegionConstIterator.h.

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

External Pixel Type

Definition at line 89 of file otbSubsampledImageRegionConstIterator.h.

Region typedef support.

Definition at line 68 of file otbSubsampledImageRegionConstIterator.h.

Standard typedef.

Definition at line 46 of file otbSubsampledImageRegionConstIterator.h.

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 65 of file otbSubsampledImageRegionConstIterator.h.

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

Definition at line 47 of file otbSubsampledImageRegionConstIterator.h.

Constructor & Destructor Documentation

Default constructor. Needed since we provide a cast constructor.

Definition at line 30 of file otbSubsampledImageRegionConstIterator.txx.

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

Constructor establishes an iterator to walk a particular image and a particular region of that image.

Definition at line 48 of file otbSubsampledImageRegionConstIterator.txx.

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 66 of file otbSubsampledImageRegionConstIterator.txx.

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 84 of file otbSubsampledImageRegionConstIterator.txx.

Member Function Documentation

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

Definition at line 315 of file otbSubsampledImageRegionConstIterator.txx.

template<class TImage >
SubsampledImageRegionConstIterator< TImage >::RegionType otb::SubsampledImageRegionConstIterator< TImage >::GenerateOutputInformation ( void  ) const

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

Definition at line 217 of file otbSubsampledImageRegionConstIterator.txx.

template<class TImage>
IndexType otb::SubsampledImageRegionConstIterator< TImage >::GetIndex ( void  ) const
inline
template<class TImage>
virtual const char* otb::SubsampledImageRegionConstIterator< TImage >::GetNameOfClass ( ) const
virtual

Run-time type information (and related methods).

Reimplemented from itk::ImageRegionConstIterator< TImage >.

Reimplemented in otb::SubsampledImageRegionIterator< TImage >.

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

Definition at line 128 of file otbSubsampledImageRegionConstIterator.h.

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

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

Definition at line 143 of file otbSubsampledImageRegionConstIterator.txx.

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

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

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 158 of file otbSubsampledImageRegionConstIterator.txx.

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

Definition at line 271 of file otbSubsampledImageRegionConstIterator.txx.

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 147 of file otbSubsampledImageRegionConstIterator.h.

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 159 of file otbSubsampledImageRegionConstIterator.h.

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

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 182 of file otbSubsampledImageRegionConstIterator.h.

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 205 of file otbSubsampledImageRegionConstIterator.h.

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

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

See Also
GetIndex

Reimplemented from itk::ImageRegionConstIterator< TImage >.

Definition at line 168 of file otbSubsampledImageRegionConstIterator.txx.

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

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 201 of file otbSubsampledImageRegionConstIterator.txx.

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

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

Set / Get the subsample factor

Definition at line 114 of file otbSubsampledImageRegionConstIterator.txx.

Member Data Documentation

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 57 of file otbSubsampledImageRegionConstIterator.h.

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

Definition at line 240 of file otbSubsampledImageRegionConstIterator.h.

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

Definition at line 241 of file otbSubsampledImageRegionConstIterator.h.

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

Definition at line 237 of file otbSubsampledImageRegionConstIterator.h.

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

Definition at line 239 of file otbSubsampledImageRegionConstIterator.h.

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

Definition at line 236 of file otbSubsampledImageRegionConstIterator.h.


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