OTB  6.7.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 Self
ConstPointer
 
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 Types inherited from itk::ImageRegionSplitter< VImageDimension >
typedef SmartPointer< const SelfConstPointer
 
typedef Index< VImageDimension > IndexType
 
typedef SmartPointer< SelfPointer
 
typedef ImageRegion
< VImageDimension > 
RegionType
 
typedef ImageRegionSplitter Self
 
typedef Size< VImageDimension > SizeType
 
typedef SizeType::SizeValueType SizeValueType
 
typedef ImageRegionSplitterBase Superclass
 
- Public Types inherited from itk::ImageRegionSplitterBase
typedef SmartPointer< const SelfConstPointer
 
typedef SmartPointer< SelfPointer
 
typedef ImageRegionSplitterBase Self
 
typedef Object Superclass
 
- Public Types inherited from itk::Object
typedef SmartPointer< const SelfConstPointer
 
typedef SmartPointer< SelfPointer
 
typedef Object Self
 
typedef LightObject Superclass
 
- Public Types inherited from itk::LightObject
typedef SmartPointer< const SelfConstPointer
 
typedef SmartPointer< SelfPointer
 
typedef LightObject Self
 

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)
 
- Public Member Functions inherited from itk::ImageRegionSplitterBase
unsigned int GetNumberOfSplits (const ImageIORegion &region, unsigned int requestedNumber) const
 
unsigned int GetNumberOfSplits (const ImageRegion< VImageDimension > &region, unsigned int requestedNumber) const
 
unsigned int GetSplit (unsigned int i, unsigned int numberOfPieces, ImageIORegion &region) const
 
unsigned int GetSplit (unsigned int i, unsigned int numberOfPieces, ImageRegion< VImageDimension > &region) const
 
- Public Member Functions inherited from itk::Object
unsigned long AddObserver (const EventObject &event, Command *)
 
unsigned long AddObserver (const EventObject &event, Command *) const
 
virtual void DebugOff () const
 
virtual void DebugOn () const
 
CommandGetCommand (unsigned long tag)
 
bool GetDebug () const
 
const MetaDataDictionaryGetMetaDataDictionary () const
 
MetaDataDictionaryGetMetaDataDictionary ()
 
virtual ModifiedTimeType GetMTime () const
 
virtual const std::string & GetObjectName () const
 
virtual const TimeStampGetTimeStamp () const
 
bool HasObserver (const EventObject &event) const
 
void InvokeEvent (const EventObject &)
 
void InvokeEvent (const EventObject &) const
 
virtual void Modified () const
 
virtual void Register () const override
 
void RemoveAllObservers ()
 
void RemoveObserver (unsigned long tag)
 
void SetDebug (bool debugFlag) const
 
void SetMetaDataDictionary (const MetaDataDictionary &rhs)
 
virtual void SetObjectName (std::string _arg)
 
virtual void SetReferenceCount (int) override
 
virtual void UnRegister () const noexceptoverride
 
- Public Member Functions inherited from itk::LightObject
virtual void Delete ()
 
virtual int GetReferenceCount () const
 
 itkCloneMacro (Self)
 
void Print (std::ostream &os, Indent indent=0) const
 

Static Public Member Functions

static unsigned int GetImageDimension ()
 
static Pointer New ()
 
- Static Public Member Functions inherited from itk::ImageRegionSplitter< VImageDimension >
static unsigned int GetImageDimension ()
 
static Pointer New ()
 
- Static Public Member Functions inherited from itk::Object
static bool GetGlobalWarningDisplay ()
 
static void GlobalWarningDisplayOff ()
 
static void GlobalWarningDisplayOn ()
 
static Pointer New ()
 
static void SetGlobalWarningDisplay (bool flag)
 
- Static Public Member Functions inherited from itk::LightObject
static void BreakOnError ()
 
static Pointer New ()
 

Static Public Attributes

static const unsigned int ImageDimension = VImageDimension
 
- Static Public Attributes inherited from itk::ImageRegionSplitter< VImageDimension >
static const unsigned int ImageDimension
 

Protected Member Functions

 ImageRegionSquareTileSplitter ()
 
 ~ImageRegionSquareTileSplitter () override
 
void PrintSelf (std::ostream &os, itk::Indent indent) const override
 
- Protected Member Functions inherited from itk::ImageRegionSplitter< VImageDimension >
virtual unsigned int GetNumberOfSplitsInternal (unsigned int, const IndexValueType regionIndex[], const SizeValueType regionSize[], unsigned int requestedNumber) const override
 
virtual unsigned int GetSplitInternal (unsigned int dim, unsigned int i, unsigned int numberOfPieces, IndexValueType regionIndex[], SizeValueType regionSize[]) const override
 
 ImageRegionSplitter ()
 
 ~ImageRegionSplitter ()
 
- Protected Member Functions inherited from itk::ImageRegionSplitterBase
 ImageRegionSplitterBase ()
 
- Protected Member Functions inherited from itk::Object
 Object ()
 
bool PrintObservers (std::ostream &os, Indent indent) const
 
virtual void SetTimeStamp (const TimeStamp &time)
 
virtual ~Object ()
 
- Protected Member Functions inherited from itk::LightObject
virtual LightObject::Pointer InternalClone () const
 
 LightObject ()
 
virtual void PrintHeader (std::ostream &os, Indent indent) const
 
virtual void PrintTrailer (std::ostream &os, Indent indent) const
 
virtual ~LightObject ()
 

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
 

Additional Inherited Members

- Protected Attributes inherited from itk::LightObject
AtomicInt< int > m_ReferenceCount
 

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

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

Definition at line 82 of file otbImageRegionSquareTileSplitter.h.

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.

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

Definition at line 101 of file otbImageRegionSquareTileSplitter.h.

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

Definition at line 81 of file otbImageRegionSquareTileSplitter.h.

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

Region typedef support.

Definition at line 108 of file otbImageRegionSquareTileSplitter.h.

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

Standard class typedefs.

Definition at line 79 of file otbImageRegionSquareTileSplitter.h.

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.

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

Definition at line 105 of file otbImageRegionSquareTileSplitter.h.

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

Definition at line 80 of file otbImageRegionSquareTileSplitter.h.

Constructor & Destructor Documentation

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

Definition at line 130 of file otbImageRegionSquareTileSplitter.h.

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

Definition at line 131 of file otbImageRegionSquareTileSplitter.h.

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

Member Function Documentation

template<unsigned int VImageDimension>
virtual::itk::LightObject::Pointer otb::ImageRegionSquareTileSplitter< VImageDimension >::CreateAnother ( void  ) const
virtual
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.

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

Run-time type information (and related methods).

Reimplemented from itk::ImageRegionSplitter< VImageDimension >.

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

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.

Reimplemented from itk::ImageRegionSplitter< VImageDimension >.

Definition at line 34 of file otbImageRegionSquareTileSplitter.hxx.

References itk::ImageRegion< VImageDimension >::GetNumberOfPixels(), itk::ImageRegion< VImageDimension >::GetSize(), and otbMsgDevMacro.

Referenced by otb::NumberOfDivisionsTiledStreamingManager< TImage >::PrepareStreaming(), otb::TileDimensionTiledStreamingManager< TImage >::PrepareStreaming(), and otb::RAMDrivenTiledStreamingManager< TImage >::PrepareStreaming().

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

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.

Reimplemented from itk::ImageRegionSplitter< VImageDimension >.

Definition at line 66 of file otbImageRegionSquareTileSplitter.hxx.

References itk::ImageRegion< VImageDimension >::Crop(), itk::ImageRegion< VImageDimension >::GetIndex(), itk::ImageRegion< VImageDimension >::SetIndex(), and itk::ImageRegion< VImageDimension >::SetSize().

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

Method for creation through the object factory.

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

template<unsigned int VImageDimension>
void otb::ImageRegionSquareTileSplitter< VImageDimension >::operator= ( const ImageRegionSquareTileSplitter< VImageDimension > &  )
privatedelete
template<unsigned int VImageDimension>
void otb::ImageRegionSquareTileSplitter< VImageDimension >::PrintSelf ( std::ostream &  os,
itk::Indent  indent 
) const
overrideprotectedvirtual
template<unsigned int VImageDimension>
virtual void otb::ImageRegionSquareTileSplitter< VImageDimension >::SetTileSizeAlignment ( unsigned int  _arg)
virtual

Member Data Documentation

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.

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

Definition at line 138 of file otbImageRegionSquareTileSplitter.h.

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

Definition at line 139 of file otbImageRegionSquareTileSplitter.h.

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

Definition at line 140 of file otbImageRegionSquareTileSplitter.h.


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