View Issue Details

IDProjectCategoryView StatusLast Update
0003091Slicer4Core: CLI infrastructurepublic2017-06-07 23:27
Reporterinorton Assigned Tomillerjv  
PriorityhighSeveritymajorReproducibilityhave not tried
Status closedResolutionfixed 
Product Version 
Target VersionSlicer 4.3.1Fixed in VersionSlicer 4.3.1 
Summary0003091: CLI / BRAINSFit do not place moving volume under transform...
Description

...after registration. I follow the normal steps for registration, the registration proceeds and completes, but the moving volume is not placed under the new transform.

Additional Information

Windows 7 64-bit, Slicer nightly 2013-04-24

Confirmed in Win. 64-bit 2013-07-20 nightly.

TagsNo tags attached.

Activities

pieper

pieper

2013-07-23 13:02

administrator   ~0009177

Reminder sent to: millerjv

Will this be fixable for the release?

http://www.na-mic.org/Bug/view.php?id=3091

jcfr

jcfr

2013-07-23 13:22

administrator   ~0009178

@Jim: From Isaiah Norton during 07/23/2013 Devel hangout: This seems like a release blocker to me, is it on the roadmap?: http://www.na-mic.org/Bug/view.php?id=3091

millerjv

millerjv

2013-07-25 08:08

developer   ~0009189

BrainsFit is a separate repository. Not sure I have access to submit a patch directly.

Not seeing anything obvious in the BrainsFit.xml file.

Does data hierarchy get modified correctly in the AffineRegistration module on your system?

jcfr

jcfr

2013-07-25 08:16

administrator   ~0009191

@Jim: If needed, you could submit a pull request to https://github.com/BRAINSia/BRAINSTools

millerjv

millerjv

2013-07-25 08:25

developer   ~0009192

I think the problem is between the CLIModuleLogic and the ApplicationLogic. CLIModule logic relies on being able to send a string to the ApplicationLogic via the RequestModified() method. The string is a set of Tcl commands to modify the hierarchy.

I need to dig through some git history.

millerjv

millerjv

2013-07-25 08:36

developer   ~0009193

Looks like this never worked in Slicer4 for any of the registration modules.

There is code in Slicer3 in vtkSlicerApplicationLogic::ProcessModified() that tries to cast the object to a vtkStringArray. If the cast is successful, then it assumes the StringArray is a set of Tcl commands to execute.

Slicer4 does not have this code.

jcfr

jcfr

2013-07-25 09:15

administrator   ~0009194

Could you post links to the code that was in charge of placing the moving volume is under the new transform?

millerjv

millerjv

2013-07-25 09:32

developer   ~0009195

The code here used to execute strings passes through RequestModified()

https://github.com/Slicer/Slicer/blob/d597c5204220bea3b961f2746313f2f16eac6dde/Base/Logic/vtkSlicerApplicationLogic.cxx#L1147-L1171

The code that passed the string to reorganize the hierarchy is still in Slicer4

https://github.com/Slicer/Slicer/blob/master/Base/QTCLI/vtkSlicerCLIModuleLogic.cxx#L2135-L2145


I think there used to be other places in Slicer3 where we would pass a string through RequestModified() to trigger a script/string to be executed in the main thread.


If there is not a general way to add back the "string script through RequestModified()" capability, then in this case, we can add specific methods to manage the editing of the hierarchy.

millerjv

millerjv

2013-07-25 11:30

developer   ~0009199

Jc recommended looking at the InvokeEventWithDelay() that was introduced in r22195 and r22196 to communicate the request to reorganize the hierarchy from the processing thread to the gui thread.

jcfr

jcfr

2013-07-25 11:40

administrator   ~0009200

To invoke event from a thread, may be the mechanism implemented by Julien could be leveraged:

See http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&revision=22195
and http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&revision=22196

millerjv

millerjv

2013-08-02 06:47

developer   ~0009352

Patch r22254 restores the transform hierarchy editing capability that was available in Slicer3 to Slicer4.

Tested on the legacy "RigidRegistration" module.

BrainsFit registration currently crashes for me using the tumor Sample Data for an unrelated reason (down in ITK when loading libraries).

jcfr

jcfr

2013-08-27 12:24

administrator   ~0009644

@Jim: Could you work with Hans and provide him instruction to reproduce the crash. Thks

jcfr

jcfr

2013-09-17 12:24

administrator   ~0009978

@Jim: Could you have a look at there before the end of the week. The idea would be to cut the 4.3.1 on Monday next week (Sept 23). Thanks

millerjv

millerjv

2013-09-23 11:49

developer   ~0010063

This is now working fine with BrainsFit. Crash issue must have been resolved during a rebuild.

millerjv

millerjv

2013-09-23 11:49

developer   ~0010064

Resolved as in note 9352.

inorton

inorton

2013-09-24 12:46

developer   ~0010079

Thanks.

Related Changesets

Slicer: 2145-support-for-installing-extension-from-file 26662282

2013-08-02 10:44:20

millerjv

Details Diff
BUG: "reference" attributes on transform were not editting scene

In Slicer3, then an output transform of a CLI had a "reference",
the MRML scene would be editted automatically to place the "reference"
image under the transform.

The implementation in Slicer3 performed the hierarchy editing by passing
a string of Tcl commands from the processing thread to the gui thread. This
approach was never ported to Slicer4.

This patch uses the Command/Observer to request that an event be
issued in the main thread. In this case, the event is one to edit
the transform hierarchy. The details of how the transform hierarchy
is be editted are encoded in a callback function. Two layers of callback
functions are used. One layer is a generic callback function which
accepts another callback in its calldata. It then delegates to that
second callback. In this manner, the same structure can be used
for other hierarchy edits by switching the callback passed as calldata.
The second callback is a one shot callback. The first callback will
delete the second callback upon completion.

This patch should resolve bug 0003091. Unfortunately, I cannot test it on
my system as BrainsFit crashes for a different reason. But this patch
does restore the transform hierarchy behavior for the RigidRegistration
module accessible under "Legacy" modules.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22254 3bd1e089-480b-0410-8dfb-8563597acbee
mod - Base/QTCLI/vtkSlicerCLIModuleLogic.cxx Diff File
mod - Base/QTCLI/vtkSlicerCLIModuleLogic.h Diff File

Issue History

Date Modified Username Field Change
2013-04-26 08:02 inorton New Issue
2013-04-26 08:02 inorton Status new => assigned
2013-04-26 08:02 inorton Assigned To => millerjv
2013-07-22 11:35 inorton Priority normal => high
2013-07-22 11:35 inorton Severity minor => major
2013-07-22 11:35 inorton Additional Information Updated
2013-07-23 12:59 pieper Target Version => Slicer 4.3.0
2013-07-23 13:02 pieper Note Added: 0009177
2013-07-23 13:22 jcfr Note Added: 0009178
2013-07-25 08:08 millerjv Note Added: 0009189
2013-07-25 08:16 jcfr Note Added: 0009191
2013-07-25 08:25 millerjv Note Added: 0009192
2013-07-25 08:36 millerjv Note Added: 0009193
2013-07-25 09:15 jcfr Note Added: 0009194
2013-07-25 09:32 millerjv Note Added: 0009195
2013-07-25 11:30 millerjv Note Added: 0009199
2013-07-25 11:40 jcfr Note Added: 0009200
2013-08-02 06:47 millerjv Note Added: 0009352
2013-08-27 12:24 jcfr Note Added: 0009644
2013-09-02 21:15 jcfr Target Version Slicer 4.3.0 => Slicer 4.3.1
2013-09-17 12:24 jcfr Note Added: 0009978
2013-09-23 11:49 millerjv Note Added: 0010063
2013-09-23 11:49 millerjv Note Added: 0010064
2013-09-23 11:49 millerjv Status assigned => resolved
2013-09-23 11:49 millerjv Resolution open => fixed
2013-09-24 12:46 inorton Note Added: 0010079
2013-09-24 12:46 inorton Status resolved => closed
2013-09-24 12:46 inorton Fixed in Version => Slicer 4.3.1
2017-06-07 23:27 millerjv Changeset attached => Slicer 2145-support-for-installing-extension-from-file 26662282