22 #ifndef otbImageFileWriter_h
23 #define otbImageFileWriter_h
26 #include "itkProcessObject.h"
29 #include "itkFastMutexLock.h"
31 #include "OTBImageIOExport.h"
65 template <
class TInputImage>
97 itkStaticConstMacro(InputImageDimension,
unsigned int, InputImageType::ImageDimension);
107 return m_StreamingManager;
114 m_StreamingManager = streamingManager;
119 void SetNumberOfDivisionsStrippedStreaming(
unsigned int nbDivisions);
123 void SetNumberOfDivisionsTiledStreaming(
unsigned int nbDivisions);
128 void SetNumberOfLinesStrippedStreaming(
unsigned int nbLinesPerStrip);
139 void SetAutomaticStrippedStreaming(
unsigned int availableRAM = 0,
double bias = 1.0);
143 void SetTileDimensionTiledStreaming(
unsigned int tileDimension);
155 void SetAutomaticTiledStreaming(
unsigned int availableRAM = 0,
double bias = 1.0);
163 void SetAutomaticAdaptativeStreaming(
unsigned int availableRAM = 0,
double bias = 1.0);
166 using Superclass::SetInput;
167 virtual void SetInput(
const InputImageType* input);
170 const InputImageType* GetInput();
174 void Update()
override;
176 virtual void SetFileName(
const std::string& extendedFileName);
178 virtual const char* GetFileName()
const;
182 void SetIORegion(
const itk::ImageIORegion& region);
183 itkGetConstReferenceMacro(IORegion, itk::ImageIORegion);
187 itkSetMacro(UseCompression,
bool);
188 itkGetConstReferenceMacro(UseCompression,
bool);
189 itkBooleanMacro(UseCompression);
198 itkSetMacro(UseInputMetaDataDictionary,
bool);
199 itkGetConstReferenceMacro(UseInputMetaDataDictionary,
bool);
200 itkBooleanMacro(UseInputMetaDataDictionary);
207 itkGetConstObjectMacro(FilenameHelper, FNameHelperType);
210 const bool& GetAbortGenerateData()
const override;
212 void SetAbortGenerateData(
const bool val)
override;
217 void PrintSelf(std::ostream& os, itk::Indent indent)
const override;
220 void GenerateData(
void)
override;
223 void GenerateOutputInformation(
void)
override;
231 if (
typeid(event) !=
typeid(itk::ProgressEvent))
236 itk::ProcessObject* processObject =
dynamic_cast<itk::ProcessObject*
>(object);
239 m_DivisionProgress = processObject->GetProgress();
242 this->UpdateFilterProgress();
247 this->UpdateProgress((m_DivisionProgress + m_CurrentDivision) / m_NumberOfDivisions);
295 #ifndef OTB_MANUAL_INSTANTIATION
308 extern template class OTBImageIO_EXPORT_TEMPLATE ImageFileWriter<Image<unsigned int, 2>>;
309 extern template class OTBImageIO_EXPORT_TEMPLATE ImageFileWriter<Image<int, 2>>;
310 extern template class OTBImageIO_EXPORT_TEMPLATE ImageFileWriter<Image<unsigned char, 2>>;
311 extern template class OTBImageIO_EXPORT_TEMPLATE ImageFileWriter<Image<char, 2>>;
312 extern template class OTBImageIO_EXPORT_TEMPLATE ImageFileWriter<Image<unsigned short, 2>>;
313 extern template class OTBImageIO_EXPORT_TEMPLATE ImageFileWriter<Image<short, 2>>;
314 extern template class OTBImageIO_EXPORT_TEMPLATE ImageFileWriter<Image<float, 2>>;
315 extern template class OTBImageIO_EXPORT_TEMPLATE ImageFileWriter<Image<double, 2>>;
316 extern template class OTBImageIO_EXPORT_TEMPLATE ImageFileWriter<Image<std::complex<int>, 2>>;
317 extern template class OTBImageIO_EXPORT_TEMPLATE ImageFileWriter<Image<std::complex<short>, 2>>;
318 extern template class OTBImageIO_EXPORT_TEMPLATE ImageFileWriter<Image<std::complex<float>, 2>>;
319 extern template class OTBImageIO_EXPORT_TEMPLATE ImageFileWriter<Image<std::complex<double>, 2>>;
320 extern template class OTBImageIO_EXPORT_TEMPLATE ImageFileWriter<VectorImage<unsigned int, 2>>;
321 extern template class OTBImageIO_EXPORT_TEMPLATE ImageFileWriter<VectorImage<int, 2>>;
322 extern template class OTBImageIO_EXPORT_TEMPLATE ImageFileWriter<VectorImage<unsigned char, 2>>;
323 extern template class OTBImageIO_EXPORT_TEMPLATE ImageFileWriter<VectorImage<char, 2>>;
324 extern template class OTBImageIO_EXPORT_TEMPLATE ImageFileWriter<VectorImage<unsigned short, 2>>;
325 extern template class OTBImageIO_EXPORT_TEMPLATE ImageFileWriter<VectorImage<short, 2>>;
326 extern template class OTBImageIO_EXPORT_TEMPLATE ImageFileWriter<VectorImage<float, 2>>;
327 extern template class OTBImageIO_EXPORT_TEMPLATE ImageFileWriter<VectorImage<double, 2>>;
328 extern template class OTBImageIO_EXPORT_TEMPLATE ImageFileWriter<VectorImage<std::complex<int>, 2>>;
329 extern template class OTBImageIO_EXPORT_TEMPLATE ImageFileWriter<VectorImage<std::complex<short>, 2>>;
330 extern template class OTBImageIO_EXPORT_TEMPLATE ImageFileWriter<VectorImage<std::complex<float>, 2>>;
331 extern template class OTBImageIO_EXPORT_TEMPLATE ImageFileWriter<VectorImage<std::complex<double>, 2>>;