Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
otb
otb
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 273
    • Issues 273
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 8
    • Merge Requests 8
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Main Repositories
  • otbotb
  • Issues
  • #2114

Closed
Open
Opened Oct 15, 2020 by Guillaume Pasero@gpaseroOwner

Better interface for ResetMargin

The current interface of the ResetMargin is not symmetric in X and Y:

  • threshold.x is used to define the margin size for left and right sides
  • threshold.y.start is used to define the top margin size
  • threshold.y.end is used to define the bottom margin size (which is strange because "end" usually refer to an absolute coordinate in OTB world, not a margin size).

Also, the term threshold suggest an operation is performed based on the pixel value, which is not the case.

I propose to replace these parameters by 2 interfaces to set the region:

  • as a ROI, just like in ExtractROI:
    • roi.startx
    • roi.starty
    • roi.sizex
    • roi.sizey
  • as margins for each side
    • margin.top
    • margin.down
    • margin.left
    • margin.right

These parameters should be made consistent by the function ResetMargin::DoUpdateParameters().

To ensure API compatibility, it is possible to deprecate the threshold... parameters, while introducing the new ones roi... and margin....

Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: orfeotoolbox/otb#2114