View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003611 | Slicer4 | Module Transforms | public | 2014-03-03 13:11 | 2017-06-10 08:51 |
Reporter | lassoan | Assigned To | lassoan | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | |||||
Target Version | Slicer 4.4.0 | Fixed in Version | Slicer 4.4.0 | ||
Summary | 0003611: Inverse transforms are not updated in the transform nodes | ||||
Description | Start Slicer and enter the following commands: tn=slicer.vtkMRMLLinearTransformNode() The result of the first print is correct (the inverse transform has -20 translation), but the result of the second print is incorrect (the inverse transform should be -30 but it remains -20 instead), because the inverse transform is not updated. When the Transforms module GUI is active then as a side effect the inverse transform of linear transforms get updated. A solution could be to check the modified time of the inverse transform in the get function of a transform. If the inverse transform is more recent then the transform has to be recomputed. | ||||
Tags | No tags attached. | ||||
I'm working on this, probably a patch will be ready today or tomorrow. |
|
Pull request with the fix submitted: |
|
Fix merged into the trunk: |
|
Closing resolved issues that have not been updated in more than 3 months. |
|
Import 2017-06-07 23:51:09: master 29dc6a68 2014-03-19 13:41:09 Details Diff |
ENH: Several fixes and improvements in transform handling Major fixes: * Added mechanism to prevent immediate invocation of TransformModified events (similarly to Modified events) to allow atomic changes of transforms and prevent multiple event invocations (fixes 0003610, 0003611). * Fixed vtkITKBSplineTransform inverse computation (the bulk component was ignored in the inverse computation due to a shadow variable) * Fixed DeepCopy of vtkITKBSplineTransform.cxx (InternalDeepCopy method had to be implemented) * Use vtkTransform's ability to compute inverse transforms instead of keeping separate transforms for forward and inverse transforms (still kept the two member variables in the transform node base class to allow storing of forward and inverse transform if they are both computed, e.g., some Demons registration provides both the forward and inverse transforms as outputs). * Fixed ReadWriteAsTransformToParent logic in the storage node class (as inverse warp transforms usually cannot be written, the flag should point to the forward transform class). For convenience, the flag is updated automatically when a To/FromParentTransform is set in the transform node. * Fixed transform node copy: now a true deep copy is performed (earlier only the pointer of the transforms were copied, therefore changing a transform in a node changed the copied node, too) * Removed vtkMRMLNonlinearTransformNode, as non-linear transforms are not special cases anymore: the base transform class can manage them the same way as linear transforms. * Changed Get/SetMatrixTransformToParent and Get/SetMatrixTransformFromParent method to make it clear that it makes a copy of the input and output, so changing a matrix is only possible by using the Set... method (and not Get...()->DeepCopy(...)). Kept the old functions to prevent build errors, but they are deprecated and a warning is logged if they are used (as the behavior of the Get... function is changed from a shallow copy to a deep copy). This API change required changing of a lot of file in the Slicer core and extensions. Minor fixes: * Made vtkMRMLTransformNode non-abstract: this is the class that can handle arbitrarily complex composite transforms (e.g., grid transform hardened on a bspline transform). * Fixed invalid NonLinearTransformScene.mrml scene: wrong storage node ref ID caused warnings in the tests * Changed the Bspline-f-m.tfm test data to include larger bulk component to make errors more detectable * Added tests for composite transforms (e.g., hardened combination of grid and bspline transform) * Split the transform node's huge read/write methods to separate smaller methods (one for each transform type) * Added the option of loading a .mha file as a grid transform Extensions updated according to the API change: OpenIGTLinkIF, SlicerIGT, SlicerRT, and TransformVisualizer. See details at: https://github.com/openigtlink/OpenIGTLinkIF/pull/25 https://github.com/SlicerIGT/FiducialRegistrationWizard/pull/14 https://github.com/SlicerIGT/BreachWarning/pull/1 https://github.com/SlicerIGT/PivotCalibration/pull/13 https://github.com/SlicerIGT/TransformFusion/pull/2 https://www.assembla.com/spaces/slicerrt/tickets/563 Tests performed: * All automatic tests passed (except those that are known to fail in the nightly builds) * Load MRBrainTumor1 & MRBrainTumor2 sample * Create model of MRBrainTumor2, threshold=50 * Linear registration with BRAINS (fixed: MRBrainTumor1 & moving: MRBrainTumor2) * VERIFY: the resampled output image should look the same as the dynamically transformed moving volume, checked on several slices * Save the transform as tfm from file, load the transform from file, apply the transform to the moving image * VERIFY: the resampled output image should look the same as the dynamically transformed moving volume * Apply transform to the model * VERIFY: model is deformed in the 3D view, aligned with the volume slices * Harden transform to the model * VERIFY: model in the 3D view doesn’t change, model slice intersections are aligned with the volume * Harden the transform on the volume * VERIFY: the image doesn’t change too much * BSpline registration with BRAINS (fixed: MRBrainTumor1 & moving: MRBrainTumor2) * VERIFY: the resampled output image should look the same as the dynamically transformed moving volume * Save the transform as tfm from file, load the transform from file, apply the transform to the moving image * VERIFY: the resampled output image should look the same as the dynamically transformed moving volume * Apply transform to the model * VERIFY: model is deformed in the 3D view, aligned with the volume slices * Harden transform to the model * VERIFY: model in the 3D view doesn’t change, model slice intersections are aligned with the volume * Insert linear transform between bspline and volume, move sliders * VERIFY: volume deforms as it travels through the BSpline region * Harden the transform on the volume * VERIFY: the image doesn’t change too much * Create a two markup list (each having 15 points), all but 3 in the same position * Landwarp registration with Plastimatch with the markup lists, save the displacement field to file * Load the displacement field * VERIFY: the resampled output image should look the same as the dynamically transformed moving volume * Apply the displacement field to the moving fiducials * VERIFY: all the fiducials are now in the same position * Harden the transform on the fiducials * VERIFY: the fiducials don’t move * Apply transform to the model * VERIFY: model is deformed in the 3D view, aligned with the volume slices * Harden transform to the model * VERIFY: model in the 3D view doesn’t change, model slice intersections are aligned with the volume * Harden the transform on the volume * VERIFY: the image doesn’t change too much * Load MRI head, create new linear transform, apply to the volume, move the sliders * VERIFY: the volume moves in the slice viewer, the numbers change in the matrix * Click Invert, Identity * VERIFY: volume jumps to other side, to the center * Connect to an OpenIGTLink server, apply a transform to a volume * VERIFY: transform matrix values updated in transforms module, volume moves git-svn-id: http://svn.slicer.org/Slicer4/trunk@23008 3bd1e089-480b-0410-8dfb-8563597acbee |
||
mod - Base/Logic/vtkSlicerApplicationLogic.cxx | Diff File | ||
mod - Base/QTCore/qSlicerSlicer2SceneReader.cxx | Diff File | ||
mod - Base/QTCore/qSlicerXcedeCatalogReader.cxx | Diff File | ||
mod - Libs/MRML/Core/CMakeLists.txt | Diff File | ||
mod - Libs/MRML/Core/Testing/NonLinearTransformScene.mrml | Diff File | ||
mod - Libs/MRML/Core/Testing/TestData/Bspline-f-m.tfm | Diff File | ||
mod - Libs/MRML/Core/Testing/vtkMRMLLinearTransformNodeEventsTest.cxx | Diff File | ||
mod - Libs/MRML/Core/Testing/vtkMRMLNonlinearTransformNodeTest1.cxx | Diff File | ||
mod - Libs/MRML/Core/Testing/vtkMRMLTransformNodeTest1.cxx | Diff File | ||
mod - Libs/MRML/Core/Testing/vtkMRMLTransformableNodeOnNodeReferenceAddTest.cxx | Diff File | ||
mod - Libs/MRML/Core/Testing/vtkMRMLTransformableNodeTest1.cxx | Diff File | ||
mod - Libs/MRML/Core/vtkMRMLBSplineTransformNode.cxx | Diff File | ||
mod - Libs/MRML/Core/vtkMRMLBSplineTransformNode.h | Diff File | ||
mod - Libs/MRML/Core/vtkMRMLCoreTestingMacros.h | Diff File | ||
mod - Libs/MRML/Core/vtkMRMLGridTransformNode.cxx | Diff File | ||
mod - Libs/MRML/Core/vtkMRMLGridTransformNode.h | Diff File | ||
mod - Libs/MRML/Core/vtkMRMLLinearTransformNode.cxx | Diff File | ||
mod - Libs/MRML/Core/vtkMRMLLinearTransformNode.h | Diff File | ||
mod - Libs/MRML/Core/vtkMRMLScene.cxx | Diff File | ||
mod - Libs/MRML/Core/vtkMRMLTransformNode.cxx | Diff File | ||
mod - Libs/MRML/Core/vtkMRMLTransformNode.h | Diff File | ||
mod - Libs/MRML/Core/vtkMRMLTransformStorageNode.cxx | Diff File | ||
mod - Libs/MRML/Core/vtkMRMLTransformStorageNode.h | Diff File | ||
mod - Libs/MRML/Logic/vtkMRMLSliceLogic.cxx | Diff File | ||
mod - Libs/MRML/Widgets/Testing/qMRMLNodeComboBoxTest1.cxx | Diff File | ||
mod - Libs/MRML/Widgets/Testing/qMRMLNodeComboBoxTest2.cxx | Diff File | ||
mod - Libs/MRML/Widgets/Testing/qMRMLNodeSelectorTest1.cxx | Diff File | ||
mod - Libs/MRML/Widgets/qMRMLLinearTransformSlider.cxx | Diff File | ||
mod - Libs/MRML/Widgets/qMRMLMatrixWidget.cxx | Diff File | ||
mod - Libs/MRML/Widgets/qMRMLUtils.cxx | Diff File | ||
mod - Libs/vtkITK/vtkITKBSplineTransform.cxx | Diff File | ||
mod - Libs/vtkITK/vtkITKBSplineTransform.h | Diff File | ||
mod - Modules/CLI/ACPCTransform/ACPCTransform.cxx | Diff File | ||
mod - Modules/Loadable/ModelMirror/Logic/vtkModelMirrorLogic.cxx | Diff File | ||
mod - Modules/Loadable/Models/Logic/vtkSlicerModelsLogic.cxx | Diff File | ||
mod - Modules/Loadable/Transforms/Testing/Cxx/qSlicerTransformsModuleWidgetTest.cxx | Diff File | ||
mod - Modules/Loadable/Transforms/qSlicerTransformsModuleWidget.cxx | Diff File | ||
mod - Modules/Loadable/Transforms/qSlicerTransformsReader.cxx | Diff File | ||
mod - Modules/Scripted/Endoscopy/Endoscopy.py | Diff File | ||
mod - SuperBuild.cmake | Diff File | ||
mod - Testing/TextureModel.py | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2014-03-03 13:11 | lassoan | New Issue | |
2014-03-05 02:44 | lassoan | Status | new => assigned |
2014-03-05 02:44 | lassoan | Assigned To | => lassoan |
2014-03-05 02:44 | lassoan | Note Added: 0010681 | |
2014-03-05 14:45 | lassoan | Note Added: 0010685 | |
2014-03-19 09:56 | lassoan | Note Added: 0011452 | |
2014-03-19 09:57 | lassoan | Status | assigned => resolved |
2014-03-19 09:57 | lassoan | Resolution | open => fixed |
2014-03-26 08:50 | jcfr | Fixed in Version | => Slicer 4.4.0 |
2014-03-26 08:50 | jcfr | Target Version | => Slicer 4.4.0 |
2014-09-17 22:59 | jcfr | Status | resolved => closed |
2014-09-17 23:01 | jcfr | Note Added: 0012566 | |
2017-06-10 08:51 | lassoan | Changeset attached | => Slicer master 29dc6a68 |