Improve qgis parameter integration
This merge request propose to improve the QGIS parameters selection interface for OTB algorithms.
1. Add a band selector
As soon as you select the associated raster, the combobox proposes the user to select one of (or several) images band.
Impacted application:
- otbExtractROI
- otbPixelValue
- otbQuicklook
Some algorithms (ContratsEnhancement, CompareImages, DynamicConvert, StereoFramework, RadioMetricIndices) take an integer index (1,2...) while the other ones (PixelValue, Quicklook) takes a string value ("Channel1, Channel2...). With my modification QGIS is able to deal with the latter one, but no the former one.
I don't see a clean way to deal with this without changing the API on OTB side, so I let them unchanged
Regarding StereoFramework algorithm, it takes an image list and an integer index. So it will need an extra modification in QGIS to make it works (like this one)
2. Add a field selector
As soon as you select the associated vector, the combobox proposes the user to select one of (or several) vector field.
Impacted applications:
- otbComputeConfusionMatrix
- otbComputeOGRLayersFeaturesStatistics
- otbOGRLayerClassifier
- otbVectorClassifier
- otbVectorRegression
- otbTrainDimensionalityReduction
- otbVectorDimensionalityReduction
- SampleSelection
There is still an issue with the following application:
- PolygonClassStatistics
- TrainVectorRegression
- TrainVectorClassifier
- TrainImagesClassifier
- SampleAugmentation (TrainImagesClassifier depends on it, so cannot be migrated)
- SampleExtraction (TrainImagesClassifier depends on it, so cannot be migrated)
The issue is related to the fact that we cannot select a field from a MultipleLayer (InputVectorDataList in OTB) type in QGIS.
I prepared the modification for OTB here once the modification for field parameter on multiple layers in QGIS is merged and available in a released and compatible QGIS version.
3. Select from a list of enum
It allows to select from a predefined list of element (radiometric indices for instance)
Impacted application:
- RadioMetricIndices
Compatibility version issue
These MR needs modification within QGIS OTB provider. I'm gonna propose a QGIS PR rightaway.
I hope this MR will land in OTB 7.3 and QGIS one in 3.16 (no feature is allowed normally but 3.16 isn't LTR yet and the modifications are not completely feature like).
Once both this MR and the QGIS PR would have been merged, QGIS will remain compatible with older OTB version, but older QGIS version won't be compatible with newer version of OTB (the interface txt files would have changed).
Could it be an accepted requirement that when using OTB 7.3 with QGIS, QGIS version HAVE to be greater than or equal to 3.16?
The QWT issue
I had an issue building the OTB SuperBuild, so the commit *fix QWT build" fixes it. I can propose a different MR if it's easier to manage.