OTB
9.0.0
Orfeo Toolbox
|
#include <otbMultiImageFileWriter.h>
Classes | |
class | Sink |
class | SinkBase |
Public Types | |
typedef itk::SmartPointer< const Self > | ConstPointer |
typedef itk::ImageBase< 2 > | ImageBaseType |
typedef ImageBaseType::IndexType | IndexType |
typedef ImageBaseType::IndexValueType | IndexValueType |
typedef itk::SmartPointer< Self > | Pointer |
typedef ImageBaseType::RegionType | RegionType |
typedef MultiImageFileWriter | Self |
typedef ImageBaseType::SizeType | SizeType |
typedef ImageBaseType::SizeValueType | SizeValueType |
typedef itk::ProcessObject | Superclass |
Public Member Functions | |
template<class TImage > | |
void | AddInputImage (const TImage *inputPtr, const std::string &fileName) |
template<class TWriter > | |
void | AddInputWriter (typename TWriter::Pointer writer) |
virtual ::itk::LightObject::Pointer | CreateAnother (void) const |
virtual const char * | GetNameOfClass () const |
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) |
void | SetNumberOfDivisionsStrippedStreaming (unsigned int nbDivisions) |
void | SetNumberOfDivisionsTiledStreaming (unsigned int nbDivisions) |
void | SetNumberOfLinesStrippedStreaming (unsigned int nbLinesPerStrip) |
void | SetTileDimensionTiledStreaming (unsigned int tileDimension) |
virtual void | Update () override |
virtual void | UpdateOutputData (itk::DataObject *) override |
virtual void | UpdateOutputInformation () override |
Static Public Member Functions | |
static Pointer | New () |
Protected Member Functions | |
virtual void | GenerateData (void) override |
virtual void | GenerateInputRequestedRegion () override |
virtual RegionType | GetStreamRegion (int inputIndex) |
virtual void | InitializeStreaming () |
MultiImageFileWriter () | |
void | ObserveSourceFilterProgress (itk::Object *object, const itk::EventObject &event) |
void | operator= (const MultiImageFileWriter &)=delete |
void | ResetAllRequestedRegions (ImageBaseType *imagePtr) |
void | UpdateFilterProgress () |
virtual | ~MultiImageFileWriter () |
Private Types | |
typedef otb::Image< unsigned char, 2 > | FakeOutputType |
typedef std::vector< std::shared_ptr< SinkBase > > | SinkListType |
typedef StreamingManager< FakeOutputType > | StreamingManagerType |
Private Attributes | |
unsigned int | m_CurrentDivision |
float | m_DivisionProgress |
bool | m_IsObserving |
unsigned int | m_NumberOfDivisions |
unsigned long | m_ObserverID |
SinkListType | m_SinkList |
StreamingManagerType::Pointer | m_StreamingManager |
std::vector< RegionType > | m_StreamRegionList |
Streams a pipeline with multiple outputs. It writes each output to a file. Inputs are connected to the writer using the AddInputImage method. The type of streaming can be chosen. Each output may have a different size. When the user gives a number of lines per strip or a tile size, the value is interpreted on the first input to deduce the number of streams. This number of streams is then used to split the other inputs.
Definition at line 47 of file otbMultiImageFileWriter.h.
typedef itk::SmartPointer<const Self> otb::MultiImageFileWriter::ConstPointer |
Definition at line 54 of file otbMultiImageFileWriter.h.
|
private |
Definition at line 196 of file otbMultiImageFileWriter.h.
typedef itk::ImageBase<2> otb::MultiImageFileWriter::ImageBaseType |
Public typedefs
Definition at line 58 of file otbMultiImageFileWriter.h.
typedef ImageBaseType::IndexType otb::MultiImageFileWriter::IndexType |
Definition at line 63 of file otbMultiImageFileWriter.h.
typedef ImageBaseType::IndexValueType otb::MultiImageFileWriter::IndexValueType |
Definition at line 64 of file otbMultiImageFileWriter.h.
typedef itk::SmartPointer<Self> otb::MultiImageFileWriter::Pointer |
Definition at line 53 of file otbMultiImageFileWriter.h.
typedef ImageBaseType::RegionType otb::MultiImageFileWriter::RegionType |
Definition at line 62 of file otbMultiImageFileWriter.h.
Standard class typedefs.
Definition at line 51 of file otbMultiImageFileWriter.h.
|
private |
The list of inputs and their associated parameters, built using AddInput
Definition at line 285 of file otbMultiImageFileWriter.h.
typedef ImageBaseType::SizeType otb::MultiImageFileWriter::SizeType |
Definition at line 65 of file otbMultiImageFileWriter.h.
typedef ImageBaseType::SizeValueType otb::MultiImageFileWriter::SizeValueType |
Definition at line 66 of file otbMultiImageFileWriter.h.
Definition at line 197 of file otbMultiImageFileWriter.h.
typedef itk::ProcessObject otb::MultiImageFileWriter::Superclass |
Definition at line 52 of file otbMultiImageFileWriter.h.
|
protected |
|
inlineprotectedvirtual |
Definition at line 148 of file otbMultiImageFileWriter.h.
void otb::MultiImageFileWriter::AddInputImage | ( | const TImage * | inputPtr, |
const std::string & | fileName | ||
) |
Connect a new input to the multi-writer. Only the input pointer is required. If the filename list is empty, streaming will occur without writing. If the filename list contains more than one element, then the output will be divided into this number of granule files. The resolution factor specifies the ratio between the height of this image and the height of a reference image. The number of lines per strip class parameter will be modified according to this factor, so that images with different resolutions can be streamed together. For example, use 1.0 for a 10m pixels image, 0.5 for a 20m pixels image, and specify the number of lines per strip according to the 10m pixels image. You may specify top and bottom margins that will be removed from the input image, according to its largest possible region.
Definition at line 240 of file otbMultiImageFileWriter.hxx.
References m_SinkList.
void otb::MultiImageFileWriter::AddInputWriter | ( | typename TWriter::Pointer | writer | ) |
Add a new ImageFileWriter to the multi-writer. This is an alternative method when you already have an instantiated writer.
Parse streaming modes
Definition at line 108 of file otbMultiImageFileWriter.hxx.
References m_SinkList, m_StreamingManager, otbLogMacro, SetAutomaticAdaptativeStreaming(), SetAutomaticStrippedStreaming(), SetAutomaticTiledStreaming(), SetNumberOfDivisionsStrippedStreaming(), SetNumberOfDivisionsTiledStreaming(), SetNumberOfLinesStrippedStreaming(), and SetTileDimensionTiledStreaming().
virtual::itk::LightObject::Pointer otb::MultiImageFileWriter::CreateAnother | ( | void | ) | const |
|
overrideprotectedvirtual |
GenerateData calls the Write method for each connected input
|
overrideprotectedvirtual |
GenerateInputRequestedRegion can predict approximate input regions based on the requested region of the fake output. Only useful for pipeline memory print estimation
|
virtual |
|
protectedvirtual |
Returns the current stream region of the given input
|
protectedvirtual |
Computes the number of divisions
|
static |
|
inlineprotected |
Definition at line 174 of file otbMultiImageFileWriter.h.
|
protecteddelete |
|
protected |
Goes up the pipeline starting at imagePtr, resetting all requested regions to a null region. This may be useful when mixing inputs of different resolutions.
void otb::MultiImageFileWriter::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
Referenced by AddInputWriter().
void otb::MultiImageFileWriter::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
Referenced by AddInputWriter().
void otb::MultiImageFileWriter::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
Referenced by AddInputWriter().
void otb::MultiImageFileWriter::SetNumberOfDivisionsStrippedStreaming | ( | unsigned int | nbDivisions | ) |
Set the streaming mode to 'stripped' and configure the number of strips which will be used to stream the image
Referenced by AddInputWriter().
void otb::MultiImageFileWriter::SetNumberOfDivisionsTiledStreaming | ( | unsigned int | nbDivisions | ) |
Set the streaming mode to 'tiled' and configure the number of tiles which will be used to stream the image
Referenced by AddInputWriter().
void otb::MultiImageFileWriter::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
Referenced by AddInputWriter().
void otb::MultiImageFileWriter::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)
Referenced by AddInputWriter().
|
inlineoverridevirtual |
Definition at line 140 of file otbMultiImageFileWriter.h.
|
inlineprotected |
Definition at line 190 of file otbMultiImageFileWriter.h.
|
overridevirtual |
|
overridevirtual |
|
private |
Definition at line 203 of file otbMultiImageFileWriter.h.
|
private |
Definition at line 204 of file otbMultiImageFileWriter.h.
|
private |
Definition at line 206 of file otbMultiImageFileWriter.h.
|
private |
Definition at line 202 of file otbMultiImageFileWriter.h.
|
private |
Definition at line 207 of file otbMultiImageFileWriter.h.
|
private |
Definition at line 286 of file otbMultiImageFileWriter.h.
Referenced by AddInputImage(), and AddInputWriter().
|
private |
Streaming manager used for the N inputs
Definition at line 199 of file otbMultiImageFileWriter.h.
Referenced by AddInputWriter().
|
private |
Definition at line 288 of file otbMultiImageFileWriter.h.