Skip to content

Refactor the module #22

Open
Open

Description

@jhlegarreta

As @dzenanz pointed in #20 , the module needs to be refactored. Some classes seem to be specialized versions of classes that exist in the toolkit (Canny detection filters, morphological filters, etc.), but it should be investigated whether better inheritance can be achieved.

Some minor issues related to the refactoring, or which could be done while refactoring are:

  • Separate the class header from the implementation (e.g. see itk::DescoteauxSheetnessImageFilter).

  • Provide Set / Get methods using ITK macros for all ivars.

  • Provide some default values for ivars (e.g. see itk::DescoteauxSheetnessImageFilter).

  • Provide the implementation for the PrintSelf method in cases which is missing or incomplete.

  • Prefer initialization lists over assignment.

Activity

  1. jhlegarreta commented on Oct 11, 2018

    @jhlegarreta
    MemberAuthor

    Hopefully, these two branches, when they eventually get more work and get merged, may help in this tremendous task:

  2. hjmjohnson commented on Oct 8, 2026

    @hjmjohnson
    Member

    Status as of 2026-10-08, so this stays a live tracking issue rather than a stale wish list.

    Done or in review:

    Still open from the original list, in rough priority:

    1. Port CannyEdgeDetectionRecursiveGaussianImageFilter from ITK_THREAD_RETURN_TYPE callbacks and ProgressReporter to DynamicThreadedGenerateData and ProgressTransformer (moved here from Compiler error concerning ITK_THREAD_RETURN_VALUE #20).
    2. Decide whether that filter, DescoteauxSheetnessImageFilter, and the morphology helpers duplicate toolkit classes closely enough to be replaced.
    3. Header/implementation split, Set/Get macros, default member values, and complete PrintSelf across the generators and aggregators.
    4. Examples/ and Utilities/Visualization still call the pre-ITK5 SpatialObjectPoint::GetPosition() and only build with LSTK_USE_VTK=ON, which CI never exercises (Unable to successfully compile LesionSizingToolkit module #42).
  3. hjmjohnson commented on Oct 13, 2026

    @hjmjohnson
    Member

    Items 1 and 2 of the 2026-10-08 status (the Canny filter threading port and its duplication of the ITK filter) moved to #63, which tracks bringing CannyEdgeDetectionRecursiveGaussianImageFilter up to the fixes in itk::CannyEdgeDetectionImageFilter. The remaining items here (header/implementation split, Set/Get macros, default values, PrintSelf, and the Descoteaux and morphology helpers) stay in this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions