View Issue Details

IDProjectCategoryView StatusLast Update
0003715Slicer4Module SubjectHierarchypublic2014-07-14 09:18
Reporterjcfr Assigned Topinter  
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Product Version 
Target VersionSlicer 4.4.0Fixed in VersionSlicer 4.4.0 
Summary0003715: Fix failing test vtkSlicerSubjectHierarchyModuleLogicTest
Description

Slicer r23245

Start 276: vtkSlicerSubjectHierarchyModuleLogicTest

276: Test command: /home/jchris/Projects/Slicer-2-SuperBuild-Release/Slicer-build/Slicer "--launcher-no-splash" "--launch" "/home/jchris/Projects/Slicer-2-SuperBuild-Release/Slicer-build/bin/qSlicerSubjectHierarchyModuleCxxTests" "vtkSlicerSubjectHierarchyModuleLogicTest"
276: Test timeout computed to be: 1800
276: Failed to get associated model hierarchy node for model (directly associated hierarchy node in nested association)
276: 'TestNodeAssociations' call not successful.
276: 'TestExpand' call not successful.
1/1 Test 0000276: vtkSlicerSubjectHierarchyModuleLogicTest ...***Failed 1.05 sec

TagsNo tags attached.

Activities

jcfr

jcfr

2014-05-27 19:27

administrator   ~0011966

@Csaba: In the TestNodeAssociations test, at line 355 [1], if this helps you to resolve the issue, it returns the subject hierarchy node (vtkMRMLSubjectHierarchyNode7) whereas the associated node (vtkMRMLModelHierarchyNode1) is probably expected:

8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----
276: vtkMRMLSubjectHierarchyNode (0x282b980)
276: Debug: Off
276: Modified Time: 9661
276: Reference Count: 2
276: Registered Events: (none)
276: ID: vtkMRMLSubjectHierarchyNode7
276: Indent: 0
276: Name: Model21_SubjectHierarchy
276: Description: (none)
276: SingletonTag: (none)
276: HideFromEditors: 0
276: Selectable: 1
276: Selected: 0
276: AssociatedNodeID: vtkMRMLModelHierarchyNode1
276: ParentNodeID: vtkMRMLSubjectHierarchyNode3
276: SortingValue: 13
276: AllowMultipleChildren: true
276: Level="Series
276: OwnerPluginName="NULL
276: OwnerPluginAutoSearch="true
276: UIDs="DICOM; MODEL21:"
8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----

[1] https://github.com/Slicer/Slicer/blob/260df3d2c91465dbcb5f1f5a97730dd31b8e378a/Modules/Loadable/SubjectHierarchy/Testing/Cxx/vtkSlicerSubjectHierarchyModuleLogicTest.cxx#L355

jcfr

jcfr

2014-05-28 00:27

administrator   ~0011967

@Csaba: This is an attempt to fix the failing test ... that brings me further but now I have issue with hardening transform.

See https://github.com/jcfr/Slicer/compare/3715-attempt-to-fix-associated-hierarchy-node-getter

pinter

pinter

2014-05-28 05:13

developer   ~0011968

Strange. The test worked for me a few days ago, and nothing changed in the SH MRML or logic since then.
Is this with VTK5 or 6?

jcfr

jcfr

2014-05-28 06:07

administrator   ~0011969

Last edited: 2014-05-28 06:09

The test is also failing using the branch [1] built against VTKv5 and also failing on the nightly dashboard for the Linux, MacOSX and Windows

In case of nested hierarchy, what is suppose to return the function:

static vtkMRMLHierarchyNode* GetAssociatedHierarchyNode(...)

For example, looking at the example of PopulateScene [2], given the node "model21", should we expect the direct parent (1) "SubjectHierarchyNode" or the grand parent (2) "ModelHierarchyNode"

If we expect (2), the hack I am doing in [3] is along the right way ...

[1] https://github.com/cpinter/Slicer/tree/subject-hierarchy-integration

[2] https://github.com/Slicer/Slicer/blob/64e40c5175634d5f423226498a67b96cb82e9558/Modules/Loadable/SubjectHierarchy/Testing/Cxx/vtkSlicerSubjectHierarchyModuleLogicTest.cxx#L91-108

[3] https://github.com/jcfr/Slicer/commit/d83c46bcede04a80de934ae0d351bc48fefc2481

jcfr

jcfr

2014-05-28 06:16

administrator   ~0011971

Additionally, checking the comment in [1], I can read:

Note: This must be used instead of vtkMRMLHierarchyNode::GetAssociatedHierarchyNode, because nested associations have been introduced to avoid conflicts.

[1] https://github.com/Slicer/Slicer/blob/64e40c5175634d5f423226498a67b96cb82e9558/Modules/Loadable/SubjectHierarchy/MRML/vtkMRMLSubjectHierarchyNode.h#L75

jcfr

jcfr

2014-05-28 06:35

administrator   ~0011972

It seems that the PopulateScene method is incorrectly creating the nested association:

ModelHierarchyNode -- SubjectHierarchyNode -- ModelNode (model22)

instead of

SubjectHierarchyNode -- ModelHierarchyNode -- ModelNode (model22)

pinter

pinter

2014-05-28 06:42

developer   ~0011973

Exactly. The nested association should look like
SubjectHierarchyNode -- ModelHierarchyNode -- ModelNode (model22)
This should be the issue then.
Thanks a lot!

jcfr

jcfr

2014-05-28 06:42

administrator   ~0011974

Arfff ... not sure to fully understand the intricacy of nested association. Would be great if you could have a look.

Thanks

jcfr

jcfr

2014-05-28 06:46

administrator   ~0011975

In fact, the code is doing the right thing .. the comment in the test was just misleading.

pinter

pinter

2014-06-30 12:38

developer   ~0012112

There was an issue with vtkMRMLHierarchyNode::GetAssociatedHierarchyNode, namely that when the UpdateAssociatedToHierarchyMap function was called before getting the associated node, subject hierarchy's GetAssociatedNode was called, not the function from the base class, which caused the nested associations not to work properly. Fixed in rev23370.

Also it was discovered that the harden transform function did not work properly, thus this test failed, because it also tested the harden transform feature of subject hierarchy. Fixed by Alex Y. in rev23391

Issue History

Date Modified Username Field Change
2014-05-27 14:27 jcfr New Issue
2014-05-27 14:27 jcfr Status new => assigned
2014-05-27 14:27 jcfr Assigned To => pinter
2014-05-27 14:27 jcfr Target Version => Slicer 4.4.0
2014-05-27 19:27 jcfr Note Added: 0011966
2014-05-28 00:27 jcfr Note Added: 0011967
2014-05-28 05:13 pinter Note Added: 0011968
2014-05-28 06:07 jcfr Note Added: 0011969
2014-05-28 06:09 jcfr Note Edited: 0011969
2014-05-28 06:16 jcfr Note Added: 0011971
2014-05-28 06:35 jcfr Note Added: 0011972
2014-05-28 06:42 pinter Note Added: 0011973
2014-05-28 06:42 jcfr Note Added: 0011974
2014-05-28 06:46 jcfr Note Added: 0011975
2014-06-30 12:38 pinter Note Added: 0012112
2014-06-30 12:38 pinter Status assigned => resolved
2014-06-30 12:38 pinter Fixed in Version => Slicer 4.4.0
2014-06-30 12:38 pinter Resolution open => fixed
2014-07-14 09:18 jcfr Status resolved => closed