Skip to content

BUG: Plotting fixes

Andras Lasso requested to merge github/fork/lassoan/chart-node-fixes into master
  1. Prevent changing chart node in all viewers when it is changed in one

When plot chart node selection was changed in one plot widget, it changed plot chart node selection in all other plot widgets. This prevented showing different charts in different widgets.

Active node in Selection node should not be used for immediately updating all views, but instead it should only be done when vtkMRMLApplicationLogic::PropagatePlotChartSelection is called.

  1. Made PlotView input setting more robust: prevent crash when scene is set after plot view node, allow using the view without setting color logic (log warning only if not set).

  2. Removed modification of MRML nodes in qMRMLPlotViewControllerWidget::updateWidgetFromMRML

Problem: Common PlotData type, x column name, and marker style was stored in vtkMRMLPlotChartNode. However, this information may get out of sync with actual common properties in associated PlotData nodes. Consolidation of redundant information happened in qMRMLPlotViewControllerWidget::updateWidgetFromMRML, by modifying PlotData nodes. In general, MRML nodes must not be modified in updateWidgetFromMRML calls and data redundancy should be avoided.

Solution: Do not store redundant information in PlotChart node. Common PlotData type, x column name, and marker style is determined when needed, by looking into associated PlotData nodes. When user changes a common property on the GUI, PlotData nodes are updated immediately.

Merge request reports

Loading