OTB  6.3.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::ImageFileWriter< TInputImage > Class Template Reference

#include <otbImageFileWriter.h>

+ Inheritance diagram for otb::ImageFileWriter< TInputImage >:
+ Collaboration diagram for otb::ImageFileWriter< TInputImage >:

Public Types

typedef itk::SmartPointer
< const Self
ConstPointer
 
typedef
Superclass::DataObjectPointer 
DataObjectPointer
 
typedef
ExtendedFilenameToWriterOptions 
FNameHelperType
 
typedef InputImageType::PixelType InputImagePixelType
 
typedef InputImageType::Pointer InputImagePointer
 
typedef InputImageType::RegionType InputImageRegionType
 
typedef TInputImage InputImageType
 
typedef InputImageType::IndexType InputIndexType
 
typedef OutputImageType::PixelType OutputImagePixelType
 
typedef OutputImageType::Pointer OutputImagePointer
 
typedef OutputImageType::RegionType OutputImageRegionType
 
typedef TInputImage OutputImageType
 
typedef itk::SmartPointer< SelfPointer
 
typedef ImageFileWriter Self
 
typedef
StreamingManagerType::Pointer 
StreamingManagerPointerType
 
typedef StreamingManager
< InputImageType
StreamingManagerType
 
typedef itk::ProcessObject Superclass
 
- Public Types inherited from itk::ProcessObject
typedef SmartPointer< const SelfConstPointer
 
typedef
DataObject::DataObjectIdentifierType 
DataObjectIdentifierType
 
typedef DataObject::Pointer DataObjectPointer
 
typedef std::vector
< DataObjectPointer
DataObjectPointerArray
 
typedef
DataObjectPointerArray::size_type 
DataObjectPointerArraySizeType
 
typedef std::vector
< DataObjectIdentifierType
NameArray
 
typedef SmartPointer< SelfPointer
 
typedef ProcessObject 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 otb::ImageIOBaseGetImageIO () const
 
const InputImageTypeGetInput ()
 
virtual const char * GetNameOfClass () const
 
StreamingManagerTypeGetStreamingManager (void)
 
 itkGetObjectMacro (ImageIO, otb::ImageIOBase)
 
void SetAutomaticAdaptativeStreaming (unsigned int availableRAM=0, double bias=1.0)
 
void SetAutomaticStrippedStreaming (unsigned int availableRAM=0, double bias=1.0)
 
void SetAutomaticTiledStreaming (unsigned int availableRAM=0, double bias=1.0)
 
virtual void SetImageIO (otb::ImageIOBase *_arg)
 
virtual void SetInput (const InputImageType *input)
 
void SetNumberOfDivisionsStrippedStreaming (unsigned int nbDivisions)
 
void SetNumberOfDivisionsTiledStreaming (unsigned int nbDivisions)
 
void SetNumberOfLinesStrippedStreaming (unsigned int nbLinesPerStrip)
 
void SetStreamingManager (StreamingManagerType *streamingManager)
 
void SetTileDimensionTiledStreaming (unsigned int tileDimension)
 
virtual void SetFileName (const char *extendedFileName)
 
virtual void SetFileName (std::string extendedFileName)
 
virtual const char * GetFileName () const
 
void SetIORegion (const itk::ImageIORegion &region)
 
virtual const itk::ImageIORegionGetIORegion () const
 
virtual void SetUseCompression (bool _arg)
 
virtual const bool & GetUseCompression () const
 
virtual void UseCompressionOn ()
 
virtual void UseCompressionOff ()
 
virtual void SetUseInputMetaDataDictionary (bool _arg)
 
virtual const bool & GetUseInputMetaDataDictionary () const
 
virtual void UseInputMetaDataDictionaryOn ()
 
virtual void UseInputMetaDataDictionaryOff ()
 
- Public Member Functions inherited from itk::ProcessObject
virtual void AbortGenerateDataOff ()
 
virtual void AbortGenerateDataOn ()
 
virtual void EnlargeOutputRequestedRegion (DataObject *)
 
virtual const bool & GetAbortGenerateData () const
 
DataObjectPointerArray GetIndexedInputs ()
 
DataObjectPointerArray GetIndexedOutputs ()
 
NameArray GetInputNames () const
 
DataObjectPointerArray GetInputs ()
 
MultiThreader * GetMultiThreader () const
 
DataObjectPointerArraySizeType GetNumberOfIndexedInputs () const
 
DataObjectPointerArraySizeType GetNumberOfIndexedOutputs () const
 
DataObjectPointerArraySizeType GetNumberOfInputs () const
 
DataObjectPointerArraySizeType GetNumberOfOutputs () const
 
virtual const ThreadIdTypeGetNumberOfThreads () const
 
virtual
DataObjectPointerArraySizeType 
GetNumberOfValidRequiredInputs () const
 
NameArray GetOutputNames () const
 
DataObjectPointerArray GetOutputs ()
 
virtual const float & GetProgress () const
 
virtual const bool & GetReleaseDataBeforeUpdateFlag () const
 
virtual bool GetReleaseDataFlag () const
 
NameArray GetRequiredInputNames () const
 
bool HasInput (const DataObjectIdentifierType &key) const
 
bool HasOutput (const DataObjectIdentifierType &key) const
 
virtual DataObjectPointer MakeOutput (const DataObjectIdentifierType &)
 
virtual DataObjectPointer MakeOutput (DataObjectPointerArraySizeType idx)
 
virtual void PrepareOutputs ()
 
virtual void PropagateRequestedRegion (DataObject *output)
 
virtual void ReleaseDataBeforeUpdateFlagOff ()
 
virtual void ReleaseDataBeforeUpdateFlagOn ()
 
void ReleaseDataFlagOff ()
 
void ReleaseDataFlagOn ()
 
virtual void ResetPipeline ()
 
virtual void SetAbortGenerateData (bool _arg)
 
virtual void SetNumberOfThreads (ThreadIdType _arg)
 
void SetProgress (float progress)
 
virtual void SetReleaseDataBeforeUpdateFlag (bool _arg)
 
virtual void SetReleaseDataFlag (bool flag)
 
virtual void UpdateLargestPossibleRegion ()
 
virtual void UpdateOutputData (DataObject *output)
 
virtual void UpdateOutputInformation ()
 
void UpdateProgress (float progress)
 
- 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 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 InputImageDimension = InputImageType::ImageDimension
 

Protected Member Functions

 ImageFileWriter ()
 
void PrintSelf (std::ostream &os, itk::Indent indent) const ITK_OVERRIDE
 
 ~ImageFileWriter () ITK_OVERRIDE
 
- Protected Member Functions inherited from itk::ProcessObject
virtual void AddInput (DataObject *input)
 
virtual void AddOutput (DataObject *output)
 
bool AddRequiredInputName (const DataObjectIdentifierType &, DataObjectPointerArraySizeType idx)
 
bool AddRequiredInputName (const DataObjectIdentifierType &)
 
virtual void CacheInputReleaseDataFlags ()
 
virtual void GenerateInputRequestedRegion ()
 
virtual void GenerateOutputInformation ()
 
virtual void GenerateOutputRequestedRegion (DataObject *output)
 
const DataObjectGetInput (const DataObjectIdentifierType &key) const
 
DataObjectGetInput (DataObjectPointerArraySizeType idx)
 
const DataObjectGetInput (DataObjectPointerArraySizeType idx) const
 
DataObjectGetInput (const DataObjectIdentifierType &key)
 
virtual const
DataObjectPointerArraySizeType
GetNumberOfRequiredInputs () const
 
virtual const
DataObjectPointerArraySizeType
GetNumberOfRequiredOutputs () const
 
DataObjectGetOutput (const DataObjectIdentifierType &key)
 
const DataObjectGetOutput (const DataObjectIdentifierType &key) const
 
DataObjectGetOutput (DataObjectPointerArraySizeType idx)
 
const DataObjectGetOutput (DataObjectPointerArraySizeType idx) const
 
DataObjectGetPrimaryInput ()
 
const DataObjectGetPrimaryInput () const
 
virtual const char * GetPrimaryInputName (void) const
 
DataObjectGetPrimaryOutput ()
 
const DataObjectGetPrimaryOutput () const
 
virtual const char * GetPrimaryOutputName (void) const
 
bool IsIndexedInputName (const DataObjectIdentifierType &) const
 
bool IsIndexedOutputName (const DataObjectIdentifierType &) const
 
bool IsRequiredInputName (const DataObjectIdentifierType &) const
 
 itkLegacyMacro (virtual void RemoveInput(DataObject *input))
 
 itkLegacyMacro (void SetNumberOfInputs(DataObjectPointerArraySizeType num))
 
 itkLegacyMacro (virtual void RemoveOutput(DataObject *output))
 
 itkLegacyMacro (void SetNumberOfOutputs(DataObjectPointerArraySizeType num))
 
DataObjectPointerArraySizeType MakeIndexFromInputName (const DataObjectIdentifierType &name) const
 
DataObjectPointerArraySizeType MakeIndexFromOutputName (const DataObjectIdentifierType &name) const
 
DataObjectIdentifierType MakeNameFromInputIndex (DataObjectPointerArraySizeType idx) const
 
DataObjectIdentifierType MakeNameFromOutputIndex (DataObjectPointerArraySizeType idx) const
 
virtual void PopBackInput ()
 
virtual void PopFrontInput ()
 
 ProcessObject ()
 
virtual void PropagateResetPipeline ()
 
virtual void PushBackInput (const DataObject *input)
 
virtual void PushFrontInput (const DataObject *input)
 
virtual void ReleaseInputs ()
 
virtual void RemoveInput (const DataObjectIdentifierType &key)
 
virtual void RemoveInput (DataObjectPointerArraySizeType)
 
virtual void RemoveOutput (const DataObjectIdentifierType &key)
 
virtual void RemoveOutput (DataObjectPointerArraySizeType idx)
 
bool RemoveRequiredInputName (const DataObjectIdentifierType &)
 
virtual void RestoreInputReleaseDataFlags ()
 
virtual void SetInput (const DataObjectIdentifierType &key, DataObject *input)
 
virtual void SetNthInput (DataObjectPointerArraySizeType num, DataObject *input)
 
virtual void SetNthOutput (DataObjectPointerArraySizeType num, DataObject *output)
 
void SetNumberOfIndexedInputs (DataObjectPointerArraySizeType num)
 
void SetNumberOfIndexedOutputs (DataObjectPointerArraySizeType num)
 
virtual void SetNumberOfRequiredInputs (DataObjectPointerArraySizeType)
 
virtual void SetNumberOfRequiredOutputs (DataObjectPointerArraySizeType _arg)
 
virtual void SetOutput (const DataObjectIdentifierType &key, DataObject *output)
 
virtual void SetPrimaryInput (DataObject *input)
 
virtual void SetPrimaryInputName (const DataObjectIdentifierType &key)
 
virtual void SetPrimaryOutput (DataObject *output)
 
virtual void SetPrimaryOutputName (const DataObjectIdentifierType &key)
 
void SetRequiredInputNames (const NameArray &)
 
virtual void VerifyInputInformation ()
 
virtual void VerifyPreconditions ()
 
 ~ProcessObject ()
 
- 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

 ImageFileWriter (const ImageFileWriter &)
 
void ObserveSourceFilterProgress (itk::Object *object, const itk::EventObject &event)
 
void operator= (const ImageFileWriter &)
 
void UpdateFilterProgress ()
 

Private Attributes

std::vector< unsigned int > m_BandList
 
unsigned int m_CurrentDivision
 
float m_DivisionProgress
 
bool m_FactorySpecifiedImageIO
 
std::string m_FileName
 
FNameHelperType::Pointer m_FilenameHelper
 
otb::ImageIOBase::Pointer m_ImageIO
 
unsigned int m_IOComponents
 
itk::ImageIORegion m_IORegion
 
bool m_IsObserving
 
unsigned int m_NumberOfDivisions
 
unsigned long m_ObserverID
 
InputIndexType m_ShiftOutputIndex
 
StreamingManagerPointerType m_StreamingManager
 
bool m_UseCompression
 
bool m_UseInputMetaDataDictionary
 
bool m_UserSpecifiedImageIO
 
bool m_UserSpecifiedIORegion
 
bool m_WriteGeomFile
 
void Update () ITK_OVERRIDE
 
void GenerateData (void) ITK_OVERRIDE
 

Additional Inherited Members

- Protected Attributes inherited from itk::ProcessObject
TimeStamp m_OutputInformationMTime
 
bool m_Updating
 
- Protected Attributes inherited from itk::LightObject
AtomicInt< int > m_ReferenceCount
 

Detailed Description

template<class TInputImage>
class otb::ImageFileWriter< TInputImage >

Writes image data to a single file with streaming process.

ImageFileWriter writes its input data to a single output file. ImageFileWriter interfaces with an ImageIO class to write out the data with streaming process.

ImageFileWriter will divide the output into several pieces (controlled by SetNumberOfDivisionsStrippedStreaming, SetNumberOfLinesStrippedStreaming, SetAutomaticStrippedStreaming, SetTileDimensionTiledStreaming or SetAutomaticTiledStreaming), and call the upstream pipeline for each piece, tiling the individual outputs into one large output. This reduces the memory footprint for the application since each filter does not have to process the entire dataset at once.

ImageFileWriter will write directly the streaming buffer in the image file, so that the output image never needs to be completely allocated

ImageFileWriter supports extended filenames, which allow controlling some properties of the output file. See http://wiki.orfeo-toolbox.org/index.php/ExtendedFileName for more information.

See Also
ImageFileReader
ImageSeriesReader
ImageIOBase
ExtendedFilenameToReaderOptions
Examples:
BasicFilters/DEMToRainbowExample.cxx, BasicFilters/HillShadingExample.cxx, ChangeDetection/ChangeDetectionFrameworkExample.cxx, DisparityMap/FineRegistrationImageFilterExample.cxx, DisparityMap/NCCRegistrationFilterExample.cxx, FeatureExtraction/CloudDetectionExample.cxx, FeatureExtraction/ExtractRoadByStepsExample.cxx, FeatureExtraction/ExtractRoadExample.cxx, Fusion/BayesianFusionImageFilter.cxx, Fusion/PanSharpeningExample.cxx, IO/DEMToImageGenerator.cxx, Markov/MarkovClassification1Example.cxx, Markov/MarkovClassification2Example.cxx, Markov/MarkovRegularizationExample.cxx, Markov/MarkovRestorationExample.cxx, Patented/SIFTExample.cxx, Patented/SIFTFastExample.cxx, Projections/OrthoRectificationExample.cxx, and Radiometry/AtmosphericCorrectionSequencement.cxx.

Definition at line 62 of file otbImageFileWriter.h.

Member Typedef Documentation

template<class TInputImage>
typedef itk::SmartPointer<const Self> otb::ImageFileWriter< TInputImage >::ConstPointer

Definition at line 69 of file otbImageFileWriter.h.

template<class TInputImage>
typedef Superclass::DataObjectPointer otb::ImageFileWriter< TInputImage >::DataObjectPointer

Definition at line 87 of file otbImageFileWriter.h.

template<class TInputImage>
typedef ExtendedFilenameToWriterOptions otb::ImageFileWriter< TInputImage >::FNameHelperType

The Filename Helper.

Definition at line 90 of file otbImageFileWriter.h.

template<class TInputImage>
typedef InputImageType::PixelType otb::ImageFileWriter< TInputImage >::InputImagePixelType

Definition at line 81 of file otbImageFileWriter.h.

template<class TInputImage>
typedef InputImageType::Pointer otb::ImageFileWriter< TInputImage >::InputImagePointer

Definition at line 79 of file otbImageFileWriter.h.

template<class TInputImage>
typedef InputImageType::RegionType otb::ImageFileWriter< TInputImage >::InputImageRegionType

Definition at line 80 of file otbImageFileWriter.h.

template<class TInputImage>
typedef TInputImage otb::ImageFileWriter< TInputImage >::InputImageType

Some typedefs for the input and output.

Definition at line 75 of file otbImageFileWriter.h.

template<class TInputImage>
typedef InputImageType::IndexType otb::ImageFileWriter< TInputImage >::InputIndexType

Definition at line 82 of file otbImageFileWriter.h.

template<class TInputImage>
typedef OutputImageType::PixelType otb::ImageFileWriter< TInputImage >::OutputImagePixelType

Definition at line 86 of file otbImageFileWriter.h.

template<class TInputImage>
typedef OutputImageType::Pointer otb::ImageFileWriter< TInputImage >::OutputImagePointer

Definition at line 84 of file otbImageFileWriter.h.

template<class TInputImage>
typedef OutputImageType::RegionType otb::ImageFileWriter< TInputImage >::OutputImageRegionType

Definition at line 85 of file otbImageFileWriter.h.

template<class TInputImage>
typedef TInputImage otb::ImageFileWriter< TInputImage >::OutputImageType

Definition at line 83 of file otbImageFileWriter.h.

template<class TInputImage>
typedef itk::SmartPointer<Self> otb::ImageFileWriter< TInputImage >::Pointer

Definition at line 68 of file otbImageFileWriter.h.

template<class TInputImage>
typedef ImageFileWriter otb::ImageFileWriter< TInputImage >::Self

Standard class typedefs.

Definition at line 66 of file otbImageFileWriter.h.

template<class TInputImage>
typedef StreamingManagerType::Pointer otb::ImageFileWriter< TInputImage >::StreamingManagerPointerType

Definition at line 98 of file otbImageFileWriter.h.

template<class TInputImage>
typedef StreamingManager<InputImageType> otb::ImageFileWriter< TInputImage >::StreamingManagerType

Streaming manager base class pointer

Definition at line 97 of file otbImageFileWriter.h.

template<class TInputImage>
typedef itk::ProcessObject otb::ImageFileWriter< TInputImage >::Superclass

Definition at line 67 of file otbImageFileWriter.h.

Constructor & Destructor Documentation

template<class TInputImage >
otb::ImageFileWriter< TInputImage >::ImageFileWriter ( )
protected

Definition at line 60 of file otbImageFileWriter.txx.

template<class TInputImage >
otb::ImageFileWriter< TInputImage >::~ImageFileWriter ( )
protected

Definition at line 90 of file otbImageFileWriter.txx.

template<class TInputImage>
otb::ImageFileWriter< TInputImage >::ImageFileWriter ( const ImageFileWriter< TInputImage > &  )
private

Member Function Documentation

template<class TInputImage>
virtual::itk::LightObject::Pointer otb::ImageFileWriter< TInputImage >::CreateAnother ( void  ) const
virtual

Reimplemented from itk::Object.

template<class TInputImage >
void otb::ImageFileWriter< TInputImage >::GenerateData ( void  )
protectedvirtual
template<class TInputImage >
const char * otb::ImageFileWriter< TInputImage >::GetFileName ( ) const
virtual

ImageFileWriter Methods

Definition at line 842 of file otbImageFileWriter.txx.

template<class TInputImage>
virtual const otb::ImageIOBase* otb::ImageFileWriter< TInputImage >::GetImageIO ( ) const
virtual
template<class TInputImage >
const TInputImage * otb::ImageFileWriter< TInputImage >::GetInput ( void  )

Get writer only input

Definition at line 261 of file otbImageFileWriter.txx.

template<class TInputImage>
virtual const itk::ImageIORegion& otb::ImageFileWriter< TInputImage >::GetIORegion ( ) const
virtual

Specify the region to write. If left NULL, then the whole image is written.

template<class TInputImage>
virtual const char* otb::ImageFileWriter< TInputImage >::GetNameOfClass ( ) const
virtual

Run-time type information (and related methods).

Reimplemented from itk::ProcessObject.

template<class TInputImage>
StreamingManagerType* otb::ImageFileWriter< TInputImage >::GetStreamingManager ( void  )
inline

Return the StreamingManager object responsible for dividing the region to write

Definition at line 102 of file otbImageFileWriter.h.

template<class TInputImage>
virtual const bool& otb::ImageFileWriter< TInputImage >::GetUseCompression ( ) const
virtual

Set the compression On or Off

template<class TInputImage>
virtual const bool& otb::ImageFileWriter< TInputImage >::GetUseInputMetaDataDictionary ( ) const
virtual

By default the MetaDataDictionary is taken from the input image and passed to the ImageIO. In some cases, however, a user may prefer to introduce her/his own MetaDataDictionary. This is often the case of the ImageSeriesWriter. This flag defined whether the MetaDataDictionary to use will be the one from the input image or the one already set in the ImageIO object.

template<class TInputImage>
otb::ImageFileWriter< TInputImage >::itkGetObjectMacro ( ImageIO  ,
otb::ImageIOBase   
)
template<class TInputImage>
static Pointer otb::ImageFileWriter< TInputImage >::New ( )
static

Method for creation through the object factory.

template<class TInputImage>
void otb::ImageFileWriter< TInputImage >::ObserveSourceFilterProgress ( itk::Object object,
const itk::EventObject event 
)
inlineprivate

Definition at line 218 of file otbImageFileWriter.h.

References itk::ProcessObject::GetProgress().

template<class TInputImage>
void otb::ImageFileWriter< TInputImage >::operator= ( const ImageFileWriter< TInputImage > &  )
private
template<class TInputImage >
void otb::ImageFileWriter< TInputImage >::PrintSelf ( std::ostream &  os,
itk::Indent  indent 
) const
protectedvirtual

Reimplemented from itk::ProcessObject.

Definition at line 188 of file otbImageFileWriter.txx.

template<class TInputImage >
void otb::ImageFileWriter< TInputImage >::SetAutomaticAdaptativeStreaming ( unsigned int  availableRAM = 0,
double  bias = 1.0 
)

Set the streaming mode to 'adaptative' and configure the number of MB available. The actual number of divisions is computed automatically by estimating the memory consumption of the pipeline. Tiles will try to match the input file tile scheme. Setting the availableRAM parameter to 0 means that the available RAM is set from the CMake configuration option

Definition at line 170 of file otbImageFileWriter.txx.

template<class TInputImage >
void otb::ImageFileWriter< TInputImage >::SetAutomaticStrippedStreaming ( unsigned int  availableRAM = 0,
double  bias = 1.0 
)

Set the streaming mode to 'stripped' and configure the number of MB available. The actual number of divisions is computed automatically by estimating the memory consumption of the pipeline. Setting the availableRAM parameter to 0 means that the available RAM is set from the CMake configuration option. The bias parameter is a multiplier applied on the estimated memory size of the pipeline and can be used to fine tune the potential gap between estimated memory and actual memory used, which can happen because of composite filters for example

Definition at line 133 of file otbImageFileWriter.txx.

template<class TInputImage >
void otb::ImageFileWriter< TInputImage >::SetAutomaticTiledStreaming ( unsigned int  availableRAM = 0,
double  bias = 1.0 
)

Set the streaming mode to 'tiled' and configure the number of MB available. The actual number of divisions is computed automatically by estimating the memory consumption of the pipeline. Tiles will be square. Setting the availableRAM parameter to 0 means that the available RAM is set from the CMake configuration option The bias parameter is a multiplier applied on the estimated memory size of the pipeline and can be used to fine tune the potential gap between estimated memory and actual memory used, which can happen because of composite filters for example

Definition at line 158 of file otbImageFileWriter.txx.

template<class TInputImage >
void otb::ImageFileWriter< TInputImage >::SetFileName ( const char *  extendedFileName)
virtual

ImageFileWriter Methods

Definition at line 831 of file otbImageFileWriter.txx.

template<class TInputImage >
void otb::ImageFileWriter< TInputImage >::SetFileName ( std::string  extendedFileName)
virtual

ImageFileWriter Methods

Definition at line 823 of file otbImageFileWriter.txx.

template<class TInputImage>
virtual void otb::ImageFileWriter< TInputImage >::SetImageIO ( otb::ImageIOBase _arg)
virtual
template<class TInputImage >
void otb::ImageFileWriter< TInputImage >::SetInput ( const InputImageType input)
virtual

Definition at line 253 of file otbImageFileWriter.txx.

template<class TInputImage >
void otb::ImageFileWriter< TInputImage >::SetIORegion ( const itk::ImageIORegion region)

Specify the region to write. If left NULL, then the whole image is written.

Definition at line 239 of file otbImageFileWriter.txx.

template<class TInputImage >
void otb::ImageFileWriter< TInputImage >::SetNumberOfDivisionsStrippedStreaming ( unsigned int  nbDivisions)

Set the streaming mode to 'stripped' and configure the number of strips which will be used to stream the image

Definition at line 97 of file otbImageFileWriter.txx.

template<class TInputImage >
void otb::ImageFileWriter< TInputImage >::SetNumberOfDivisionsTiledStreaming ( unsigned int  nbDivisions)

Set the streaming mode to 'tiled' and configure the number of tiles which will be used to stream the image

Definition at line 109 of file otbImageFileWriter.txx.

template<class TInputImage >
void otb::ImageFileWriter< TInputImage >::SetNumberOfLinesStrippedStreaming ( unsigned int  nbLinesPerStrip)

Set the streaming mode to 'stripped' and configure the number of strips which will be used to stream the image with respect to a number of line per strip

Definition at line 121 of file otbImageFileWriter.txx.

template<class TInputImage>
void otb::ImageFileWriter< TInputImage >::SetStreamingManager ( StreamingManagerType streamingManager)
inline

Set a user-specified implementation of StreamingManager used to divide the largest possible region in several divisions

Definition at line 109 of file otbImageFileWriter.h.

template<class TInputImage >
void otb::ImageFileWriter< TInputImage >::SetTileDimensionTiledStreaming ( unsigned int  tileDimension)

Set the streaming mode to 'tiled' and configure the dimension of the tiles in pixels for each dimension (square tiles will be generated)

Definition at line 146 of file otbImageFileWriter.txx.

template<class TInputImage>
virtual void otb::ImageFileWriter< TInputImage >::SetUseCompression ( bool  _arg)
virtual

Set the compression On or Off

template<class TInputImage>
virtual void otb::ImageFileWriter< TInputImage >::SetUseInputMetaDataDictionary ( bool  _arg)
virtual

By default the MetaDataDictionary is taken from the input image and passed to the ImageIO. In some cases, however, a user may prefer to introduce her/his own MetaDataDictionary. This is often the case of the ImageSeriesWriter. This flag defined whether the MetaDataDictionary to use will be the one from the input image or the one already set in the ImageIO object.

template<class TInputImage >
void otb::ImageFileWriter< TInputImage >::Update ( void  )
virtual

Override Update() from ProcessObject because this filter has no output.

Update method : update output information of input and write to file

Parse streaming modes

Tell all Observers that the filter is starting

Prepare ImageIO : create ImageFactory

End of Prepare ImageIO : create ImageFactory

Grab the input

Parse region size modes

Determine of number of pieces to divide the input. This will be the minimum of what the user specified via SetNumberOfDivisionsStrippedStreaming() and what the Splitter thinks is a reasonable value.

Control if the ImageIO is CanStreamWrite

Compare the buffered region with the inputRegion which is the largest possible region or a user defined region through extended filename Not sure that if this modification is needed

Loop over the number of pieces, execute the upstream pipeline on each piece, and copy the results into the output image.

Create Image file

If we ended due to aborting, push the progress up to 1.0 (since it probably didn't end there)

Release any inputs if marked for release

Reimplemented from itk::ProcessObject.

Definition at line 277 of file otbImageFileWriter.txx.

References itk::Object::AddObserver(), otb::Utils::ConvertStringToVector(), otb::ImageIOFactory::CreateImageIO(), itk::SmartPointer< TObjectType >::IsNull(), otbMsgDebugMacro, otbMsgDevMacro, otbWarningMacro, itk::Object::RemoveObserver(), itk::DataObjectError::SetDataObject(), itk::ExceptionObject::SetDescription(), itk::ImageIORegion::SetIndex(), itk::ExceptionObject::SetLocation(), itk::ImageIORegion::SetSize(), type, and otb::ImageIOFactory::WriteMode.

template<class TInputImage>
void otb::ImageFileWriter< TInputImage >::UpdateFilterProgress ( )
inlineprivate

Definition at line 234 of file otbImageFileWriter.h.

template<class TInputImage>
virtual void otb::ImageFileWriter< TInputImage >::UseCompressionOff ( )
virtual

Set the compression On or Off

template<class TInputImage>
virtual void otb::ImageFileWriter< TInputImage >::UseCompressionOn ( )
virtual

Set the compression On or Off

template<class TInputImage>
virtual void otb::ImageFileWriter< TInputImage >::UseInputMetaDataDictionaryOff ( )
virtual

By default the MetaDataDictionary is taken from the input image and passed to the ImageIO. In some cases, however, a user may prefer to introduce her/his own MetaDataDictionary. This is often the case of the ImageSeriesWriter. This flag defined whether the MetaDataDictionary to use will be the one from the input image or the one already set in the ImageIO object.

template<class TInputImage>
virtual void otb::ImageFileWriter< TInputImage >::UseInputMetaDataDictionaryOn ( )
virtual

By default the MetaDataDictionary is taken from the input image and passed to the ImageIO. In some cases, however, a user may prefer to introduce her/his own MetaDataDictionary. This is often the case of the ImageSeriesWriter. This flag defined whether the MetaDataDictionary to use will be the one from the input image or the one already set in the ImageIO object.

Member Data Documentation

template<class TInputImage>
const unsigned int otb::ImageFileWriter< TInputImage >::InputImageDimension = InputImageType::ImageDimension
static

Dimension of input image.

Definition at line 94 of file otbImageFileWriter.h.

template<class TInputImage>
std::vector<unsigned int> otb::ImageFileWriter< TInputImage >::m_BandList
private

Mapping between origin components and output components (before any conversion)

Definition at line 271 of file otbImageFileWriter.h.

template<class TInputImage>
unsigned int otb::ImageFileWriter< TInputImage >::m_CurrentDivision
private

Definition at line 240 of file otbImageFileWriter.h.

template<class TInputImage>
float otb::ImageFileWriter< TInputImage >::m_DivisionProgress
private

Definition at line 241 of file otbImageFileWriter.h.

template<class TInputImage>
bool otb::ImageFileWriter< TInputImage >::m_FactorySpecifiedImageIO
private

Definition at line 252 of file otbImageFileWriter.h.

template<class TInputImage>
std::string otb::ImageFileWriter< TInputImage >::m_FileName
private

ImageFileWriter Parameters

Definition at line 244 of file otbImageFileWriter.h.

template<class TInputImage>
FNameHelperType::Pointer otb::ImageFileWriter< TInputImage >::m_FilenameHelper
private

Definition at line 261 of file otbImageFileWriter.h.

template<class TInputImage>
otb::ImageIOBase::Pointer otb::ImageFileWriter< TInputImage >::m_ImageIO
private

Definition at line 246 of file otbImageFileWriter.h.

template<class TInputImage>
unsigned int otb::ImageFileWriter< TInputImage >::m_IOComponents
private

Store the number of components to be exported to the output image This variable can be the number of components in m_ImageIO or the number of components in the m_BandList (if used)

Definition at line 276 of file otbImageFileWriter.h.

template<class TInputImage>
itk::ImageIORegion otb::ImageFileWriter< TInputImage >::m_IORegion
private

Definition at line 250 of file otbImageFileWriter.h.

template<class TInputImage>
bool otb::ImageFileWriter< TInputImage >::m_IsObserving
private

Definition at line 265 of file otbImageFileWriter.h.

template<class TInputImage>
unsigned int otb::ImageFileWriter< TInputImage >::m_NumberOfDivisions
private

Definition at line 239 of file otbImageFileWriter.h.

template<class TInputImage>
unsigned long otb::ImageFileWriter< TInputImage >::m_ObserverID
private

Definition at line 266 of file otbImageFileWriter.h.

template<class TInputImage>
InputIndexType otb::ImageFileWriter< TInputImage >::m_ShiftOutputIndex
private

Definition at line 267 of file otbImageFileWriter.h.

template<class TInputImage>
StreamingManagerPointerType otb::ImageFileWriter< TInputImage >::m_StreamingManager
private

Definition at line 263 of file otbImageFileWriter.h.

template<class TInputImage>
bool otb::ImageFileWriter< TInputImage >::m_UseCompression
private

Definition at line 253 of file otbImageFileWriter.h.

template<class TInputImage>
bool otb::ImageFileWriter< TInputImage >::m_UseInputMetaDataDictionary
private

Definition at line 254 of file otbImageFileWriter.h.

template<class TInputImage>
bool otb::ImageFileWriter< TInputImage >::m_UserSpecifiedImageIO
private

Definition at line 248 of file otbImageFileWriter.h.

template<class TInputImage>
bool otb::ImageFileWriter< TInputImage >::m_UserSpecifiedIORegion
private

Definition at line 251 of file otbImageFileWriter.h.

template<class TInputImage>
bool otb::ImageFileWriter< TInputImage >::m_WriteGeomFile
private

Definition at line 258 of file otbImageFileWriter.h.


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