ENH: add 3d image support to StreamingManager and PipelineMemoryPrintCalculator
This Merge Request was open on GitHub and manually imported to GitLab.
Add nD image support to
otbStreamingManager and 3D image support to
StreamingManager class defines a small, i.e. 100 pixel, region around the image centre that is used to estimate the memory footprint of the processing pipeline. The current implementation only explicitly sets the index for dimensions
1 respectively. Since the index value assignment does not account for the actual number of dimensions of the image, a
1D image would produce a segmentation fault when the value of
index is assigned.
The PipelineMemoryPrintCalculator currently only supports 2D images. The number of image dimensions is currently hard coded in ::EvaluateDataObjectPrint in macro OTB_IMAGE_SIZE_BLOCK.
- The assignment of index and size values of the test region is done considering the actual number of image dimensions.
smallRegion.Crop(region)is removed because it is superfluous with the new implementation.
- I added a set of image memory print calculation statements for 3-dimensional images to the
- Note: This revision will be performance neutral for 2D images but enables use of this class for 3D images. A future improvement of this class would be to template it over the image type to enable nD support.
The copyright owner is Manaaki Whenua - Landcare Research (MWLR). MWLR has signed the ORFEO ToolBox Contributor License Agreement.
Check before merging:
- All discussions are resolved
- At least 2
👍votes from core developers, no 👎vote.
- The feature branch is (reasonably) up-to-date with the base branch
- Dashboard is green
- Copyright owner has signed the ORFEO ToolBox Contributor License Agreement
- Optionally, run
git diff develop... -U0 --no-color | clang-format-diff.py -p1 -ion latest changes and commit