View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0004073 | Slicer4 | Core: MRML | public | 2015-11-02 13:53 | 2018-03-02 11:06 |
Reporter | lassoan | Assigned To | lassoan | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | |||||
Target Version | Slicer 4.5.0-1 | Fixed in Version | Slicer 4.5.0-1 | ||
Summary | 0004073: BSpline-linear composite transform becomes inconsitent when split and edited | ||||
Description | When a new-style composite bspline transform is loaded that contains a linear and bspline component, the transform is split to components, and the linear component is edited, the changes not show up in slice viewer but models and transform glyphs are updated correctly. How to reproduce:
| ||||
Tags | No tags attached. | ||||
2015-11-02 13:53
|
BSplineLinearCompositeTransform.h5 (94,088 bytes) |
Submitted a pull request with the fix: |
|
Fixed in r24688 |
|
Import 2017-06-07 23:51:09: master a8cbe3d7 2015-11-02 23:52:00 Details Diff |
BUG: Fixed transform splitting. Fixes 0004073 Fixes https://www.na-mic.org/Mantis/view.php?id=4073 Problem was that when a composite transform contained an inverse linear transform, the inverse transform was used as transformToParent. When transformToParent was later modified by the transform sliders on the GUI, transformToParent was updated, but transformFromParent was unchanged. Script to reproduce the issue: t1=vtk.vtkTransform() m1=vtk.vtkMatrix4x4() m1.SetElement(0,3,15) t1.SetMatrix(m1) t2=t1.GetInverse() print t1.GetMatrix() print t1.GetInverseFlag() print t2.GetMatrix() # this is required, otherwise the behavior will not be inconsistent print t2.GetInverseFlag() t2.Inverse() # editing the inverse transform print t1.GetMatrix() # returns ... 15 ... print t1.GetInverseFlag() # returns 0 print t2.GetMatrix() # returns ... 15 ... print t2.GetInverseFlag() # returns 0 0 on both and the matrix values are the same. It seems that if a computed inverse transform is modified then the transform pipeline becomes inconsistent. It may be the expected behavior in VTK, one should simply never modify a computed transform. I'll confirm this with David Gobbi. The solution was to always set the forward transform in the node so that when it is modified, it updates the inverse transform as well. Tested-by: Jean-Christophe Fillion-Robin <jchris.fillionr@kitware.com> From: Andras Lasso <lasso@queensu.ca> git-svn-id: http://svn.slicer.org/Slicer4/trunk@24688 3bd1e089-480b-0410-8dfb-8563597acbee |
||
mod - Libs/MRML/Core/Testing/NonLinearTransformScene.mrml | Diff File | ||
add - Libs/MRML/Core/Testing/TestData/BSplineLinearCompositeTransform.h5 | Diff File | ||
mod - Libs/MRML/Core/Testing/vtkMRMLNonlinearTransformNodeTest1.cxx | Diff File | ||
mod - Libs/MRML/Core/vtkMRMLTransformNode.cxx | Diff File | ||
mod - Libs/MRML/Core/vtkMRMLTransformNode.h | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2015-11-02 13:53 | lassoan | New Issue | |
2015-11-02 13:53 | lassoan | Status | new => assigned |
2015-11-02 13:53 | lassoan | Assigned To | => alexy |
2015-11-02 13:53 | lassoan | File Added: BSplineLinearCompositeTransform.h5 | |
2015-11-02 17:11 | lassoan | Assigned To | alexy => lassoan |
2015-11-02 18:18 | lassoan | Note Added: 0013518 | |
2015-11-02 18:33 | jcfr | Target Version | => Slicer 4.5.0-1 |
2015-11-02 19:29 | jcfr | Note Added: 0013519 | |
2015-11-02 19:29 | jcfr | Status | assigned => resolved |
2015-11-02 19:29 | jcfr | Fixed in Version | => Slicer 4.5.0-1 |
2015-11-02 19:29 | jcfr | Resolution | open => fixed |
2017-06-10 08:51 | jcfr | Changeset attached | => Slicer master a8cbe3d7 |
2018-03-02 11:06 | jcfr | Status | resolved => closed |