SlicerRt / SlicerRT

Open-source toolkit for radiation therapy research, an extension of 3D Slicer. Features include DICOM-RT import/export, dose volume histogram, dose accumulation, external beam planning (TPS), structure comparison and morphology, isodose line/surface generation, etc.
https://slicerrt.org
127 stars 60 forks source link

DVH Legend Shows Duplicate Titles #127

Closed rpmumme closed 4 years ago

rpmumme commented 4 years ago

I was hoping you guys could help with this issue I've been having. I compute the DVH and display the plot, everything looks good, and I save the scene as a .mrb file. However, whenever I open the scene, the DVH legend shows 2 of everything. I have tried: 1) making sure all of the scenes are closed out before opening the Slicer program again, 2) toggling on and off the legend, 3) toggling on and off the DVH.

Whenever I try deleting the chart and metrics table, I can recompute the DVH and display the correct legend. But after saving the scene and opening it again, the duplicates come back. Another thing I can do is toggle off and on each individual structure, which puts things back in place. However, these methods are pretty tedious and ideally I'm looking for the correct DVH legend to load up right away when the scene loads.

Legend before save: snip

Legend after save: snip2

Sunderlandkyl commented 4 years ago

I'll take a look at this, thank for reporting!

cpinter commented 4 years ago

There must be an automatic node creation triggering the addition of another node that should be disabled during scene import.

Sunderlandkyl commented 4 years ago

This turned out to be related to the reading of node references from the XML, which caused duplicate node references for each of the plotSeries in the chart node. This pull request should fix the issue (https://github.com/Slicer/Slicer/pull/1304).

rpmumme commented 4 years ago

Thank you so much for the quick turnaround!

rpmumme commented 4 years ago

This turned out to be related to the reading of node references from the XML, which caused duplicate node references for each of the plotSeries in the chart node. This pull request should fix the issue (Slicer/Slicer#1304).

I looked at the pull request and it looks like the branch hasn't been merged yet. Was there another issue that came up? Thank you for looking into this bug.

Sunderlandkyl commented 4 years ago

The pull request has now been merged. This should fix the issue.