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
  • Merge Requests
  • !143

Closed
Opened Jun 20, 2018 by Victor Poughon@poughovContributor
  • Report abuse
Report abuse

REFAC: don't duplicate code in Application::GetParameterImage

  • Overview 5
  • Commits 1
  • Changes 2

Why are there two methods called Application::GetParameterImage, one templated on its return type and one not templated? The code between the two is partially duplicated. The only practical difference is that they call a different GetImage, one templated on its return type and the other not. But it's equivalent in the end because the non template GetImage calls GetImage<FloatVectorImageType>.

This diff is a proposal to fix but I wonder if there is some good reason to have a template method and a non-template one, where a default template argument would do the job? (@lhermitte)

I would also propose the same fix for InputImageParameter::GetImage, but there the situation is even less clear with 3 implementations: a non template, a specialization for ImageBaseType, and a template.

Assignee
Assign to
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Reference: orfeotoolbox/otb!143
Source branch: getparamimage