Disabling streaming at application level
TL;DR:
1-
writer->SetNumberOfDivisionsTiledStreaming(0);
gives improper results
2- We need a way to disable streaming at application level
Rationale
app->SetStreamingType(StreamingType::none);
Request for Enhancement: I've a FFTW filter on a complex image that needs to work on the whole image. When integrated in an OTB application, the application shall not stream the image.
While we can require the application to disable streaming through extended filenames (e.g. "-out dest.tif?&streaming:type=none
"), this is not something we can request at application level. We cannot expect the end-user to know the application internally uses a filter that is incompatible with streaming.
We should be able to control the streaming type at application level.
What I don't know then, is the consequence on Python bindings. That's why I don't propose a merge request.
Note: I've tried
rmFilter->Update(); // work around streamer to compute FFTW results
SetParameterComplexOutputImage("out", rmFilter->GetOutput());
but instead of 10s, the application runs in 50s.
SetNumberOfDivisionsTiledStreaming(0)
Bug in I'm not sure why, but on my 2576 x 1690 complex image, SetNumberOfDivisionsTiledStreaming(0)
misbehaves.
(INFO): Default RAM limit for OTB is 128 MB
(INFO): GDAL maximum cache size is 12847 MB
(INFO): OTB will use at most 4 threads
(INFO): Loading kwl metadata from attached geom file ${DATA}/Input/point_target_SWOT/l0_PT_master_pr_ds_rgcpr.geom
(DEBUG): file ${OTB}/include/OTB-6.7/otbNumberOfDivisionsTiledStreamingManager.hxx, line 46, Activating NumberOfDivisionsTiledStreamingManager streaming mode
WARNING: In ${OTB}include/OTB-6.7/otbNumberOfDivisionsTiledStreamingManager.hxx, line 49
NumberOfDivisionsTiledStreamingManager (0x1fa5e90): NumberOfDivisions set to 0 : streaming disabled
(DEBUG): file ${OTB}/include/OTB-6.7/otbImageRegionSquareTileSplitter.hxx, line 57, Tile dimension : 2096
(DEBUG): file ${OTB}/include/OTB-6.7/otbImageRegionSquareTileSplitter.hxx, line 58, Number of splits per dimension : 2 1
(DEBUG): file ${OTB}/include/OTB-6.7/otbNumberOfDivisionsTiledStreamingManager.hxx, line 55, Computed number of split : 2
(INFO): File ${BUILD}/release/Testing/Temporary/FFTWTest.tif will be written in 2 blocks of 2096x1690 pixels
(DEBUG): GDAL reads [0, 2095]x[0, 1689] x 1 bands of type CFloat64 from file ${DATA}/Input/point_target_SWOT/l0_PT_master_pr_ds_rgcpr.tif
As you can see, two tiles are found, with an incorrect dimension moreover. I'm not sure why.
If instead I use SetNumberOfDivisionsStrippedStreaming(1);
, everything works fine.
What I suggest: have ?&streaming:type=none
trigger the execution of SetNumberOfDivisionsStrippedStreaming(1);
instead of SetNumberOfDivisionsTiledStreaming(0)
.