OTB  6.7.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 Self
ConstPointer
 
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 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 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)
 
- Public Member Functions inherited from itk::Object
unsigned long AddObserver (const EventObject &event, Command *)
 
unsigned long AddObserver (const EventObject &event, Command *) const
 
virtual LightObject::Pointer CreateAnother () const override
 
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 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 Member Functions inherited from itk::Object
 Object ()
 
bool PrintObservers (std::ostream &os, Indent indent) const
 
virtual void PrintSelf (std::ostream &os, Indent indent) const override
 
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 ()
 

Protected Attributes

unsigned int m_ComputedNumberOfSplits
 
RegionType m_Region
 
AbstractSplitterPointerType m_Splitter
 
- Protected Attributes inherited from itk::LightObject
AtomicInt< int > m_ReferenceCount
 

Private Member Functions

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

Private Attributes

MemoryPrintType m_DefaultRAM
 

Additional Inherited Members

- 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 ()
 

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

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

The splitter used to compute the different strips

Definition at line 112 of file otbStreamingManager.h.

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

Definition at line 70 of file otbStreamingManager.h.

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

Definition at line 60 of file otbStreamingManager.h.

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

Definition at line 63 of file otbStreamingManager.h.

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

Definition at line 62 of file otbStreamingManager.h.

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

Definition at line 65 of file otbStreamingManager.h.

Definition at line 69 of file otbStreamingManager.h.

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

Definition at line 67 of file otbStreamingManager.h.

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

Definition at line 59 of file otbStreamingManager.h.

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

Definition at line 64 of file otbStreamingManager.h.

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

Standard class typedefs.

Definition at line 57 of file otbStreamingManager.h.

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

Definition at line 66 of file otbStreamingManager.h.

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

Definition at line 58 of file otbStreamingManager.h.

Constructor & Destructor Documentation

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

Definition at line 32 of file otbStreamingManager.hxx.

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

Definition at line 39 of file otbStreamingManager.hxx.

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

Member Function Documentation

template<class TImage >
unsigned int otb::StreamingManager< TImage >::EstimateOptimalNumberOfDivisions ( itk::DataObject input,
const RegionType region,
MemoryPrintType  availableRAMInMB,
double  bias = 1.0 
)
protectedvirtual
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 52 of file otbStreamingManager.hxx.

References otb::ConfigurationManager::GetMaxRAMHint().

template<class TImage>
virtual MemoryPrintType otb::StreamingManager< TImage >::GetDefaultRAM ( )
virtual
template<class TImage>
virtual const char* otb::StreamingManager< TImage >::GetNameOfClass ( ) const
virtual
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 166 of file otbStreamingManager.hxx.

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 173 of file otbStreamingManager.hxx.

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

Definition at line 45 of file otbStreamingManager.hxx.

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

Actually computes the stream divisions, according to the specified streaming mode, eventually using the input parameter to estimate memory consumption

Implemented in otb::StreamingShrinkStreamingManager< TInputImage >, and otb::TileDimensionTiledStreamingManager< TImage >.

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

Member Data Documentation

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.

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

The number of splits generated by the splitter

Definition at line 106 of file otbStreamingManager.h.

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

Default available RAM in MB

Definition at line 125 of file otbStreamingManager.h.

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

The region to stream

Definition at line 109 of file otbStreamingManager.h.

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

Definition at line 113 of file otbStreamingManager.h.


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