otb issueshttps://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/issues2024-03-27T16:19:19Zhttps://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/issues/1798Handle no data in BandMath and BandMathX2024-03-27T16:19:19ZVictor PoughonHandle no data in BandMath and BandMathXRequested by multiple users: #1511, #1801, otb-users
Better handling of images with no-data in BandMath and BandMathX:
* A flag to ignore no-data values (maybe even on by default?)
* A nodata token available in the expression that is s...Requested by multiple users: #1511, #1801, otb-users
Better handling of images with no-data in BandMath and BandMathX:
* A flag to ignore no-data values (maybe even on by default?)
* A nodata token available in the expression that is set to the nodata value reported by gdal
* support `nan()` function in BandMathX #1801https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/issues/1754GDAL VSI support2024-03-27T14:47:33ZLaurențiu NicolaGDAL VSI supportI've recently heard someone insist that OTB is a bad framework and isn't "cloud-ready" because it doesn't support the "technologies of the future", like object storage. The thing is, GDAL does support cURL, Amazon S3 and other storage dr...I've recently heard someone insist that OTB is a bad framework and isn't "cloud-ready" because it doesn't support the "technologies of the future", like object storage. The thing is, GDAL does support cURL, Amazon S3 and other storage drivers. Unfortunately, OTB doesn't seem to.
I tried a couple of tests:
```
$ CURL_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt otbcli_ReadImageInfo -in "http://download.osgeo.org/geotiff/samples/gdal_eg/cea.tif?skipgeom=true"
2018-10-24 13:26:34 (INFO): Default RAM limit for OTB is 128 MB
2018-10-24 13:26:34 (INFO): GDAL maximum cache size is 393 MB
2018-10-24 13:26:34 (INFO): OTB will use at most 4 threads
2018-10-24 13:26:35 (INFO):
Image general information:
Number of bands : 3
No data flags : Not found
Start index : [0,0]
Size : [65536,65536]
Origin : [0.5,0.5]
Spacing : [1,1]
Estimated ground spacing (in meters): [547.072,296.427]
Image acquisition information:
Sensor :
Image identification number:
Image default RGB composition:
[R, G, B] = [0,1,2]
Ground control points information:
Number of GCPs = 0
GCPs projection =
Output parameters value:
indexx: 0
indexy: 0
sizex: 65536
sizey: 65536
spacingx: 1
spacingy: 1
originx: 0.5
originy: 0.5
estimatedgroundspacingx: 547.0715332
estimatedgroundspacingy: 296.4269409
numberbands: 3
sensor:
id:
time:
town:
country:
rgb.r: 0
rgb.g: 1
rgb.b: 2
projectionref:
keyword:
gcp.count: 0
gcp.proj:
gcp.ids:
gcp.info:
gcp.imcoord:
gcp.geocoord
$ CURL_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt gdalinfo http://download.osgeo.org/geotiff/samples/gdal_eg/cea.tif
Driver: GTiff/GeoTIFF
Files: none associated
Size is 514, 515
Coordinate System is:
PROJCS["unnamed",
GEOGCS["NAD27",
DATUM["North_American_Datum_1927",
SPHEROID["Clarke 1866",6378206.4,294.9786982138982,
AUTHORITY["EPSG","7008"]],
AUTHORITY["EPSG","6267"]],
PRIMEM["Greenwich",0],
UNIT["degree",0.0174532925199433],
AUTHORITY["EPSG","4267"]],
PROJECTION["Cylindrical_Equal_Area"],
PARAMETER["standard_parallel_1",33.75],
PARAMETER["central_meridian",-117.333333333333],
PARAMETER["false_easting",0],
PARAMETER["false_northing",0],
UNIT["metre",1,
AUTHORITY["EPSG","9001"]]]
Origin = (-28493.166784412522247,4255884.543802191503346)
Pixel Size = (60.022136983193739,-60.022136983193739)
Metadata:
AREA_OR_POINT=Area
Image Structure Metadata:
INTERLEAVE=BAND
Corner Coordinates:
Upper Left ( -28493.167, 4255884.544) (117d38'27.05"W, 33d56'37.74"N)
Lower Left ( -28493.167, 4224973.143) (117d38'27.05"W, 33d39'53.81"N)
Upper Right ( 2358.212, 4255884.544) (117d18'28.38"W, 33d56'37.74"N)
Lower Right ( 2358.212, 4224973.143) (117d18'28.38"W, 33d39'53.81"N)
Center ( -13067.478, 4240428.844) (117d28'27.71"W, 33d48'15.38"N)
Band 1 Block=514x15 Type=Byte, ColorInterp=Gray
```
Notice that OTB reports wrong origin, ground spacing and size values.
```
$ CURL_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt strace -s2048 -e trace=file -f otbcli_ReadImageInfo -in "http://download.osgeo.org/geotiff/samples/gdal_eg/cea.tif"
[snip]
[pid 6069] access("http://download.osgeo.org/geotiff/samples/gdal_eg/cea.geom", R_OK) = -1 ENOENT (No such file or directory)
[pid 6069] getcwd("/home/user", 4096) = 16
[pid 6069] lstat("/home/user/http:", 0x7ffed725d380) = -1 ENOENT (No such file or directory)
[pid 6069] access("http://download.osgeo.org/geotiff/samples/gdal_eg/cea.TIL", F_OK) = -1 ENOENT (No such file or directory)
[pid 6069] access("http://download.osgeo.org/geotiff/samples/gdal_eg/cea.til", F_OK) = -1 ENOENT (No such file or directory)
[pid 6069] openat(AT_FDCWD, "http://download.osgeo.org/geotiff/samples/gdal_eg/cea.tif", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid 6069] access("http://download.osgeo.org/geotiff/samples/gdal_eg/cea.tif", F_OK) = -1 ENOENT (No such file or directory)
[pid 6069] openat(AT_FDCWD, "http://download.osgeo.org/geotiff/samples/gdal_eg/cea.tif", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid 6069] stat("http://download.osgeo.org/geotiff/samples/gdal_eg/cea.tif", 0x7ffed725dc50) = -1 ENOENT (No such file or directory)
[pid 6069] readlink("http://download.osgeo.org/geotiff/samples/gdal_eg/cea.tif", 0x245a730, 2048) = -1 ENOENT (No such file or directory)
2018-10-24 13:26:57 (INFO): No kwl metadata found in file http://download.osgeo.org/geotiff/samples/gdal_eg/cea.tif
```
OTB tries to open HTTP URLs as files.
```
$ CURL_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt strace -s2048 -f otbcli_ComputeImagesStatistics -il "http://download.osgeo.org/geotiff/samples/gdal_eg/cea.tif?skipgeom=true"
[snip]
[pid 6110] sendto(4, "GET /geotiff/samples/gdal_eg/cea.tifqqqqqqrr HTTP/1.1\r\nHost: download.osgeo.org\r\nAccept: */*\r\n\r\n", 96, MSG_NOSIGNAL, NULL, 0) = 96
```
OTB gets into an infinite loop trying to request the wrong URL (notice the `qqqqqqrr` suffix).
```
CURL_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt strace -s2048 -f otbcli_Convert -in "http://download.osgeo.org/geotiff/samples/gdal_eg/cea.tif?skipgeom=true" -out foo.tif
[snip]
[pid 6171] sendto(4, "GET /geotiff/samples/gdal_eg/cea.tifqqqqqqqq HTTP/1.1\r\nHost: download.osgeo.org\r\nAccept: */*\r\n\r\n", 96, MSG_NOSIGNAL, NULL, 0) = 96
```
Same issue, different suffix. Uninitialized memory?
Of course, I expect performance to be pretty poor when doing network access, but sometimes it's useful, and the alternative is to use a FUSE emulation driver that might have its own problems.
Related: #1746
Related: #1506
Related: #1642https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/issues/1817Huge Memory-leaks when in-memory chaining OTB-applications from Python2024-03-26T14:52:03ZStéphane AlbertHuge Memory-leaks when in-memory chaining OTB-applications from Python### Description
Huge memory consumption when in-memory chaining OTB-Applications within loop from _Python_ code.
### Steps to reproduce
There are two processing pipelines defined by chaining OTB-applications in memory from _Python_ co...### Description
Huge memory consumption when in-memory chaining OTB-Applications within loop from _Python_ code.
### Steps to reproduce
There are two processing pipelines defined by chaining OTB-applications in memory from _Python_ code:
1. create_water_mask:
```mermaid
graph TD;
PAN-->ExtractROI_PAN;
XS-->ExtractROI_XS;
ExtractROI_PAN-->SuperImpose;
ExtractROI_XS-->WaterMaskMaker;
WaterMaskMaker-->SuperImpose;
```
2. create_color_image:
```mermaid
graph TD;
PAN-->ExtractROI_PAN;
XS-->ExtractROI_XS;
ExtractROI_PAN-->BundleToPerfectSensor;
ExtractROI_XS-->BundleToPerfectSensor;
BundleToPerfectSensor-->Convert;
```
A main processing function runs alternatively those two pipeline on a set of (PAN ; XS) 2-uplets in a (Python) loop (see [test_wwm_cim.py](/uploads/73d2c9bc174f7d53cb5b4ed431fe7ae0/test_wwm_cim.py))
Memory-leak instrumentation done with [vg-mem.sh](/uploads/fb31fe9ded1f9868cd832a8132fc7961/vg-mem.sh).
#### Instrumentation of the `WaterMaskMaker` C++ OTB-Application
Command: `vg-mem.sh ./bin/otbApplicationLauncherCommandLine WaterMaskMaker -progress true -in /home/salbert/data/bench-2/QB_TLSE_MUL_512x512_1024x1024.TIF -out /home/salbert/tmp/QB_TLSE_WMM.tif`
Valgrind log: \[otbApplicationLauncherCommandLine-20181213-105906.log\](/uploads/7beb36ede3bca565a38fd58dc6d19c18/otbApplicationLauncherCommandLine-20181213-105906.log
Small memory-leaks in _OSSIM_ projection and _RTTI_ systems. Same for TIF and JP2000
#### Instrumentation of the `BundleToPerfectSensor` OTB-Application
Command: `vg-mem.sh ./bin/otbApplicationLauncherCommandLine BundleToPerfectSensor -progress true -inp /home/salbert/data/bench-2/PRIMARY_BUNDLE_P_1024x1024.tif -inxs /home/salbert/data/bench-2/PRIMARY_BUNDLE_MUL_1024x1024.tif -out /home/salbert/tmp/PRIMARY_BUNDLE_BTPS.tif uint16`
Valgrind log: [otbApplicationLauncherCommandLine-20181220-130819.log](/uploads/19f7dfbdda614771744711de8a1c0028/otbApplicationLauncherCommandLine-20181220-130819.log)
L924, L910: Memory-leaks in pipeline `::UpdateOutputInformation()` from https://github.com/InsightSoftwareConsortium/ITK/blob/v4.12.2/Modules/Core/Common/include/itkImportImageContainer.hxx#L188
L896: Also inquire about leak of process-object instance of https://github.com/InsightSoftwareConsortium/ITK/blob/v4.12.2/Modules/Core/Common/include/itkInPlaceImageFilter.hxx#L38.
#### Instrumentation of _SWIG_ OTB-Application wrapper
_SWIG_ wrapper of OTB-applications have been instrumented using the [otb-app-swig-mem-log.patch](/uploads/2f8c6b39793aadb2e3b2f35c4612b3b1/otb-app-swig-mem-log.patch) trace patch and all instances of OTB-Applications (be they composite or not) have been manually counted).
Command: `vg-mem.sh ./test_OTB_application.py` (see [test_OTB_application.py](/uploads/d578087dea8c209fb841166256a0c50e/test_OTB_application.py))
Valgrind log: [test_OTB_application_memory.py-20181214-113339.log](/uploads/becd9109e348354e8001c583a47df1c8/test_OTB_application_memory.py-20181214-113339.log)
Command: `vg-mem.sh ./test_OTB_application_memory_JP2.py` ([test_OTB_application_memory_JP2.py](/uploads/e5003321db00cb3091ed9320c04621af/test_OTB_application_memory_JP2.py))
Valgrind log: [test_OTB_application_memory_JP2.py-20181217-104219.log](/uploads/6bc5de2ae3275759af70c798b17703ae/test_OTB_application_memory_JP2.py-20181217-104219.log)
There's no memory leak due to incorrect reference-counting of the SWIG wrapper. However:
1. the reference-counter wrapper implementation \[[1](https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/blob/release-6.6/Modules/Wrappers/SWIG/src/Python.i#L45)\] is out of date and could be replaced by direct _SWIG_ 3 handling \[[2](http://www.swig.org/Doc3.0/SWIGPlus.html#SWIGPlus_smart_pointers)\]
2. `ImageBaseType` (which is a reference-counted instance) is not wrapped, but OTB-Application wrapper provides a `::GetParameterImage()` returning a C++ raw-pointer without reference-counting handling, which may cause some memory leaks (see next section about ) in the _Python_ environment, e.g.:
```python
def main( self ):
app = ...
img = app.GetParameterImage( ... ) # img is not reference-counted
# If not giving img to a wrapped C++ function putting it into an itk::SmartPointer<> will cause a memory-leak which of all image-data.
```
#### Instrumentation of full _Python_ sample code
Same memory-leaks as described above are traces. Moreover, the metadata-dictionary is lost when running multiple-times this instrumentation test without deleting the temporary output file.
Command: `vg-mem.sh ./test_wmm_cim.py` (2 iterations without removing `${HOME}/tmp` files)
Valgrind log: [test_wwm_cim.py-20181219-161831.log](/uploads/f4322d42a25e01cfdd71a26c99ded4f7/test_wwm_cim.py-20181219-161831.log) (see also: [test_wwm_cim.py-20181217-174610.log](/uploads/ff1b413d2c2ca2efcf96937f2dd5d90c/test_wwm_cim.py-20181217-174610.log) L3666 which is related to a suspicious call to `::GetParameterImage()` from `otb::ImageFileReader<>` when initializing pipeline on existing output-data file.)
### Configuration information
OTB-6.6 release and ITK-4.12 on Ubuntu 18.04 LTS.https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/issues/2383Package module as "IMPORTED" cmake targets2024-03-25T14:43:17ZTristan LaurentPackage module as "IMPORTED" cmake targetsThe current cmake targets of OTB are packaged in Core. This is a problem if we want to separate OTB module.
Some modules depends of other OTB modules, thus when we want to build them, we need OTB Core and the package of these modules in...The current cmake targets of OTB are packaged in Core. This is a problem if we want to separate OTB module.
Some modules depends of other OTB modules, thus when we want to build them, we need OTB Core and the package of these modules installed. But if OTB Core is build without any OTBGroup, the cmake targets of theses dependencies are not declared.
One solution could be to create an OTB Core package with options -DOTBGroup corresponding to dependencies, but it lead to one specific OTB build per module. This is not a durable solution as it complexify CI, increase build time, is source of errors etc...
CMake propose a solution: IMPORTED_TARGETS: https://cmake.org/cmake/help/latest/guide/importing-exporting/index.html .
This can help to have cmake target of each package/module in the module package itself instead of Core package.10.0.0Tristan LaurentTristan Laurenthttps://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/issues/2365QGIS Plugin being removed from core2024-03-25T13:21:26ZJulien CabiecesQGIS Plugin being removed from core### Remove OTB QGIS Plugin from core
#### High level description
OTB provider plugin is currently being part of the QGIS core, and some [discussions](https://lists.osgeo.org/pipermail/qgis-developer/2023-November/066221.html) has been ...### Remove OTB QGIS Plugin from core
#### High level description
OTB provider plugin is currently being part of the QGIS core, and some [discussions](https://lists.osgeo.org/pipermail/qgis-developer/2023-November/066221.html) has been raised to remove it so it becomes a fully 3rd party plugin, maintained by the OTB community.
I have both contributed to QGIS and OTB and I'm in favor of this proposal.
#### Risks and benefits
I think it would ease development of the plugin and would lower the pain of managing compatibility between QGIS and OTB.
#### Alternatives for implementations
That would require to move the OTB QGIS Plugin to the [QGIS Plugin platform](https://plugins.qgis.org/) or even embed it in the OTB installer.
### Who will be developing the proposed changes?
At the moment, no one is clearly identified to make the modifications.
OTB is a great tool and we would like to see it still integrated into QGIS.
If you have any questions or concerns, please let us know.
CC @ytanguyhttps://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/issues/2384SuperBuild LibKML URL is out of date2024-03-21T11:29:08ZLaurențiu NicolaSuperBuild LibKML URL is out of dateIt's https://deb.debian.org/debian/pool/main/libk/libkml/libkml_1.3.0~r864+dfsg.orig.tar.gz, but should be http://deb.debian.org/debian/pool/main/libk/libkml/libkml_1.3.0.orig.tar.gz or something like that.It's https://deb.debian.org/debian/pool/main/libk/libkml/libkml_1.3.0~r864+dfsg.orig.tar.gz, but should be http://deb.debian.org/debian/pool/main/libk/libkml/libkml_1.3.0.orig.tar.gz or something like that.https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/issues/2380Separate Miscellaneous in separate repository2024-03-20T15:59:44ZTristan LaurentSeparate Miscellaneous in separate repositoryTo compilate project, we can use OTB modules https://www.orfeo-toolbox.org/CookBook-9.0/RemoteModules.html
- [x] Create external git repo, link it as a submodule
- [x] OTB core must download corresponding submodule if the cmake -DOTBGrou...To compilate project, we can use OTB modules https://www.orfeo-toolbox.org/CookBook-9.0/RemoteModules.html
- [x] Create external git repo, link it as a submodule
- [x] OTB core must download corresponding submodule if the cmake -DOTBGroup_Miscellaneous is turned on
- [x] Compile it separately, you may use OTB core artifact
- [x] Verify that package is correctly built during cpack
- [ ] Adapt CI to run corresponding build job and tests
- [ ] Adapt otb CI to start module job when there is a new dependency (i.e. OTB core)
- [ ] Adapt bug tracking for each project ?
- [ ] Add a Readme with compilation help, otb integration, and some exemples10.0.0Tristan LaurentTristan Laurenthttps://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/issues/2381PLEIADES Orthorectification failed since version 82024-03-20T14:24:20ZdemagistPLEIADES Orthorectification failed since version 8### Description
Since release 8 of OTB I am not able anymore to apply Orthorectification on a Pleiades image I use during a lesson.
The same command line works fine with version 7.4.2 and fails since versions 8.
### Steps to reproduce
...### Description
Since release 8 of OTB I am not able anymore to apply Orthorectification on a Pleiades image I use during a lesson.
The same command line works fine with version 7.4.2 and fails since versions 8.
### Steps to reproduce
The following command produce a good result with release 7.4.2 (linux or windows) :
otbcli_OrthoRectification -io.in "./IMG_PHR1B_MS_004/IMG_PHR1B_MS_201807291333495_SEN_3210573101-004_R1C1.TIF?&skipcarto=true" -map utm -map.utm.zone 23 -interpolator nn -opt.ram 1024 -opt.gridspacing 4 -elev.dem ./SRTM1 -io.out ./test_ORTHO+DEM.tif
Since release 8, it does not work anymore.
I tested the latest 9.0.0 release using a docker image :
docker run -it -v .:/Data orfeotoolbox/otb:9.0.0 otbcli_OrthoRectification -io.in "/Data/IMG_PHR1B_MS_004/DIM_PHR1B_MS_201807291333495_SEN_3210573101-004.XML?&skipcarto=true" -map utm -map.utm.zone 23 -interpolator nn -opt.ram 1024 -opt.gridspacing 4 -elev.dem /Data/SRTM1 -io.out /Data/test_ORTHO+DEM.tif
and got the following error :
(FATAL) OrthoRectification: itk::ERROR: ImageToGenericRSOutputParameters(0x788a50): No information in the metadata, please set an image with non empty metadata
Same problem using the DIMAP xml file as input file :
docker run -it -v .:/Data orfeotoolbox/otb:9.0.0 otbcli_OrthoRectification -io.in "/Data/IMG_PHR1B_MS_004/DIM_PHR1B_MS_201807291333495_SEN_3210573101-004.XML?&skipcarto=true" -map utm -map.utm.zone 23 -interpolator nn -opt.ram 1024 -opt.gridspacing 4 -elev.dem /Data/SRTM1 -io.out /Data/test_ORTHO+DEM.tif
2024-03-06 16:27:10 (INFO) OrthoRectification: Elevation management: setting default height above ellipsoid to 0 meters
2024-03-06 16:27:10 (INFO): Loading metadata from official product
2024-03-06 16:27:10 (FATAL) OrthoRectification: itk::ERROR: ImageToGenericRSOutputParameters(0x788a50): No information in the metadata, please set an image with non empty metadata
### Configuration information
see above in descriptionhttps://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/issues/1671Remove hard-coded muParser expression library-wise2024-03-20T14:05:37ZJulien MichelRemove hard-coded muParser expression library-wise### What changes will be made and why they would make a better Orfeo ToolBox?
#### High level description
Some filters and classes use the `muParser` based filters with hard-coded expressions. This is bad for at least 2 reasons:
* `muP...### What changes will be made and why they would make a better Orfeo ToolBox?
#### High level description
Some filters and classes use the `muParser` based filters with hard-coded expressions. This is bad for at least 2 reasons:
* `muParser` based filters are not as fast as their functor based counter-parts
* `muParser` is an optional dependency. Using it heavily results in many applications and filters disabled if `muParser` is disabled (see #1670 for instance)
#### Risks and benefits
Only risk might be small changing with floating point baselines.
Benefit is a faster OTB less dependent on muParser.
#### Alternatives for implementations
We need to spot places where `muParser` is mis-used:
```
$ grep -R -l BandMath Modules/ | grep -v BandMath | grep -v Parser
Modules/Applications/AppProjection/app/otbGridBasedImageResampling.cxx
Modules/Applications/AppImageUtils/app/otbCompareImages.cxx
Modules/Applications/AppStereo/app/otbStereoFramework.cxx
Modules/Applications/AppStereo/app/otbBlockMatching.cxx
```
### Who will be developing the proposed changes?
TDB.https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/issues/1640[DOC] Document alternate Application API Python syntax2024-03-06T14:17:38ZManuel Grizonnet[DOC] Document alternate Application API Python syntax### Target documentation ressources
bandmath.IN = image.tif
bandmath.EXP = "im1b1"
This type of syntax should be described in the otb app section of the Cookbook (explain why upper case parameter is mandatory for instance).
### Chang...### Target documentation ressources
bandmath.IN = image.tif
bandmath.EXP = "im1b1"
This type of syntax should be described in the otb app section of the Cookbook (explain why upper case parameter is mandatory for instance).
### Change requested
Describe precisely the changes that are required.https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/issues/1514Improvements for ApplicationEngine2024-03-06T14:05:30ZGuillaume PaseroImprovements for ApplicationEngine### What changes will be made and why they would make a better Orfeo ToolBox?
The OTB Application are now used very often, so it is important to keep the ApplicationEngine code clean. This RFC proposes small enhancements that will simpl...### What changes will be made and why they would make a better Orfeo ToolBox?
The OTB Application are now used very often, so it is important to keep the ApplicationEngine code clean. This RFC proposes small enhancements that will simplify the code base, and also new services available from the C++ ApplicationEngine API but also wrapped into the Python API.
#### High level description
The following are small improvement to the ApplicationEngine module:
* [x] __Handling of "UserValue" flag__: the optional boolean in 3rd argument of the functions SetParameterString/SetParameterInt/... is not very convenient. I think it is possible to get rid of it using a simple state flag "IsInPrivateDo" in the Application class. This flag would be set to ON during calls to DoInit(), DoUpdateParameters() and DoExecute(). During these calls, the values set on parameters are always "Automatic" values. Outside these calls, we can assume that the values set on parameters come from the user.
* [x] __Merging "UserValue" and "AutomaticValue" flags__: why do we have both ? I believe we could choose the convention : UserValue = not(AutomaticValue). The initial default value of a parameter would be considered "automatic". We could remove 1 of these 2 flags, there are already enough in the Parameter class.
* [ ] __Handling of the m_Active flag__: this flag should be handled mostly by the Parameters themselves in the ApplicationEngine module. For instance the call to EnableParameter() in otb::Wrapper::CommandLineLauncher::LoadParameters() should not be here, but rather in each "param->SetValue(string)". In a similar way, in otb::Wrapper::Application::SetParameterUserValue(), the call to EnableParameter() should not be here (in addition, it will always switch ON an EmptyParameter). The benefit is also to guarantee the same behaviour on CLI / GUI /Python.
* [x] __Refactor the ParameterType_Empty__: there are a lot of special cases for this parameter because its value (a boolean flag) and its Active flag are actually the same. For instance, in the current state of ApplicationEngine, it is impossible to have an Empty parameter with Role_Output. This parameter should have its value stored in a specific flag, proper functions Application::Set/GetParameterBool(), and maybe easy conversions to/from string and integer values. Maybe a specific ParameterType_Boolean can be added...
* [ ] __String getters and setters for all parameters__: it would be nice if all the parameters could be set using a common Application::SetParameterString(), or SetParameterStringList(). Same remark for getters. It would remove some long sections of if/elseif/elseif/... in the CommandLineLauncher but also in the Input/OutputXML parameters.
* [x] __Move m_IsChecked to QtWrappers__: in the Parameter base class, the flag m_IsChecked is only used by QtWrapper, so it should be moved outside ApplicationEngine.
* [ ] __Improve architecture of Parameters__: there is also room for improvement in the architecture of Parameters. There is a lot of code that is duplicated between similar parameter types, we should consider a better class architecture to gather common features between parameters with similar behaviour.
* [x] __Remove enum m_DefaultValueMode__: in the Parameter base class, the enum m_DefaultValueMode is never used in OTB. We could check if other external projects use it. We could get rid of it.
If you see other potential improvements to the core of this module, feel free to give your idea.
The following are a list of new services for ApplicationEngine framework:
* [x] __Streaming and output information__: this is a set of service that let you have insights on what output the
application will generate, and what pieces of the input you need to generate a piece of the output.
* [x] __Get the output information__: given a parameter key corresponding to an OutputImageParameter, retrieve the output size, spacing, origin, projection, geom file and so on
* [x] __Get the requested input regions__: given a parameter key corresponding to an OutputImageParameter, and a region corresponding to a piece of this output, get for each InputImageParameter the region required to produce that piece of output. The application could also return the estimated amount of RAM needed to compute that piece.
* [x] __Attach metadata to numpy array interface__: the numpy array interface to application is useless in many cases because it only allows to pass the pixel buffer, and no metadata. Many OTB filters need additional metadata (such as origin, spacing, size, projection and geom file) to be able to process the data.
* [x] __Get rid of ComplexParameterInput/OutputImage__: there is no reason to have a separate complex image parameter. This makes most application incompatible with complex images (such as ExtractROI for instance). It would be better to be able to detect complex images with InputImageParameter, and to add new output types for OutputImageParameter (cint, cfloat, ...). Check Request_for_changes-125:_Merge_Complex_and_standard_Image_Parameter
* [x] __Set/get all parameters at once through a dictionnary in Pyton API__: this is a small helper for large application with many parameters to set.
* [x] __Get proper logging / progress reporting in Python__: self explanatory.
* [x] __Register/free filter resources__: provide a way to register filters and free them at the end of the application processing to avoid retaining memory. Check improvements to fix bug #1475
* [ ] __Interface with OGR Python wrappers__: GDAL/OGR provides Python wrappers for vector data. It would be useful to import them in OTB Applications (into ParameterType_VectorData). Solution for vectors defined as ParameterType_InputFilename ?
* [x] __Stop button for Graphic Interface__: Be able to stop a running application.
* [ ] __Document new features in CookBook__: new recipe ?
#### Risks and benefits
The main risk is to break existing applications, so we need to focus on compatibility. In the end, the ApplicationEngine will have a cleaner code base and new useful features.
#### Alternatives for implementations
### Who will be developing the proposed changes?
Work can be split, different contributors expected.https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/issues/2307Spatial shifting (orthorectification Sentinel1) with 8.1.02024-03-06T10:08:43ZNicolas EkicierSpatial shifting (orthorectification Sentinel1) with 8.1.0### Description
I notice a spatial shifting in Orthorectification output in Sentinel1 images with 8.1.0 compared to 7.3.0., about 60m with the same parameters.
For your information, I call `otbcli_Orthorectification`.
### Configuratio...### Description
I notice a spatial shifting in Orthorectification output in Sentinel1 images with 8.1.0 compared to 7.3.0., about 60m with the same parameters.
For your information, I call `otbcli_Orthorectification`.
### Configuration information
Ubuntu 22.04.1
OTB version (9.0.0 / 8.1.0 / 7.3.0)8.1.1Thibaut ROMAINThibaut ROMAINhttps://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/issues/2378Divide OTB modules in independent repositories2024-03-05T09:32:20ZTristan LaurentDivide OTB modules in independent repositories# Resume
The goal of this is to separate each modules located in https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/tree/develop/Modules in a separate repo (except Core). A link will be done from otb main repo and each module with the ...# Resume
The goal of this is to separate each modules located in https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/tree/develop/Modules in a separate repo (except Core). A link will be done from otb main repo and each module with the "submodule" git mechanism.
# Pro and cons
Separating modules have several advantages:
- Improve CI build time
- Improve unittest jobs and runs as only module related features are tested
- Issues will now be module-related
- Developers only download needed source code
The CI jobs may increase in complexity as we introduce dependencies with modules. Thus we need to trigger modules jobs from core.
# Plan
- [ ] According to @ytanguy , create a gitlab group to handle all modules in a separate repo. This will be easier for bug tracking and management
- [ ] Start with Miscellaneous module, use OTB modules https://www.orfeo-toolbox.org/CookBook-9.0/RemoteModules.html
- [ ] Create external git repo, link it as a submodule
- [ ] OTB core must download corresponding submodule if the cmake -DOTBGroup_Miscellaneous is turned on
- [ ] Compile it separately, you may use OTB core artifact
- [ ] Adapt CI to run corresponding build job and tests
- [ ] Adapt otb CI to start module job when there is a new dependency (i.e. OTB core)
- [ ] Adapt bug tracking for each project ?
- [ ] Add a Readme with compilation help, otb integration, and some exemples
- [ ] Repeat for Remote
- [ ] Repeat for FeatureExtraction
- [ ] Repeat for SAR
- [ ] Repeat for Segmentation
- [ ] Repeat for Hyperspectral
- [ ] Repeat for Learning
- [ ] Repeat for StereoProcessing10.0.0https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/issues/2377QGIS adapters cause issues with SuperBuild2024-02-20T17:07:13ZLaurențiu NicolaQGIS adapters cause issues with SuperBuild### Description
1. building using SuperBuild without `OTB_WRAP_QGIS` fails at the configure step:
```
CMake Error at CMake/OTBModuleAPI.cmake:69 (message):
No such module: "OTBQGIS"
Call Stack (most recent call first):
CMake/OTBMod...### Description
1. building using SuperBuild without `OTB_WRAP_QGIS` fails at the configure step:
```
CMake Error at CMake/OTBModuleAPI.cmake:69 (message):
No such module: "OTBQGIS"
Call Stack (most recent call first):
CMake/OTBModuleAPI.cmake:44 (otb_module_load)
CMake/OTBModuleAPI.cmake:88 (_otb_module_config_recurse)
build/OTB/build/OTBConfig.cmake:99 (otb_module_config)
Utilities/Completion/CMakeLists.txt:21 (find_package)
```
2. building using SuperBuild with `OTB_WRAP_QGIS` works initially (perhaps?), but fails on a second build:
```
[ 87%] ./bin/otbQgisDescriptor OpticalCalibration lib/otb/applications ./share/otb/description/
[ 87%] ./bin/otbQgisDescriptor BundleToPerfectSensor lib/otb/applications ./share/otb/description/
[ 89%] ./bin/otbQgisDescriptor Pansharpening lib/otb/applications ./share/otb/description/
[ 89%] ./bin/otbQgisDescriptor ReadImageInfo lib/otb/applications ./share/otb/description/
[ 89%] ./bin/otbQgisDescriptor ExtractROI lib/otb/applications ./share/otb/description/
[ 89%] ./bin/otbQgisDescriptor DynamicConvert lib/otb/applications ./share/otb/description/
[ 89%] ./bin/otbQgisDescriptor CompareImages lib/otb/applications ./share/otb/description/
[ 89%] ./bin/otbQgisDescriptor ConcatenateImages lib/otb/applications ./share/otb/description/
[ 89%] ./bin/otbQgisDescriptor ManageNoData lib/otb/applications ./share/otb/description/
[ 89%] ./bin/otbQgisDescriptor Rasterization lib/otb/applications ./share/otb/description/
[ 90%] ./bin/otbQgisDescriptor VectorDataTransform lib/otb/applications ./share/otb/description/
[ 90%] ./bin/otbQgisDescriptor Mosaic lib/otb/applications ./share/otb/description/
[ 90%] ./bin/otbQgisDescriptor ResetMargin lib/otb/applications ./share/otb/description/
[ 90%] ./bin/otbQgisDescriptor VectorDataExtractROI lib/otb/applications ./share/otb/description/
/home/grayshade/Projects/otb/build/OTB/build/bin/otbQgisDescriptor: error while loading shared libraries: libtiff.so.6: cannot open shared object file: No such file or directory
[ 90%] ./bin/otbQgisDescriptor ConcatenateVectorData lib/otb/applications ./share/otb/description/
[ 90%] ./bin/otbQgisDescriptor VectorDataSetField lib/otb/applications ./share/otb/description/
[ 90%] ./bin/otbQgisDescriptor ZonalStatistics lib/otb/applications ./share/otb/description/
/home/grayshade/Projects/otb/build/OTB/build/bin/otbQgisDescriptor: error while loading shared libraries: libtiff.so.6: cannot open shared object file: No such file or directory
[ 91%] ./bin/otbQgisDescriptor OrthoRectification lib/otb/applications ./share/otb/description/
[ 91%] ./bin/otbQgisDescriptor RigidTransformResample lib/otb/applications ./share/otb/description/
/home/grayshade/Projects/otb/build/OTB/build/bin/otbQgisDescriptor: error while loading shared libraries: libtiff.so.6: cannot open shared object file: No such file or directory
[ 91%] ./bin/otbQgisDescriptor Superimpose lib/otb/applications ./share/otb/description/
gmake[5]: *** [Modules/Core/Wrappers/QGIS/src/CMakeFiles/generate_descriptors.dir/build.make:416: share/otb/description/OpticalCalibration.txt] Error 127
gmake[5]: *** Waiting for unfinished jobs....
gmake[5]: *** [Modules/Core/Wrappers/QGIS/src/CMakeFiles/generate_descriptors.dir/build.make:196: share/otb/description/BundleToPerfectSensor.txt] Error 127
gmake[5]: *** [Modules/Core/Wrappers/QGIS/src/CMakeFiles/generate_descriptors.dir/build.make:424: share/otb/description/Pansharpening.txt] Error 127
/home/grayshade/Projects/otb/build/OTB/build/bin/otbQgisDescriptor: error while loading shared libraries: libtiff.so.6: cannot open shared object file: No such file or directory
[ 91%] ./bin/otbQgisDescriptor ImageEnvelope lib/otb/applications ./share/otb/description/
[ 91%] ./bin/otbQgisDescriptor VectorDataReprojection lib/otb/applications ./share/otb/description/
[ 91%] ./bin/otbQgisDescriptor ColorMapping lib/otb/applications ./share/otb/description/
[ 91%] ./bin/otbQgisDescriptor MultiResolutionPyramid lib/otb/applications ./share/otb/description/
[ 91%] ./bin/otbQgisDescriptor Quicklook lib/otb/applications ./share/otb/description/
/home/grayshade/Projects/otb/build/OTB/build/bin/otbQgisDescriptor: error while loading shared libraries: libtiff.so.6: cannot open shared object file: No such file or directory
/home/grayshade/Projects/otb/build/OTB/build/bin/otbQgisDescriptor: error while loading shared libraries: libtiff.so.6: cannot open shared object file: No such file or directory
gmake[5]: *** [Modules/Core/Wrappers/QGIS/src/CMakeFiles/generate_descriptors.dir/build.make:280: share/otb/description/ExtractROI.txt] Error 127
/home/grayshade/Projects/otb/build/OTB/build/bin/otbQgisDescriptor: error while loading shared libraries: libtiff.so.6: cannot open shared object file: No such file or directory
/home/grayshade/Projects/otb/build/OTB/build/bin/otbQgisDescriptor: error while loading shared libraries: libtiff.so.6: cannot open shared object file: No such file or directory
/home/grayshade/Projects/otb/build/OTB/build/bin/otbQgisDescriptor: error while loading shared libraries: libtiff.so.6: cannot open shared object file: No such file or directory
[ 91%] ./bin/otbQgisDescriptor TileFusion lib/otb/applications ./share/otb/description/
[ 91%] ./bin/otbQgisDescriptor Synthetize lib/otb/applications ./share/otb/description/
[ 91%] ./bin/otbQgisDescriptor SplitImage lib/otb/applications ./share/otb/description/
[ 91%] ./bin/otbQgisDescriptor PixelValue lib/otb/applications ./share/otb/description/
/home/grayshade/Projects/otb/build/OTB/build/bin/otbQgisDescriptor: error while loading shared libraries: libtiff.so.6: cannot open shared object file: No such file or directory
/home/grayshade/Projects/otb/build/OTB/build/bin/otbQgisDescriptor: error while loading shared libraries: libtiff.so.6: cannot open shared object file: No such file or directory
/home/grayshade/Projects/otb/build/OTB/build/bin/otbQgisDescriptor: error while loading shared libraries: libtiff.so.6: cannot open shared object file: No such file or directory
gmake[5]: *** [Modules/Core/Wrappers/QGIS/src/CMakeFiles/generate_descriptors.dir/build.make:452: share/otb/description/ReadImageInfo.txt] Error 127
/home/grayshade/Projects/otb/build/OTB/build/bin/otbQgisDescriptor: error while loading shared libraries: libtiff.so.6: cannot open shared object file: No such file or directory
gmake[5]: *** [Modules/Core/Wrappers/QGIS/src/CMakeFiles/generate_descriptors.dir/build.make:228: share/otb/description/ConcatenateImages.txt] Error 127
gmake[5]: *** [Modules/Core/Wrappers/QGIS/src/CMakeFiles/generate_descriptors.dir/build.make:208: share/otb/description/CompareImages.txt] Error 127
gmake[5]: *** [Modules/Core/Wrappers/QGIS/src/CMakeFiles/generate_descriptors.dir/build.make:372: share/otb/description/ManageNoData.txt] Error 127
gmake[5]: *** [Modules/Core/Wrappers/QGIS/src/CMakeFiles/generate_descriptors.dir/build.make:448: share/otb/description/Rasterization.txt] Error 127
gmake[5]: *** [Modules/Core/Wrappers/QGIS/src/CMakeFiles/generate_descriptors.dir/build.make:268: share/otb/description/DynamicConvert.txt] Error 127
gmake[5]: *** [Modules/Core/Wrappers/QGIS/src/CMakeFiles/generate_descriptors.dir/build.make:392: share/otb/description/Mosaic.txt] Error 127
gmake[5]: *** [Modules/Core/Wrappers/QGIS/src/CMakeFiles/generate_descriptors.dir/build.make:456: share/otb/description/ResetMargin.txt] Error 127
gmake[5]: *** [Modules/Core/Wrappers/QGIS/src/CMakeFiles/generate_descriptors.dir/build.make:592: share/otb/description/VectorDataTransform.txt] Error 127
/home/grayshade/Projects/otb/build/OTB/build/bin/otbQgisDescriptor: error while loading shared libraries: libtiff.so.6: cannot open shared object file: No such file or directory
/home/grayshade/Projects/otb/build/OTB/build/bin/otbQgisDescriptor: error while loading shared libraries: libtiff.so.6: cannot open shared object file: No such file or directory
/home/grayshade/Projects/otb/build/OTB/build/bin/otbQgisDescriptor: error while loading shared libraries: libtiff.so.6: cannot open shared object file: No such file or directory
/home/grayshade/Projects/otb/build/OTB/build/bin/otbQgisDescriptor: error while loading shared libraries: libtiff.so.6: cannot open shared object file: No such file or directory
/home/grayshade/Projects/otb/build/OTB/build/bin/otbQgisDescriptor: error while loading shared libraries: libtiff.so.6: cannot open shared object file: No such file or directory
gmake[5]: *** [Modules/Core/Wrappers/QGIS/src/CMakeFiles/generate_descriptors.dir/build.make:608: share/otb/description/ZonalStatistics.txt] Error 127
gmake[5]: *** [Modules/Core/Wrappers/QGIS/src/CMakeFiles/generate_descriptors.dir/build.make:460: share/otb/description/RigidTransformResample.txt] Error 127
gmake[5]: *** [Modules/Core/Wrappers/QGIS/src/CMakeFiles/generate_descriptors.dir/build.make:420: share/otb/description/OrthoRectification.txt] Error 127
/home/grayshade/Projects/otb/build/OTB/build/bin/otbQgisDescriptor: error while loading shared libraries: libtiff.so.6: cannot open shared object file: No such file or directory
gmake[5]: *** [Modules/Core/Wrappers/QGIS/src/CMakeFiles/generate_descriptors.dir/build.make:232: share/otb/description/ConcatenateVectorData.txt] Error 127
gmake[5]: *** [Modules/Core/Wrappers/QGIS/src/CMakeFiles/generate_descriptors.dir/build.make:580: share/otb/description/VectorDataExtractROI.txt] Error 127
gmake[5]: *** [Modules/Core/Wrappers/QGIS/src/CMakeFiles/generate_descriptors.dir/build.make:588: share/otb/description/VectorDataSetField.txt] Error 127
/home/grayshade/Projects/otb/build/OTB/build/bin/otbQgisDescriptor: error while loading shared libraries: libtiff.so.6: cannot open shared object file: No such file or directory
/home/grayshade/Projects/otb/build/OTB/build/bin/otbQgisDescriptor: error while loading shared libraries: libtiff.so.6: cannot open shared object file: No such file or directory
gmake[5]: *** [Modules/Core/Wrappers/QGIS/src/CMakeFiles/generate_descriptors.dir/build.make:540: share/otb/description/Superimpose.txt] Error 127
/home/grayshade/Projects/otb/build/OTB/build/bin/otbQgisDescriptor: error while loading shared libraries: libtiff.so.6: cannot open shared object file: No such file or directory
gmake[5]: *** [Modules/Core/Wrappers/QGIS/src/CMakeFiles/generate_descriptors.dir/build.make:332: share/otb/description/ImageEnvelope.txt] Error 127
/home/grayshade/Projects/otb/build/OTB/build/bin/otbQgisDescriptor: error while loading shared libraries: libtiff.so.6: cannot open shared object file: No such file or directory
/home/grayshade/Projects/otb/build/OTB/build/bin/otbQgisDescriptor: error while loading shared libraries: libtiff.so.6: cannot open shared object file: No such file or directory
gmake[5]: *** [Modules/Core/Wrappers/QGIS/src/CMakeFiles/generate_descriptors.dir/build.make:204: share/otb/description/ColorMapping.txt] Error 127
/home/grayshade/Projects/otb/build/OTB/build/bin/otbQgisDescriptor: error while loading shared libraries: libtiff.so.6: cannot open shared object file: No such file or directory
/home/grayshade/Projects/otb/build/OTB/build/bin/otbQgisDescriptor: error while loading shared libraries: libtiff.so.6: cannot open shared object file: No such file or directory
gmake[5]: *** [Modules/Core/Wrappers/QGIS/src/CMakeFiles/generate_descriptors.dir/build.make:544: share/otb/description/Synthetize.txt] Error 127
/home/grayshade/Projects/otb/build/OTB/build/bin/otbQgisDescriptor: error while loading shared libraries: libtiff.so.6: cannot open shared object file: No such file or directory
/home/grayshade/Projects/otb/build/OTB/build/bin/otbQgisDescriptor: error while loading shared libraries: libtiff.so.6: cannot open shared object file: No such file or directory
gmake[5]: *** [Modules/Core/Wrappers/QGIS/src/CMakeFiles/generate_descriptors.dir/build.make:400: share/otb/description/MultiResolutionPyramid.txt] Error 127
gmake[5]: *** [Modules/Core/Wrappers/QGIS/src/CMakeFiles/generate_descriptors.dir/build.make:440: share/otb/description/Quicklook.txt] Error 127
gmake[5]: *** [Modules/Core/Wrappers/QGIS/src/CMakeFiles/generate_descriptors.dir/build.make:432: share/otb/description/PixelValue.txt] Error 127
gmake[5]: *** [Modules/Core/Wrappers/QGIS/src/CMakeFiles/generate_descriptors.dir/build.make:528: share/otb/description/SplitImage.txt] Error 127
gmake[5]: *** [Modules/Core/Wrappers/QGIS/src/CMakeFiles/generate_descriptors.dir/build.make:584: share/otb/description/VectorDataReprojection.txt] Error 127
/home/grayshade/Projects/otb/build/OTB/build/bin/otbQgisDescriptor: error while loading shared libraries: libtiff.so.6: cannot open shared object file: No such file or directory
gmake[5]: *** [Modules/Core/Wrappers/QGIS/src/CMakeFiles/generate_descriptors.dir/build.make:548: share/otb/description/TileFusion.txt] Error 127
gmake[4]: *** [CMakeFiles/Makefile2:11482: Modules/Core/Wrappers/QGIS/src/CMakeFiles/generate_descriptors.dir/all] Error 2
gmake[3]: *** [Makefile:156: all] Error 2
gmake[2]: *** [CMakeFiles/OTB.dir/build.make:87: OTB/src/OTB-stamp/OTB-build] Error 2
gmake[1]: *** [CMakeFiles/Makefile2:974: CMakeFiles/OTB.dir/all] Error 2
gmake: *** [Makefile:91: all] Error 2
```
I do have `libtiff` already built in the current directory:
```
TIFF/build/libtiff/libtiff.so
TIFF/build/libtiff/libtiff.so.6
TIFF/build/libtiff/libtiff.so.6.0.2
```
My workaround was to do something like below, but it isn't ideal, of course:
```
cmake --build . --parallel $(nproc); cp OTB/build/lib/libOTBSampling-9.0.so.1 ../superbuild_install/lib/libOTBSampling-9.0.so.1; cp OTB/build/lib/otb/applications/otbapp_SampleAugmentation.so ../superbuild_install/lib/otb/applications/otbapp_SampleAugmentation.so
```
### Steps to reproduce
```
$ mkdir build
$ cd build
$ ccmake ../SuperBuild # choose your favourite settings
$ cmake --build . --parallel $(nproc)
```
### Configuration information
Fedora 39, tested at c302db4eab9815ba94d83c29ce45aa4b0dc144b6
![image](/uploads/7be70d36a2fbbc1fd96cd1efe57489dc/image.png)https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/issues/2361ToJSON() method in otbGeometryMetadata returns a string that is not a valid json2024-02-05T17:04:54ZDamiano MissoniToJSON() method in otbGeometryMetadata returns a string that is not a valid jsonThe function does not return a valid json due to trailing comma after the last elements.
```cpp
// JSON export
std::string ToJSON(bool multiline=false) const;
inline static std::string doubleArrayToString(const double* array)
{
...The function does not return a valid json due to trailing comma after the last elements.
```cpp
// JSON export
std::string ToJSON(bool multiline=false) const;
inline static std::string doubleArrayToString(const double* array)
{
std::ostringstream oss;
oss << "[";
for (int loop = 0 ; loop < 20 ; loop++)
oss << " \"" << array[loop] << "\", ";
oss << "]";
return oss.str();
}
```https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/issues/2294The application RefineSensorModel is missing in version 8.0+2024-02-01T08:58:17Zhello-willyThe application RefineSensorModel is missing in version 8.0+# Refactoring the RefineSensorModel application
## Context
The application RefineSensorModel uses a set of tie points to adjust the parameters of a sensor model.
It uses an optimization algorithm (least-square) to fit the model to the...# Refactoring the RefineSensorModel application
## Context
The application RefineSensorModel uses a set of tie points to adjust the parameters of a sensor model.
It uses an optimization algorithm (least-square) to fit the model to the fit points.
The inputs of the application are
- a geom file containing the sensor model
- a text file containing the tie points
The outputs are
- a geom file containing the refined sensor model
- a text file containing output precision statistics
- a text file containing segments representing residues
Since OTB 8, this application is not available.
We want to reintroduce it, since it is of great interest.
## Details of the refactoring
To reintroduce RefineSensorModel, we need to address multiple issues
### OTB doesn't write geom files anymore
The new version of OTB can't produce a geom file as output of the application.
We propose to change the RefineSensorModel application to work at the product level.
Instead of reading and writing a geom file, it will read and write an image file.
Impact:
- The `ingeom` and `outgeom` parameters become `inImage` and `outImage`, and are of type "ParameterType_InputImage" instead of "ParameterType_InputFilename".
- Use the `SensorTransformFactory` to load the RPC or SAR model from the metadata of the input image.
### Hold the fit points
The fit points used to be stored in the SensorModelAdapter class.
This class was removed with OSSIM, so we need to store the fit points somewhere else.
The proposed class for this task is `SensorTransformBase`.
Impact:
- Add the attribute `m_TiePoints` and implement the function `AddTiePoint` to `SensorTransformBase`.
### Run the optimization
The optimization algorithm was provided by OSSIM.
So we need to implement the optimization algorithm and call it for each sensor model (SAR, RPC).
Impact:
- Implement the Least-Square Optimization algorithm ?
- Add an `Optimize` virtual function to `SensorTransformBase`.
- Implement an `Optimize` function in `RPCTransformBase` class that apply the optimization algorithm to the RPC model (RpcParam).
- Implement an `Optimize` function in `SARTransformBase` class that apply the optimization algorithm to the SAR model (SarParam).8.2.0https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/issues/2320Eager mode for ReadImageFilter2024-01-09T14:11:43ZRémi CressonEager mode for ReadImageFilterI was wondering if one could enable/disable a specific behavior of the processing workflow.
In particular I am wondering if the reading and the processing operations could be done in parallel in an OTB pipeline.
This could be an interest...I was wondering if one could enable/disable a specific behavior of the processing workflow.
In particular I am wondering if the reading and the processing operations could be done in parallel in an OTB pipeline.
This could be an interesting feature when accessing the input takes a while, e.g. when processing remote images (/vsicurl/http://.../image.tif). Indeed one region could be downloaded while another one is processed.
The typical processing flow in OTB is the following (we consider a simple pipeline composed of 1 reader --> 1 filter --> 1 writer):
1. Propagates the filter's requested output region to the reader. At the end of this step, the filter knows which region of the input it has to fetch.
2. Read the input data over this requested region
3. Process the requested region
4. Write the output
It's sequential.
What if we could run step 2 and 3 in parallel?
I am just wondering if that is somehow possible.
The only thing to do is for the reader, to not wait until the filter ask him the data, to go grab it. But this supposes that the reader knows in advance what the next requested region would be. I am wondering if somehow this is doable in the ITK framework?
I'll ask for toughs here, then I guess I will ask the ITK community...
Thanks,
Rémihttps://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/issues/2374AfterExecuteAndWriteOutputs() not called from python API2024-01-08T10:13:07ZRémi CressonAfterExecuteAndWriteOutputs() not called from python APIIt looks like `AfterExecuteAndWriteOutputs()` is not called in python.
OTB 9.0.0, Ubuntu 22.04
I test with various applications but the most easy is with Mosaic, setting `tmpdir` and `comp.feather` to `large`.
In CLI the tmp files are ...It looks like `AfterExecuteAndWriteOutputs()` is not called in python.
OTB 9.0.0, Ubuntu 22.04
I test with various applications but the most easy is with Mosaic, setting `tmpdir` and `comp.feather` to `large`.
In CLI the tmp files are deleted, in python they are not.https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/issues/2367vector files and other result files do not get saved when running OTB from QGIS2023-12-01T12:36:23ZJanOPedersenvector files and other result files do not get saved when running OTB from QGIS### Description
When running for instance the segmentation operation, everything seams to work until the result file and result layer is to be shown. Neither the shape file, nor result layer are produced.
### Steps to reproduce
0. QGI...### Description
When running for instance the segmentation operation, everything seams to work until the result file and result layer is to be shown. Neither the shape file, nor result layer are produced.
### Steps to reproduce
0. QGIS is already installed
1. Install OTB in QGIS
2. Run OTB -> Segmentation -> Segmentation
use default parameters and set the 'output vector file' to 'save as file' and provide a local folder and for instance the name 'segmentation.shp'
3. Press 'run'
4. The logs now show that the result has been saved to the specified file (segmentation.shp) in the specified folder, but the file does not exist.
5. the layer is not added either
### Configuration information
OS, OTB version or tag, information related to build (binaries, superbuild, system libs ...)
OS: Windows 11
OTB: 8.1.2
QGIS: 3.34https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/issues/2366no data management with otbcli_Superimpose2023-12-01T10:08:19ZemmaBno data management with otbcli_Superimposeotbcli_Superimpose doesn't seem to take into account (and then to ignore) no data values.
It considers them as usual values so they are used in the computation of new pixel values.
Would it be possible to add a parameter "no data value" ...otbcli_Superimpose doesn't seem to take into account (and then to ignore) no data values.
It considers them as usual values so they are used in the computation of new pixel values.
Would it be possible to add a parameter "no data value" ?
(otb version 7.4.0 in command line)