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

RT plan loading issues #145

Closed cpinter closed 4 years ago

cpinter commented 4 years ago

It takes around 10 minutes to load the Eclipse ENT test dataset. It only happens if I load the RT plan as well. It seems an unreasonably long time even if the plan is complex. In addition, it created dozens of beam nodes, with one MLC table in each, see below.

@MichaelColonel

  1. Do you have an idea why it takes so long?
  2. Is it a feature that so many beam nodes are created? By design we should have as many beam nodes as beams

image

MichaelColonel commented 4 years ago
  1. It definitely shouldn't load data so long, i will try to fix that issue ASAP.
  2. If beam is intensity modulated, or some king of conformal in plan, then each beam can have multiple (dozens or hundreds) control points, and each control point is loaded as a separated beam. That is not a best idea, but there is nothing better.

The main reason why it take so much time, is the ImportExportLogic try to update (redraw) each beam when a new beam was added into the scene.

cpinter commented 4 years ago

Thank you for the quick answer! I appreciate you taking a look.

You're right, we did discuss the control points. Maybe they should be grouped to folders or somehow made easier to manage, because this very long list is not useful at all unfortunately. @gregsharp do you have any idea for this?

lassoan commented 4 years ago

It sounds like the most appropriate would be to store these control points in Sequence nodes. You can store thousands of nodes in one sequence node with small overhead. You can browse between sequence items using a slider or even replay them. You can expose one or more items from a sequence, and of course you have full access to all the nodes from code.

Sequences are now part of Slicer core (in Slicer-4.11) before that it was a separate extension.

MichaelColonel commented 4 years ago

As a temporary fix i can disable loading of multiple control points, so it will be only one control point per beam, as it was previously.

If batch processing is activated the loading is fast, but for the each beam one must manually invoke BeamTransformModified and BeamGeometryModified events (using Beams module) for proper visualization. For some reason BeamTransformModified event takes quite amount of time.

cpinter commented 4 years ago

Thanks @lassoan and @MichaelColonel! Let me take a closer look at the options before any quick fixes are made.

cpinter commented 4 years ago

In the latest version the loading time is similar to what we had before, and with the sequences change the beam nodes are not overwhelming with the one node per control point, but there is one item for each beam.