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
128 stars 60 forks source link

Update SRO import/export to work with the new export mechanism #42

Closed cpinter closed 5 years ago

cpinter commented 7 years ago

See DicomRtImportExport module changes.

(It's in the branch https://subversion.assembla.com/svn/slicerrt/branches/DICOMExport/ and not integrated yet, but will be in a few weeks, so either work in that branch or wait until it's integrated)

Migrated from https://app.assembla.com/spaces/slicerrt/tickets/670-update-sro-import-export-to-work-with-the-new-export-mechanism/details

cpinter commented 7 years ago

2014-12-02 17:39 Csaba Pinter @wangk The DICOM export branches have been integrated. You can see that the modules DicomRtImport and DicomRtExport have been merged to one called DicomRtImportExport, and the two logic classes were also merged quite simply. Can you please do the same for SRO imort/export too? Thanks!

2014-12-11 14:49 Csaba Pinter Assigned to set to Kevin Wang Status changed from New to Accepted Implementation in two phases 1A. Select one study that contains the transform and two volumes. The SRO export plugin identifies the moving image because its parent is the transform, and the other volume will be the fixed image. Problem: a temporary study needs to be created just for export 1B. Select only the transform. The SRO plugin identifies the moving image because its parent is the transform, and pops up a dialog with a short message and single combobox to select the fixed image.

  1. Multi-select nodes by checkboxes (or multi-select): Select the transform and two volumes. The SRO plugin does the same as in 1A, but the tree doesn't have to be reorganized. Problem: Checkboxes and multi-selection is not implemented. I suggest doing 1A or 1B first (1B is probably better), then once I implemented the multi-selection or the checkboxes, go with option 2.

Export volumes from SRO plugin: As one plugin needs to export all the objects that reference each other (so that the UIDs can be connected), the SRO plugin has to claim the volume nodes too for export, with a reasonable confidence (so that the SRO plugin has the higher combined confidence with a transform and two volumes, but ScalarVolume has higher confidence when choosing volumes only). So the SRO plugin has to export these volumes in one way or the other

  1. Call ScalarVolumePlugin::export() Any DICOM plugin can be accessed from python by its name, which is known. Problem: Need to know the series instance UIDs of the expored volumes (read the file back maybe? Not quite elegant).
  2. Call the Plastimatch exporter just as the RT plugin does.

2014-12-11 15:16 Kevin Wang I think the current dicom export plugin mechanism needs a bit improvement. this dicom plugin framework works fine for import but not for export as during export all the UIDs have to be created using different plugins and exchanged to other plugins for reference.

I propose to have a more feature-rich dicom export module, in which the patient, study and series dicom modules can be created and all the UIDs are stored centrally. on the other side, we will have much leaner export plugin which takes the patient, study and series meta data generated by dicom export module and write out the specific dicom files.

I think it would be good to discuss this with @gregsharp and @pieper.

cpinter commented 5 years ago

Questions:

cpinter commented 5 years ago

To identify the volumes related to the registration, it would be needed to update the registration modules to add node references from the transform to the fixed and moving volumes. This involves adding CLI features so that BRAINSFit can do this as well.

cpinter commented 5 years ago

For reference, related PRs: https://github.com/Slicer/SlicerExecutionModel/pull/109 https://github.com/Slicer/Slicer/pull/1120 https://github.com/BRAINSia/BRAINSTools/pull/426

Slicer commits: https://github.com/Slicer/Slicer/commit/4ad9ed17f3531237d9a378241ee106cd326a6175 https://github.com/Slicer/Slicer/commit/62a9f9aeb1e90fb03264147635be111d2669eb20 https://github.com/Slicer/Slicer/commit/8301c8c58341cd86946572ca21485c6369ac8e2f https://github.com/Slicer/Slicer/commit/fea81f73f0ad6a2f77c0849fea71b78d7f78ba5e

More commits to come in Elastix, SlicerIGT and SlicerRT.

cpinter commented 5 years ago

https://github.com/SlicerRt/SlicerRT/commit/cae80e544fd970ee9b7c96eca84eb6fdfdc136d2 https://github.com/SlicerIGT/SlicerIGT/commit/258d197eb3daebec77c3196923316c64f5719ea1 https://github.com/lassoan/SlicerElastix/commit/9b0a159986e29ee61a4ec1615f5ad0d76ca0341b

cpinter commented 5 years ago

Information about SRO export of commercial software by Greg: "In both Eclipse and MIM, the Registered RCS (i.e. Frame of Reference of the registration object) is set to the Frame of Reference of one of the images.

In the case of Eclipse, they require the Source RCS to have a different frame of reference from the Registered RCS. The Referenced Image Sequence attribute is omitted.

In MIM it is allowed for the Source RCS and Registered RCS to be the same. The Referenced Image Sequence attribute is used to identify which image objects within the Source RCS are being registered. This allows to register between images which belong to different series within the same frame of reference (e.g. 4D CT)."

cpinter commented 5 years ago

DICOM export plugin is now added for SROs. The last missing piece is deformable SRO export, which will be addressed in https://github.com/SlicerRt/SlicerRT/issues/41