Skip to content

Revisit implementation using standard Slicer annotation #35

@jcfr

Description

@jcfr

Following the initial development of the module started in 2015, a lot changed in Slicer. There are now built-in annotations (lines, angles, plane, ... ) that may be used as building blocks.

Re-using these would reduce maintenance cost by simplifying the implementation.

To support computing the following relative measurements:

  • Midpoint between two fiducials
  • Angle between two lines
  • Distance between line and a point
  • Distance between two landmark

Use cases

To more effectively refine the plan outline below, it would be great to describe the measurement use cases.

Some of the use cases a described in #7

To be done

@bpaniagua @luciacev

Suggested approach

The sections below discuss possible approach to simplify the module.

Relative measurements

Midpoint between two fiducials

Few options:#7 (comment)

  • (1) custom python code in extension to add (and update) fiducial position based on fiducial position associated with line annotation
  • (2) update built-in line annotation to support displaying midpoint. @lassoan: What do you think ?

Benefits:

Note: The new json format for markup currently allow to save only one annotation per json file, we should evaluate if support for saving multiple annotation per json is strictly required. (see this previous discussion at Slicer/Slicer#4938 (comment))

Distance between two landmarks

Re-use the build-in line annotation. The R-L, A-P and S-I components associated with the distance would then be easily computed given a line annotation.

For example:

image

Angle between two lines

User would have two options:

  • (1) re-use the built-in angle annotation. For example:

image

  • (2) compute the angle given two "line" annotations.

Distance between line and a point

The logic function would be given a line annotation and a fiducial.

Saving/Loading measurements

Currently them module allows to save/load linePoint.csv, distance.csv or angle.csv. Custom read/write functions are maintained in the module.

Considering Slicer now allows for saving and loading data from csv/text/json as table:

For now, I suggest we revisit the module to leverage the saving/loading of tabular data through the tables modules.

References:

Long term

In the future, we are thinking about creating a "Relative Measurements" module (or similar name) in Slicer allowing to easily define measurement computed based on position of other simple annotation.

At that stage, there is nothing formal but considering this type of features seems to be a common need, I think it is worth having a discussion.

cc: @lassoan

Metadata

Metadata

Assignees

No one assigned

    Labels

    Q3DCRelated to the Q3DC module

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions