Skip to content

ENH: Separated volume rendering preset combobox from module widget

The Volume Rendering module widget handled everything, which made the class quite big, and also prevented reusing the preset combobox in other modules or slicelets.

  • Added reusable qSlicerVolumeRenderingPresetComboBox class that contains the combobox and the shift slider
  • Added EffectiveRange member to vtkMRMLVolumePropertyNode. It sets a custom extent to the transfer functions so that only the meaningful part of it is shown (and not the long tails). Thus the shift slider is much less sensitive and is more user friendly
  • Added effectiveRange attribute to presets.xml. For now the effective range is between the second and last second points for CTs, first and second last for MRs
  • Removed calculation of transfer function extent based on volume scalar range. The effective range is always valid, and contains a meaningful range (if not then encompasses the transfer function bounds), so this is not necessary anymore (and the combobox class is also cleaner)
  • Instead of only moving the middle points of the transfer function, all the points are moved. This fixes the bug of squashing the transfer function if it was shifted beyond its extreme points (bounds)

Merge request reports