View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002725 | Slicer4 | Core: MRML | public | 2012-11-04 19:22 | 2012-11-15 16:58 |
Reporter | lassoan | Assigned To | alexy | ||
Priority | high | Severity | block | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | Slicer 4.2.0 | ||||
Target Version | Slicer 4.2.1 | Fixed in Version | Slicer 4.2.1 | ||
Summary | 0002725: Transform hierarchy is not saved in the scene file | ||||
Description | Junichi found the following regression: transform hierarchies are not saved in the scene file. It is reproducible on the latest nightly build (Slicer-4.2.0-2012-11-02-win-amd64.exe) on Windows and Mac. How to reproduce:
In the saved file there are no transform hierarchy nodes, so probably the transformation hierarchy saving is broken. | ||||
Tags | No tags attached. | ||||
The saving looks OK (the transformNodeRef attribute of the LinearTransform node is correct in the file.) So, probably the loading is broken. It may be yet another consequence of the fragile implementation of vtkMRMLTransformableNode::SetAndObserveTransformNodeID, which simply returns without doing anything if it detects that the scene is not yet set! This is highly error-prone. See also http://www.na-mic.org/Bug/view.php?id=2530#c6356 and 0002539. |
|
Checked with the debugger. The problem is indeed caused by the same vtkMRMLTransformableNode::SetAndObserveTransformNodeID implementation issue as reported in 0002530 and 0002539. vtkMRMLScene::LoadIntoScene calls the XML parser, which eventually calls vtkMRMLTransformableNode::ReadXMLAttributes, which calls vtkMRMLTransformableNode::SetAndObserveTransformNodeID, that simply drops the passed transformNodeID value. Potential fix: if vtkMRMLTransformableNode::SetAndObserveTransformNodeID is called and the scene is not yet set then store the node ID in a member variable. When later the scene is set update the node reference (retrieve the pointer, add observer, etc.). |
|
Added a ticket for tracking the long-term solution of the issue, see 0002727 |
|
Reassigning to Julien since it is related to his change of adding references |
|
See http://slicer-users.65878.n3.nabble.com/transformation-won-t-load-on-Slicer-4-2-td4025522.html |
|
From Andras investigation, it looks like it is a regression from r21175: Indeed, the behavior of SetAndObserveXXXNodeID() should observe a node ID regardless of the presence of a Scene. Note: the commit to fix this current issue should add a unit test to ensure it doesn't happen again. |
|
Fixed setting transform node reference. |
|
The test was not added using "add_test". Commit r21333 fixed that. Following Andras steps, I also confirm that the fix works. |
|
Tested on Slicer 4.2.0-2012-11-02 (Win64) and it works well. |
|
Date Modified | Username | Field | Change |
---|---|---|---|
2012-11-04 19:22 | lassoan | New Issue | |
2012-11-04 19:22 | lassoan | Status | new => assigned |
2012-11-04 19:22 | lassoan | Assigned To | => alexy |
2012-11-05 03:44 | lassoan | Note Added: 0007045 | |
2012-11-05 04:50 | lassoan | Note Added: 0007046 | |
2012-11-05 05:03 | lassoan | Note Added: 0007047 | |
2012-11-06 04:56 | alexy | Relationship added | related to 0002530 |
2012-11-06 04:56 | alexy | Relationship added | related to 0002539 |
2012-11-06 04:57 | alexy | Note Added: 0007069 | |
2012-11-06 04:57 | alexy | Assigned To | alexy => finetjul |
2012-11-06 06:47 | jcfr | Priority | normal => high |
2012-11-06 06:47 | jcfr | Target Version | => Slicer 4.2.1 |
2012-11-06 06:49 | jcfr | Note Added: 0007071 | |
2012-11-09 03:33 | finetjul | Note Added: 0007130 | |
2012-11-09 03:45 | jcfr | Assigned To | finetjul => alexy |
2012-11-09 05:23 | alexy | Note Added: 0007133 | |
2012-11-09 05:23 | alexy | Status | assigned => resolved |
2012-11-09 05:23 | alexy | Resolution | open => fixed |
2012-11-09 05:25 | jcfr | Fixed in Version | => Slicer 4.2.1 |
2012-11-09 06:05 | jcfr | Note Added: 0007134 | |
2012-11-15 16:58 | lassoan | Note Added: 0007267 | |
2012-11-15 16:58 | lassoan | Status | resolved => closed |