21 #ifndef otbMultiImageFileWriter_h
22 #define otbMultiImageFileWriter_h
26 #include "itkImageBase.h"
27 #include "itkProcessObject.h"
28 #include "itkImageIOBase.h"
29 #include "OTBImageIOExport.h"
70 void SetNumberOfDivisionsStrippedStreaming(
unsigned int nbDivisions);
74 void SetNumberOfDivisionsTiledStreaming(
unsigned int nbDivisions);
79 void SetNumberOfLinesStrippedStreaming(
unsigned int nbLinesPerStrip);
90 void SetAutomaticStrippedStreaming(
unsigned int availableRAM = 0,
double bias = 1.0);
94 void SetTileDimensionTiledStreaming(
unsigned int tileDimension);
106 void SetAutomaticTiledStreaming(
unsigned int availableRAM = 0,
double bias = 1.0);
114 void SetAutomaticAdaptativeStreaming(
unsigned int availableRAM = 0,
double bias = 1.0);
116 virtual void UpdateOutputData(itk::DataObject* itkNotUsed(output))
override;
128 template <
class TImage>
129 void AddInputImage(
const TImage* inputPtr,
const std::string& fileName);
135 template <
class TWriter>
136 void AddInputWriter(
typename TWriter::Pointer writer);
138 virtual void UpdateOutputInformation()
override;
142 this->UpdateOutputInformation();
143 this->UpdateOutputData(NULL);
153 virtual void GenerateData(
void)
override;
159 virtual void GenerateInputRequestedRegion()
override;
162 virtual void InitializeStreaming();
170 virtual RegionType GetStreamRegion(
int inputIndex);
176 if (
typeid(event) !=
typeid(itk::ProgressEvent))
181 itk::ProcessObject* processObject =
dynamic_cast<itk::ProcessObject*
>(object);
184 m_DivisionProgress = processObject->GetProgress();
187 this->UpdateFilterProgress();
192 this->UpdateProgress((m_DivisionProgress + m_CurrentDivision) / m_NumberOfDivisions);
220 SinkBase(ImageBaseType::ConstPointer inputImage) : m_InputImage(inputImage)
226 virtual ImageBaseType::ConstPointer
GetInput()
const
232 return const_cast<ImageBaseType*
>(m_InputImage.GetPointer());
234 virtual void WriteImageInformation() = 0;
236 virtual bool CanStreamWrite()
const = 0;
240 virtual itk::ImageRegion<2> GetRegionToWrite()
const = 0;
252 template <
class TImage>
259 Sink(
typename TImage::ConstPointer inputImage,
const std::string& filename);
266 void WriteImageInformation()
override;
268 bool CanStreamWrite()
const override;
274 itk::ImageRegion<2> GetRegionToWrite()
const override;
293 #ifndef OTB_MANUAL_INSTANTIATION
297 #endif // otbMultiImageFileWriter_h