Import 2017-06-07 23:51:09: master 7e41e8af

Author Committer Branch Timestamp Parent
jcfr jcfr master 2016-01-27 23:21:57 master 90876ce0
Affected Issues 0004139: Slicer crashes while doing registration using BrainsFit and creating transform output
Changeset

BUG: Fix registration addressing regression in vtkITKTransformConverter.

Fixes 0004139

This commit allows BRAINSFit registration to complete by addressing
a regression introduced in r24875 (BUG: Fix transform tests by not
using dynamic_cast in vtkITKTransformConverter)

It basically ensure the comparison of transform name includes
all derived type associated with itk::MatrixOffsetTransformBase

The python code allowing to reproduce the issue is reported below
and has been integrated into a self-test named "BRAINSFitRigidRegistrationCrashIssue4139"

8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---
import SampleData
from SampleData import SampleDataLogic
sampleDatalogic = SampleDataLogic()

fixed = sampleDatalogic.downloadMRBrainTumor1()
moving = sampleDatalogic.downloadMRBrainTumor2()

outputTransform = slicer.vtkMRMLLinearTransformNode()
slicer.mrmlScene.AddNode(outputTransform)

outputVolume = slicer.vtkMRMLScalarVolumeNode()
slicer.mrmlScene.AddNode(outputVolume)

parameters = {
'fixedVolume' : fixed,
'movingVolume' : moving,
'linearTransform' : outputTransform,
'outputVolume' : outputVolume,
'useRigid' : True
}
cmdLineNode = slicer.cli.runSync(slicer.modules.brainsfit, parameters=parameters)
8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---

Reported-by: Christian Herz <christian.herz@mevis.fraunhofer.de>
Suggested-by: Hans Johnson <hans-johnson@uiowa.edu>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@24902 3bd1e089-480b-0410-8dfb-8563597acbee

add - Applications/SlicerApp/Testing/Python/BRAINSFitRigidRegistrationCrashIssue4139.py Diff File
mod - Applications/SlicerApp/Testing/Python/CMakeLists.txt Diff File
mod - Libs/MRML/Core/vtkITKTransformConverter.h Diff File