Prevent usage of image specific functions on non raster apps using output_image_key
If we want to avoid some apps like ReadImageInfo to provide image specific functions, it can be done with a metaclass : while subclassing each app in apps.py, the metaclass can take care of the new class parents.
If we want do to this, we have two options :
- as I tried in my old unmerged refac branch, for each app, checking if it as any output image key (bad because we need to init an otb.Application object)
- just using the App / class name, and a list of apps without image outputs
Here is the code to generate this list :
for a in pyotb.AVAILABLE_APPLICATIONS:
app = pyotb.App(a, frozen=True)
if not app.key_output_image:
print(a)
CompareImages
ComputeConfusionMatrix
ComputeImagesStatistics
ComputeOGRLayersFeaturesStatistics
ComputeVectorFeaturesStatistics
ConcatenateVectorData
ConnectedComponentSegmentation
ConvertCartoToGeoPoint
ConvertSensorToGeoPoint
EndmemberNumberEstimation
GeneratePlyFile
HomologousPointsExtraction
ImageEnvelope
KmzExport
LSMSVectorization
LineSegmentDetection
MultiImageSamplingRate
OGRLayerClassifier
OSMDownloader
ObjectsRadiometricStatistics
ObtainUTMZoneFromGeoPoint
PixelValue
PolygonClassStatistics
ReadImageInfo
SampleAugmentation
SampleExtraction
SampleSelection
SimpleVectorization
TrainDimensionalityReduction
TrainImagesClassifier
TrainImagesRegression
TrainRegression
TrainVectorClassifier
TrainVectorRegression
VectorClassifier
VectorDataExtractROI
VectorDataReprojection
VectorDataSetField
VectorDataTransform
VectorDimensionalityReduction
VectorRegression
Edited by Vincent Delbar