OTB  9.0.0
Orfeo Toolbox
Public Types | Public Member Functions | Static Public Attributes | Protected Types | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
otb::StreamingManager< TImage > Class Template Referenceabstract

#include <otbStreamingManager.h>

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

Public Types

typedef itk::ImageRegionSplitterBase AbstractSplitterType
 
typedef itk::SmartPointer< const SelfConstPointer
 
typedef ImageType::Pointer ImagePointerType
 
typedef TImage ImageType
 
typedef RegionType::IndexType IndexType
 
typedef otb::PipelineMemoryPrintCalculator::MemoryPrintType MemoryPrintType
 
typedef ImageType::InternalPixelType PixelType
 
typedef itk::SmartPointer< SelfPointer
 
typedef ImageType::RegionType RegionType
 
typedef StreamingManager Self
 
typedef RegionType::SizeType SizeType
 
typedef itk::LightObject Superclass
 

Public Member Functions

virtual MemoryPrintType GetDefaultRAM ()
 
virtual const char * GetNameOfClass () const
 
virtual unsigned int GetNumberOfSplits ()
 
virtual RegionType GetSplit (unsigned int i)
 
const AbstractSplitterTypeGetSplitter () const
 
virtual void PrepareStreaming (itk::DataObject *input, const RegionType &region)=0
 
virtual void SetDefaultRAM (MemoryPrintType _arg)
 

Static Public Attributes

static const unsigned int ImageDimension = ImageType::ImageDimension
 

Protected Types

typedef AbstractSplitterType::Pointer AbstractSplitterPointerType
 

Protected Member Functions

virtual unsigned int EstimateOptimalNumberOfDivisions (itk::DataObject *input, const RegionType &region, MemoryPrintType availableRAMInMB, double bias=1.0)
 
 StreamingManager ()
 
 ~StreamingManager () override
 

Protected Attributes

unsigned int m_ComputedNumberOfSplits
 
RegionType m_Region
 
AbstractSplitterPointerType m_Splitter
 

Private Member Functions

MemoryPrintType GetActualAvailableRAMInBytes (MemoryPrintType availableRAMInMB)
 
void operator= (const StreamingManager &)=delete
 
 StreamingManager (const StreamingManager &)=delete
 

Private Attributes

MemoryPrintType m_DefaultRAM
 

Detailed Description

template<class TImage>
class otb::StreamingManager< TImage >

This class handles the streaming process used in the writers implementation.

The streaming mode can be chosen with either SetStrippedRAMStreamingMode, SetStrippedNumberOfLinesStreamingMode, SetTiledRAMStreamingMode, or SetTiledTileDimensionStreamingMode.

Then, PrepareStreaming must be called so that the stream type and dimensions are computed This involves passing the actual DataObject who will be written, since it will be used during memory estimation for some specific streaming modes.

After PrepareStreaming has been called, the actual number of splits and streaming mode which will be used can be retrieved with GetStreamingMode and GetNumberOfSplits. The different splits can be retrieved with GetSplit

See also
ImageFileWriter
StreamingImageVirtualFileWriter

Definition at line 53 of file otbStreamingManager.h.

Member Typedef Documentation

◆ AbstractSplitterPointerType

template<class TImage >
typedef AbstractSplitterType::Pointer otb::StreamingManager< TImage >::AbstractSplitterPointerType
protected

The splitter used to compute the different strips

Definition at line 110 of file otbStreamingManager.h.

◆ AbstractSplitterType

template<class TImage >
typedef itk::ImageRegionSplitterBase otb::StreamingManager< TImage >::AbstractSplitterType

Definition at line 70 of file otbStreamingManager.h.

◆ ConstPointer

template<class TImage >
typedef itk::SmartPointer<const Self> otb::StreamingManager< TImage >::ConstPointer

Definition at line 60 of file otbStreamingManager.h.

◆ ImagePointerType

template<class TImage >
typedef ImageType::Pointer otb::StreamingManager< TImage >::ImagePointerType

Definition at line 63 of file otbStreamingManager.h.

◆ ImageType

template<class TImage >
typedef TImage otb::StreamingManager< TImage >::ImageType

Definition at line 62 of file otbStreamingManager.h.

◆ IndexType

template<class TImage >
typedef RegionType::IndexType otb::StreamingManager< TImage >::IndexType

Definition at line 65 of file otbStreamingManager.h.

◆ MemoryPrintType

Definition at line 69 of file otbStreamingManager.h.

◆ PixelType

template<class TImage >
typedef ImageType::InternalPixelType otb::StreamingManager< TImage >::PixelType

Definition at line 67 of file otbStreamingManager.h.

◆ Pointer

template<class TImage >
typedef itk::SmartPointer<Self> otb::StreamingManager< TImage >::Pointer

Definition at line 59 of file otbStreamingManager.h.

◆ RegionType

template<class TImage >
typedef ImageType::RegionType otb::StreamingManager< TImage >::RegionType

Definition at line 64 of file otbStreamingManager.h.

◆ Self

template<class TImage >
typedef StreamingManager otb::StreamingManager< TImage >::Self

Standard class typedefs.

Definition at line 57 of file otbStreamingManager.h.

◆ SizeType

template<class TImage >
typedef RegionType::SizeType otb::StreamingManager< TImage >::SizeType

Definition at line 66 of file otbStreamingManager.h.

◆ Superclass

template<class TImage >
typedef itk::LightObject otb::StreamingManager< TImage >::Superclass

Definition at line 58 of file otbStreamingManager.h.

Constructor & Destructor Documentation

◆ StreamingManager() [1/2]

template<class TImage >
otb::StreamingManager< TImage >::StreamingManager
protected

Definition at line 32 of file otbStreamingManager.hxx.

◆ ~StreamingManager()

template<class TImage >
otb::StreamingManager< TImage >::~StreamingManager
overrideprotected

Definition at line 37 of file otbStreamingManager.hxx.

◆ StreamingManager() [2/2]

template<class TImage >
otb::StreamingManager< TImage >::StreamingManager ( const StreamingManager< TImage > &  )
privatedelete

Member Function Documentation

◆ EstimateOptimalNumberOfDivisions()

template<class TImage >
unsigned int otb::StreamingManager< TImage >::EstimateOptimalNumberOfDivisions ( itk::DataObject *  input,
const RegionType region,
MemoryPrintType  availableRAMInMB,
double  bias = 1.0 
)
protectedvirtual

Definition at line 68 of file otbStreamingManager.hxx.

◆ GetActualAvailableRAMInBytes()

template<class TImage >
StreamingManager< TImage >::MemoryPrintType otb::StreamingManager< TImage >::GetActualAvailableRAMInBytes ( MemoryPrintType  availableRAMInMB)
private

Compute the available RAM in Bytes from an input value in MByte. If the input value is 0, it uses the m_DefaultRAM value. If m_DefaultRAM is also 0, it uses the configuration settings

Definition at line 48 of file otbStreamingManager.hxx.

◆ GetDefaultRAM()

template<class TImage >
virtual MemoryPrintType otb::StreamingManager< TImage >::GetDefaultRAM ( )
virtual

◆ GetNameOfClass()

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

◆ GetNumberOfSplits()

template<class TImage >
unsigned int otb::StreamingManager< TImage >::GetNumberOfSplits
virtual

Returns the actual number of pieces that will be used to process the image. PrepareStreaming() must have been called before. This can be different than the requested number

Definition at line 158 of file otbStreamingManager.hxx.

◆ GetSplit()

template<class TImage >
StreamingManager< TImage >::RegionType otb::StreamingManager< TImage >::GetSplit ( unsigned int  i)
virtual

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

Definition at line 164 of file otbStreamingManager.hxx.

◆ GetSplitter()

template<class TImage >
const StreamingManager< TImage >::AbstractSplitterType * otb::StreamingManager< TImage >::GetSplitter

Definition at line 42 of file otbStreamingManager.hxx.

◆ operator=()

template<class TImage >
void otb::StreamingManager< TImage >::operator= ( const StreamingManager< TImage > &  )
privatedelete

◆ PrepareStreaming()

template<class TImage >
virtual void otb::StreamingManager< TImage >::PrepareStreaming ( itk::DataObject *  input,
const RegionType region 
)
pure virtual

◆ SetDefaultRAM()

template<class TImage >
virtual void otb::StreamingManager< TImage >::SetDefaultRAM ( MemoryPrintType  _arg)
virtual

Member Data Documentation

◆ ImageDimension

template<class TImage >
const unsigned int otb::StreamingManager< TImage >::ImageDimension = ImageType::ImageDimension
static

Dimension of input image.

Definition at line 76 of file otbStreamingManager.h.

◆ m_ComputedNumberOfSplits

template<class TImage >
unsigned int otb::StreamingManager< TImage >::m_ComputedNumberOfSplits
protected

The number of splits generated by the splitter

Definition at line 104 of file otbStreamingManager.h.

◆ m_DefaultRAM

template<class TImage >
MemoryPrintType otb::StreamingManager< TImage >::m_DefaultRAM
private

Default available RAM in MB

Definition at line 123 of file otbStreamingManager.h.

◆ m_Region

template<class TImage >
RegionType otb::StreamingManager< TImage >::m_Region
protected

The region to stream

Definition at line 107 of file otbStreamingManager.h.

◆ m_Splitter

template<class TImage >
AbstractSplitterPointerType otb::StreamingManager< TImage >::m_Splitter
protected

Definition at line 111 of file otbStreamingManager.h.


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