OTB  9.0.0
Orfeo Toolbox
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
otb::ImageRegionSquareTileSplitter< VImageDimension > Class Template Reference

#include <otbImageRegionSquareTileSplitter.h>

+ Inheritance diagram for otb::ImageRegionSquareTileSplitter< VImageDimension >:
+ Collaboration diagram for otb::ImageRegionSquareTileSplitter< VImageDimension >:

Public Types

typedef itk::SmartPointer< const SelfConstPointer
 
typedef itk::Index< VImageDimension > IndexType
 
typedef IndexType::IndexValueType IndexValueType
 
typedef itk::SmartPointer< SelfPointer
 
typedef itk::ImageRegion< VImageDimension > RegionType
 
typedef ImageRegionSquareTileSplitter Self
 
typedef itk::Size< VImageDimension > SizeType
 
typedef SizeType::SizeValueType SizeValueType
 
typedef itk::ImageRegionSplitter< VImageDimension > Superclass
 

Public Member Functions

virtual ::itk::LightObject::Pointer CreateAnother (void) const
 
virtual const char * GetNameOfClass () const
 
unsigned int GetNumberOfSplits (const RegionType &region, unsigned int requestedNumber) override
 
RegionType GetSplit (unsigned int i, unsigned int numberOfPieces, const RegionType &region) override
 
virtual unsigned int GetTileDimension ()
 
virtual unsigned int GetTileSizeAlignment ()
 
virtual void SetTileSizeAlignment (unsigned int _arg)
 

Static Public Member Functions

static unsigned int GetImageDimension ()
 
static Pointer New ()
 

Static Public Attributes

static const unsigned int ImageDimension = VImageDimension
 

Protected Member Functions

 ImageRegionSquareTileSplitter ()
 
 ~ImageRegionSquareTileSplitter () override
 
void PrintSelf (std::ostream &os, itk::Indent indent) const override
 

Private Member Functions

 ImageRegionSquareTileSplitter (const ImageRegionSquareTileSplitter &)=delete
 
void operator= (const ImageRegionSquareTileSplitter &)=delete
 

Private Attributes

itk::FixedArray< unsigned int, VImageDimension > m_SplitsPerDimension
 
unsigned int m_TileDimension
 
unsigned int m_TileSizeAlignment
 

Detailed Description

template<unsigned int VImageDimension>
class otb::ImageRegionSquareTileSplitter< VImageDimension >

Divide a region into several pieces.

This region splitter tries to adapt to the tiling scheme of the input image using the TileHint parameter. It aims at synchronizing the streaming with the tiling scheme (in a JPEG 2000 situation for example) so as to avoid reading the same tile multiple times in the standard pixel-based processing scheme.

If the requested number of splits is lower than the number of tiles in the image region, then the splitter will derive splits that combine several tiles in one split. If the requested number of splits is greater than the number of tiles in the image region, the splitter will derive splits that divide exactly one tile. All splits from one input tiles will be spawned before changing to a new tile, ensuring the former tile will be only read once.

If the TileHint is empty, or is VImageDimension is not 2, the splitter falls back to the behaviour of otb::ImageRegionSquareTileSplitter.

See also
ImageRegionSquareTileSplitter

ImageRegionSquareTileSplitter divides an ImageRegion into smaller regions. ImageRegionSquareTileSplitter is used by the StreamingImageFilter to divide a requested output region into a series of smaller requests of the pipeline. This object has two basic methods: GetNumberOfSplits() and GetSplit().

GetNumberOfSplits() is used to determine how may subregions a given region can be divided. You call GetNumberOfSplits with an argument that is the number of subregions you want. If the image region can support that number of subregions, that number is returned. Otherwise, the maximum number of splits a region can support will be returned. For example, if a region splitter class only divides a region into horizontal slabs, then the maximum number of splits will be the number of rows in the region.

GetSplit() returns the ith of N subregions (as an ImageRegion object).

This ImageRegionSquareTileSplitter class divides a region along the outermost dimension. If the outermost dimension has size 1 (i.e. a volume with a single slice), the ImageRegionSquareTileSplitter will divide the region along the next outermost dimension. If that dimension has size 1, the process continues with the next outermost dimension.

Regions obtained by the ImageRegionSquareTileSplitter are aligned on a grid with width of 256. Divisions can occur only at line defined as k*256.

Other ImageRegionSquareTileSplitter subclasses could divide an image into more uniform shaped regions instead of slabs.

See also
ImageRegionMultidimensionalSplitter

Definition at line 75 of file otbImageRegionSquareTileSplitter.h.

Member Typedef Documentation

◆ ConstPointer

template<unsigned int VImageDimension>
typedef itk::SmartPointer<const Self> otb::ImageRegionSquareTileSplitter< VImageDimension >::ConstPointer

Definition at line 82 of file otbImageRegionSquareTileSplitter.h.

◆ IndexType

template<unsigned int VImageDimension>
typedef itk::Index<VImageDimension> otb::ImageRegionSquareTileSplitter< VImageDimension >::IndexType

Index typedef support. An index is used to access pixel values.

Definition at line 100 of file otbImageRegionSquareTileSplitter.h.

◆ IndexValueType

template<unsigned int VImageDimension>
typedef IndexType::IndexValueType otb::ImageRegionSquareTileSplitter< VImageDimension >::IndexValueType

Definition at line 101 of file otbImageRegionSquareTileSplitter.h.

◆ Pointer

template<unsigned int VImageDimension>
typedef itk::SmartPointer<Self> otb::ImageRegionSquareTileSplitter< VImageDimension >::Pointer

Definition at line 81 of file otbImageRegionSquareTileSplitter.h.

◆ RegionType

template<unsigned int VImageDimension>
typedef itk::ImageRegion<VImageDimension> otb::ImageRegionSquareTileSplitter< VImageDimension >::RegionType

Region typedef support.

Definition at line 108 of file otbImageRegionSquareTileSplitter.h.

◆ Self

template<unsigned int VImageDimension>
typedef ImageRegionSquareTileSplitter otb::ImageRegionSquareTileSplitter< VImageDimension >::Self

Standard class typedefs.

Definition at line 79 of file otbImageRegionSquareTileSplitter.h.

◆ SizeType

template<unsigned int VImageDimension>
typedef itk::Size<VImageDimension> otb::ImageRegionSquareTileSplitter< VImageDimension >::SizeType

Size typedef support. A size is used to define region bounds.

Definition at line 104 of file otbImageRegionSquareTileSplitter.h.

◆ SizeValueType

template<unsigned int VImageDimension>
typedef SizeType::SizeValueType otb::ImageRegionSquareTileSplitter< VImageDimension >::SizeValueType

Definition at line 105 of file otbImageRegionSquareTileSplitter.h.

◆ Superclass

template<unsigned int VImageDimension>
typedef itk::ImageRegionSplitter<VImageDimension> otb::ImageRegionSquareTileSplitter< VImageDimension >::Superclass

Definition at line 80 of file otbImageRegionSquareTileSplitter.h.

Constructor & Destructor Documentation

◆ ImageRegionSquareTileSplitter() [1/2]

template<unsigned int VImageDimension>
otb::ImageRegionSquareTileSplitter< VImageDimension >::ImageRegionSquareTileSplitter ( )
inlineprotected

Definition at line 128 of file otbImageRegionSquareTileSplitter.h.

◆ ~ImageRegionSquareTileSplitter()

template<unsigned int VImageDimension>
otb::ImageRegionSquareTileSplitter< VImageDimension >::~ImageRegionSquareTileSplitter ( )
inlineoverrideprotected

Definition at line 131 of file otbImageRegionSquareTileSplitter.h.

◆ ImageRegionSquareTileSplitter() [2/2]

template<unsigned int VImageDimension>
otb::ImageRegionSquareTileSplitter< VImageDimension >::ImageRegionSquareTileSplitter ( const ImageRegionSquareTileSplitter< VImageDimension > &  )
privatedelete

Member Function Documentation

◆ CreateAnother()

template<unsigned int VImageDimension>
virtual::itk::LightObject::Pointer otb::ImageRegionSquareTileSplitter< VImageDimension >::CreateAnother ( void  ) const

◆ GetImageDimension()

template<unsigned int VImageDimension>
static unsigned int otb::ImageRegionSquareTileSplitter< VImageDimension >::GetImageDimension ( )
inlinestatic

Dimension of the image available at run time.

Definition at line 94 of file otbImageRegionSquareTileSplitter.h.

◆ GetNameOfClass()

template<unsigned int VImageDimension>
virtual const char* otb::ImageRegionSquareTileSplitter< VImageDimension >::GetNameOfClass ( ) const
virtual

Run-time type information (and related methods).

◆ GetNumberOfSplits()

template<unsigned int VImageDimension>
unsigned int otb::ImageRegionSquareTileSplitter< VImageDimension >::GetNumberOfSplits ( const RegionType region,
unsigned int  requestedNumber 
)
override

How many pieces can the specified region be split? A given region cannot always be divided into the requested number of pieces. For instance, if the numberOfPieces exceeds the number of pixels along a certain dimensions, then some splits will not be possible.

Definition at line 32 of file otbImageRegionSquareTileSplitter.hxx.

References otbMsgDevMacro.

Referenced by otb::ImageRegionAdaptativeSplitter< VImageDimension >::EstimateSplitMap().

◆ GetSplit()

template<unsigned int VImageDimension>
itk::ImageRegion< VImageDimension > otb::ImageRegionSquareTileSplitter< VImageDimension >::GetSplit ( unsigned int  i,
unsigned int  numberOfPieces,
const RegionType region 
)
override

Get a region definition that represents the ith piece a specified region. The "numberOfPieces" specified should be less than or equal to what GetNumberOfSplits() returns.

Definition at line 62 of file otbImageRegionSquareTileSplitter.hxx.

Referenced by otb::ImageRegionAdaptativeSplitter< VImageDimension >::EstimateSplitMap().

◆ GetTileDimension()

template<unsigned int VImageDimension>
virtual unsigned int otb::ImageRegionSquareTileSplitter< VImageDimension >::GetTileDimension ( )
virtual

◆ GetTileSizeAlignment()

template<unsigned int VImageDimension>
virtual unsigned int otb::ImageRegionSquareTileSplitter< VImageDimension >::GetTileSizeAlignment ( )
virtual

◆ New()

template<unsigned int VImageDimension>
static Pointer otb::ImageRegionSquareTileSplitter< VImageDimension >::New ( )
static

Method for creation through the object factory.

Referenced by otb::ImageRegionAdaptativeSplitter< VImageDimension >::EstimateSplitMap().

◆ operator=()

template<unsigned int VImageDimension>
void otb::ImageRegionSquareTileSplitter< VImageDimension >::operator= ( const ImageRegionSquareTileSplitter< VImageDimension > &  )
privatedelete

◆ PrintSelf()

template<unsigned int VImageDimension>
void otb::ImageRegionSquareTileSplitter< VImageDimension >::PrintSelf ( std::ostream &  os,
itk::Indent  indent 
) const
overrideprotected

Definition at line 107 of file otbImageRegionSquareTileSplitter.hxx.

◆ SetTileSizeAlignment()

template<unsigned int VImageDimension>
virtual void otb::ImageRegionSquareTileSplitter< VImageDimension >::SetTileSizeAlignment ( unsigned int  _arg)
virtual

Member Data Documentation

◆ ImageDimension

template<unsigned int VImageDimension>
const unsigned int otb::ImageRegionSquareTileSplitter< VImageDimension >::ImageDimension = VImageDimension
static

Dimension of the image available at compile time.

Definition at line 91 of file otbImageRegionSquareTileSplitter.h.

◆ m_SplitsPerDimension

template<unsigned int VImageDimension>
itk::FixedArray<unsigned int, VImageDimension> otb::ImageRegionSquareTileSplitter< VImageDimension >::m_SplitsPerDimension
private

Definition at line 140 of file otbImageRegionSquareTileSplitter.h.

◆ m_TileDimension

template<unsigned int VImageDimension>
unsigned int otb::ImageRegionSquareTileSplitter< VImageDimension >::m_TileDimension
private

Definition at line 141 of file otbImageRegionSquareTileSplitter.h.

◆ m_TileSizeAlignment

template<unsigned int VImageDimension>
unsigned int otb::ImageRegionSquareTileSplitter< VImageDimension >::m_TileSizeAlignment
private

Definition at line 142 of file otbImageRegionSquareTileSplitter.h.


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