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

Author Committer Branch Timestamp Parent
millerjv millerjv 2145-support-for-installing-extension-from-file 2013-08-02 10:44:20 2145-support-for-installing-extension-from-file 4d2dd723
Affected Issues 0003091: CLI / BRAINSFit do not place moving volume under transform...
Changeset

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