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

BUG: If slice thickness cannot be calculated, default to image slice spacing #81

Closed Sunderlandkyl closed 6 years ago

cpinter commented 6 years ago

@Sunderlandkyl Can you please fix this? Thanks! http://slicer.cdash.org/viewBuildError.php?buildid=1189651

Sunderlandkyl commented 6 years ago

@cpinter Fixed in 1aac86b9c0b29c6e7501477f39da2dec17540871

I noticed something odd however. Getting the spacing of the associated volume still fails sometimes since the image is not always found.

Specifically, this line: https://github.com/SlicerRt/SlicerRT/blob/master/DicomRtImportExport/Logic/vtkSlicerDicomRtImportExportModuleLogic.cxx#L915-L916 Will return vtkMRMLSubjectHierarchyNode::INVALID_ITEM_ID occasionally.

Is the load order of dicom static, or is the volume sometimes loaded after the RTStruct?

lassoan commented 6 years ago

Loading order is random (or the user may choose not to load it at all). However, you may retrieve information about the volume from the DICOM database.

cpinter commented 6 years ago

There's also a way to deal with the random loading order for the RT image. You may do the same for this case.