Skip to content
Snippets Groups Projects

Draft: Refac otbObject inheritance

Closed Cresson Remi requested to merge 37-refac-otbobject-inheritance into develop

Closes #37 (closed) and #44

Changelog :

  • output parameter keys and types are stored in object's out_param_keys and out_param_types
  • add properties key_input_image and key_output_image to expose the first parameter key corresponding to image parameter IO (replace old output_param)
  • thanks to key_input_image, it is now possible to pass input file as first argument to an app, even if its name is different than "in" or "il"
  • add function export to export a numpy array, they will be stored in object's exports_dict in order to avoid duplicated ExportImage call
  • it is now possible to pass a key parameter to to_numpy or to_rasterio in order to export another image than the default output param, array objects will be fetch from exports_dict if already exported
  • add OTBObject function flush() in order to separate the write logic (arguments parsing) from the WriteOutput / flush event - should help to avoid duplicated executions
  • add new OTBObject property outputs that returns a list of output param values
  • now that most of the app execution logic has moved to OTBObject, the App class can be extended with functions to improve user experience (like find_output )
  • add function read_values_at_coords to RasterInterface that allow to read a pixel value at coordinates, directly or using index like app[100,100,1]
  • using _set_param or set_parameters with None value or an empty list/tuple now allow to clear a parameter value using app.ClearValue
  • move App and MetaOTBApp related code to apps.py
Edited by Cresson Remi

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
Please register or sign in to reply
Loading