This branch contains a Multi-writer class, designed to writer several files in a synchronized way.
The multi-writer has been developed for Sentinel2 processing chains, and has been revamped to a more generic version. There is also a feature request about a synchronized writer (#1532 (closed)).
Classes and files
M Modules/Core/Streaming/include/otbStreamingManager.h M Modules/Core/Streaming/include/otbStreamingManager.txx
Allow to access the splitter base type.
M Modules/IO/ImageIO/include/otbImageFileWriter.h M Modules/IO/ImageIO/include/otbImageFileWriter.txx
The writing of output information in the image has been moved to the
A Modules/IO/ImageIO/include/otbMultiImageFileWriter.h A Modules/IO/ImageIO/include/otbMultiImageFileWriter.txx M Modules/IO/ImageIO/src/CMakeLists.txt A Modules/IO/ImageIO/src/otbMultiImageFileWriter.cxx
MultiImageFileWriter is not a templated class, but it relies on internal template class
This writer will stream a list of input images and write the chunks for each output file. Each input image is divided into the same number of streams, and the processing is synchronized:
- The pipeline computes the chunk n°
ifor each output image.
- Then the MultiWriter writes to disk the chunk n°
ifor each output image
- The pipeline compute the chunk n°
Note that there is no constraint on inputs having the same size.
The last changes are not required, but they prepare the way for the integration of
M Modules/MPI/MPIVrtWriter/include/otbMPIVrtWriter.h A Modules/MPI/MPIVrtWriter/include/otbMPIVrtWriter.txx M Modules/MPI/MPIVrtWriter/otb-module.cmake
The function using MPI to write an image as several TIF and a VRT file has been moved into a standard filter, so that we have a
ProcessObject to call
M Modules/Wrappers/ApplicationEngine/include/otbWrapperOutputImageParameter.h M Modules/Wrappers/ApplicationEngine/src/otbWrapperOutputImageParameter.cxx
The implementation of the output image parameter has been simplified. It will now prepare the caster and writer during
InitializeWriters(), and you can trigger the pipeline later using
Write(). Note that with this mini refactoring, even
the MPI writers (SPTW and VRT) can be retrieved by
GetWriter(), enabling progress monitoring (which was not the case before)
Due to the previous change on
InitializeWriters() has to be called after setting the default RAM.
M Modules/IO/ImageIO/test/CMakeLists.txt M Modules/IO/ImageIO/test/otbImageIOTestDriver.cxx A Modules/IO/ImageIO/test/otbMultiImageFileWriterTest.cxx
New test for the MultiImageFileWriter.