Skip to content

ENH: Slice view annotations

Sam Horvath requested to merge github/fork/mehrtash/slice-view-annotations into master

Created by: mehrtash

@pieper, @fedorov This is an implementation of slice view annotations in DataProbe as a part of QIICR Project [1]. It includes the following features:

  • Corner text annotations including DICOM annotations.
  • Color scalar bar for background volume
  • Scaling ruler

This is a working script, however we would also try to add the following extra features on Wednesday:

  • Smarter logic for
    • Height of scalar bar
    • Maximum length of corner annotation lines
    • Hiding of the top right corner annotation

Some Known Issues:

  • We could not add the color scalar bar for foreground as there is no method in vtkMRMLSliceLogic to get Foreground window level and range ( for background we use GetBackgroundWindowLevelAndRange)
  • There is a random behavior which makes color scalar bars to disappear or placed at random positions. It has something to do with multi-sampleing option as deleting the MSAA flag in Slicer settings file (*.ini) fixes this.
  • There is also a bug in Windows that makes the annotations texts not readable on the white background (it looks like that the shadowing does not work correctly). It is introduced recently so I am suspicious to either MSAA or vtk6.
  • In color scalar bar there is no control on the font size of the label. One solution can be to use vtkPVScalarBarActor [2] from paraview.

[1] QIICR Slicer infrastructure projects [2] http://www.paraview.org/ParaView3/Doc/Nightly/html/classvtkPVScalarBarActor.html

Merge request reports