Page MenuHomePhabricator

Extend ImageStatistics with line profile widget
Closed, ResolvedPublic

Description

In addition to showing a histogram widgets for images masked with (closed) PlanarFigures, a helpful feature would be a line profile widget which shows the gray-values along a (non-closed) PlanarFigure (line, polyline) as a curve diagram.

For polylines, the individual line segments should be marked within the curve diagram (e.g. by marker lines or individual colors for each section).

A nice secondary feature would be if, when selecting a point on a line / polyline, the corresponding position in the line profile would be highlighted.

Event Timeline

[SVN revision 21049]
ADD (#3067): Added the feature of Intensity Profile Generation along a planar line. Results will be shown in the histogram widget. bug not resolved yet, but basic operativeness provided.

Philip, as we just discusse, it would be a really cool feature to extend in order to also function along paths:)

First version works nicely, but a line diagram widget should be used instead of bar chart widget for representing line profiles.

Will look into the possibilities of supporting itk::Paths.

Relevant for MITK 1.0, because QmitkImageStatistics has been made public (see T3207)

[SVN revision 21572]
ENH (#3067): added rudimentary version of new QmitkVtkLineProfileWidget

[SVN revision 21730]
FIX (#3067): Disable line profile widget since it is not yet ready-to-use

Reenabled it on my local system and it seems to work fine, what exactly was the problem?

(In reply to comment #8)

Reenabled it on my local system and it seems to work fine, what exactly was the
problem?

The line profile widget used to work OK for single straight lines. For polylines with multiple segments, however, things didn't work so well yet: at least, there was a problem with proper scaling of lengths in the widget, so that lengths of polyline segments correspond to lengths in the widget. This scale corretness is especially important for arbitrary ITK paths (which should also be supported by the widget).

To make the widget work for now, we could restrict it to work just for single straight lines.

The following would be perfect in my view :-)

  • Line profiles of different segemnts are marked differently (e.g. displayed in different colors) in the widget
  • It is somehow made clear what the start and what the end of a line is in the widget
  • When clicking on an area in the widget, the corresponding part of the line gets highlighted in the render window (maybe via a general interface, so that this could also work for general ITK paths, not only for PlanarFigures)
  • If selecting a point on a line, the corresponding point in the profile is highlighted in the render window
  • The line profile shows an exact image of the line course over the "pixel landscape", from the exact start of a line (within a voxel) to the exact end. At the moment, there is some interpolation happening, and the start and end points of the line are also not considered with sub-pixel accuracy.

[SVN revision 26134]
FIX (#3067): line profile widget is now active and works for multiple lines; segments are drawn in different colors

[SVN revision 26158]
FIX (#3067): line profile widget is now active and works for multiple lines; segments are drawn in different colors

[SVN revision 26159]
COMP (#3067): fix warnings

We looked into this and this bug seems to be fixed.

However, there are problems with the update function present in Linux. For instance, the statistics for a "line" are only refreshed if you switch between the image and the line. If you switch between two lines, the statistics and the histogram will not be refreshed.

Reassigning this to Danial.

@Danial: can we close this bug or are there still issues left??? Maybe we should create a new bug for my other mentioned points.

New account for Danial added as cc.

Danial, care to comment if this issue can be closed?

As far as I remember this bug was finished but still needed to be tested properly.

However, there are problems with the update function present in Linux. For
instance, the statistics for a "line" are only refreshed if you switch between
the image and the line. If you switch between two lines, the statistics and the
histogram will not be refreshed.

I will have a look at it asap.