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

ENH: Corrent transformation from patient support frame to fixed referenced frame #166

Closed MichaelColonel closed 3 years ago

MichaelColonel commented 3 years ago

Same as RtImportExport

Tests after the fix: 1 - qSlicerBeamsModuleGenericTest (Failed) 2 - qSlicerBeamsModuleWidgetGenericTest (Failed) 39 - vtkSlicerSegmentComparisonModuleLogicTest_EclipseProstate_Transformed (Failed) 47 - py_nomainwindow_PlmProtonDoseEngineTest (Failed)

cpinter commented 3 years ago

Can you please provide a description to why you knew it was wrong?

Also the following tests should not fail: 39 - vtkSlicerSegmentComparisonModuleLogicTest_EclipseProstate_Transformed (Failed) 47 - py_nomainwindow_PlmProtonDoseEngineTest (Failed) @Sunderlandkyl do you have capacity to check these?

MichaelColonel commented 3 years ago

Here is the picture from the IEC 61217:2011 standard.

In order to get patient support frame from fixed referenced frame one must rotate around z-axis on a positive angle in counter-clockwise direction. In our case we have inverse transformation from patient support frame into fixed reference frame. Basically the same transformation matrix, but with negative angle. Cosine elements are the same, sine elements are negative.

MichaelColonel commented 3 years ago

39 - vtkSlicerSegmentComparisonModuleLogicTest_EclipseProstate_Transformed (Failed)

This is fixed in #163, but it hasn't been merged yet.

cpinter commented 3 years ago

Perfect, thank you!