Import 2017-06-07 23:51:09: master a0c599a6

Author Committer Branch Timestamp Parent
jcfr jcfr master 2016-06-08 16:08:41 master 1642a45e
Changeset

ENH: Add support for managing slice orientation presets

This commit generalizes the concept of slice orientation known as
Axial, Sagittal and Coronal so that it is possible to add, rename and
delete new ones.

Default presets (Axial, Sagittal and Coronal) are associated to a default
slice node in the application logic.

Handle orientation as 3x3 because maintaining sliceOrigin information
in matrices that are orientation presets is not relevant.

Notes:

(1) Mark Get/SetOrientationReference as protected: These methods are only
used internally and could ultimately be removed by refactoring
"RotateToVolumePlane()"

(2) Remove unused SetOrientationString: The method is not used in any Slicer
extensions.

(3) Explicitly setting the orienation string to "Reformat" is
not needed anymore because "GetOrientation()" or "GetOrientationString()"
will return "Reformat" if the SliceToRAS matrix is not one of the preset.

(4) For sake of consistency, in the RenameSliceOrientationPreset, the
orientation reference is also renamed.

(5) In "Copy()" method, Orientation and OrientationReference are set
after the presets.

(6) Remove unused SetOrientationToReformat() function. At the time of this
commit, it was used only in "SlicerRT/ExternalBeamPlanning/Logic/vtkSlicerExternalBeamPlanningModuleLogic"
and the maintainer of the module planned on removing the call.

Co-authored-by: Jean-Christophe Fillion-Robin <jchris.fillionr@kitware.com>
Co-authored-by: Andras Lasso <lasso@queensu.ca>

From: Davide Punzo <punzodavide@hotmail.it>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@25171 3bd1e089-480b-0410-8dfb-8563597acbee

mod - Applications/SlicerApp/Testing/Python/CMakeLists.txt Diff File
add - Applications/SlicerApp/Testing/Python/SlicerOrientationSelectorTest.py Diff File
mod - Libs/MRML/Core/Testing/vtkMRMLSceneTest2.cxx Diff File
mod - Libs/MRML/Core/Testing/vtkMRMLSliceNodeTest1.cxx Diff File
mod - Libs/MRML/Core/vtkMRMLCoreTestingUtilities.cxx Diff File
mod - Libs/MRML/Core/vtkMRMLSliceNode.cxx Diff File
mod - Libs/MRML/Core/vtkMRMLSliceNode.h Diff File
mod - Libs/MRML/Logic/Testing/Cxx/vtkMRMLApplicationLogicTest1.cxx Diff File
mod - Libs/MRML/Logic/vtkMRMLApplicationLogic.cxx Diff File
mod - Libs/MRML/Logic/vtkMRMLSliceLayerLogic.cxx Diff File
mod - Libs/MRML/Logic/vtkMRMLSliceLogic.cxx Diff File
mod - Libs/MRML/Widgets/Testing/qMRMLSceneDisplayableModelTest2.cxx Diff File
mod - Libs/MRML/Widgets/Testing/qMRMLSceneModelHierarchyModelTest2.cxx Diff File
mod - Libs/MRML/Widgets/Testing/qMRMLSceneTransformModelTest2.cxx Diff File
mod - Libs/MRML/Widgets/Testing/qMRMLSliceControllerWidgetEventTranslatorPlayerTest1.cxx Diff File
mod - Libs/MRML/Widgets/Testing/qMRMLSliceControllerWidgetTest.cxx Diff File
mod - Libs/MRML/Widgets/Testing/qMRMLSliceWidgetTest1.cxx Diff File
mod - Libs/MRML/Widgets/Testing/qMRMLSliceWidgetTest2.cxx Diff File
mod - Libs/MRML/Widgets/Testing/qMRMLTreeViewEventTranslatorPlayerTest1.cxx Diff File
mod - Libs/MRML/Widgets/Testing/qMRMLTreeViewTest1.cxx Diff File
mod - Libs/MRML/Widgets/Testing/qMRMLVolumeThresholdWidgetEventTranslatorPlayerTest1.cxx Diff File
mod - Libs/MRML/Widgets/Testing/qMRMLVolumeThresholdWidgetTest1.cxx Diff File
mod - Libs/MRML/Widgets/Testing/qMRMLVolumeThresholdWidgetTest2.cxx Diff File
mod - Libs/MRML/Widgets/Testing/qMRMLWindowLevelWidgetEventTranslatorPlayerTest1.cxx Diff File
mod - Libs/MRML/Widgets/Testing/qMRMLWindowLevelWidgetTest1.cxx Diff File
mod - Libs/MRML/Widgets/qMRMLSliceControllerWidget.cxx Diff File
mod - Libs/MRML/Widgets/qMRMLSliceControllerWidget_p.h Diff File
mod - Libs/MRML/Widgets/qMRMLSliceInformationWidget.cxx Diff File
mod - Modules/Loadable/Reformat/qSlicerReformatModuleWidget.cxx Diff File
mod - Modules/Loadable/Units/Testing/Cxx/vtkSlicerUnitsLogicTest1.cxx Diff File