ENH: In developer mode do not remove CLI input and output files

In developer mode do not remove CLI input and output files. This
allows re-running of CLI with the input data that normally would
have been deleted right after the CLI execution completes.

From: Andras Lasso <lasso@queensu.ca>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23572 3bd1e089-480b-0410-8dfb-8563597acbee
ENH: Reduced the chance of crashes when CLI returns result images

From: Andras Lasso <lasso@queensu.ca>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23573 3bd1e089-480b-0410-8dfb-8563597acbee
ENH: WIP - Add .h5 formated transform storage of BSplines. See #3788

Partial implementation for reading itkBSplineTransform (for ITKv4)

Mostly implemented but the transform that gets read in is identity
and not the one in the file. Probably something wrong with
this cast:

+  typedef itk::BSplineTransform< T,VTKDimension,BSPLINE_TRANSFORM_ORDER > BSplineTransformType;
+  typename BSplineTransformType::Pointer bsplineItk =
+    dynamic_cast< BSplineTransformType* >( warpTransformItk.GetPointer() );

The transformation itself is not populated with correct data,
so need to reach inside to get spacing, origin, etc.

From: Steve Pieper <pieper@bwh.harvard.edu>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23574 3bd1e089-480b-0410-8dfb-8563597acbee
ENH: Any kind of linear transform is usable as bspline bulk. See #3788

From: Andras Lasso <lasso@queensu.ca>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23575 3bd1e089-480b-0410-8dfb-8563597acbee
ENH: Implemented composite transform reading. See #3788

Not just BSpline but any combination of bspline and linear
can be read from composite transforms.

Reading of grid transforms from transform file is not implemented yet.

From: Andras Lasso <lasso@queensu.ca>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23576 3bd1e089-480b-0410-8dfb-8563597acbee
ENH: Refactored ITK-VTK transform conversion code. See #3788

Moved low-level conversion functions to separate class.
Reduced redundancy between ITKv3 and ITKv4 converters.

From: Andras Lasso <lasso@queensu.ca>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23577 3bd1e089-480b-0410-8dfb-8563597acbee
ENH: Added grid transform reading-writing from h5 file. See #3788

From: Andras Lasso <lasso@queensu.ca>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23578 3bd1e089-480b-0410-8dfb-8563597acbee
ENH: Simplified transform storage node. See #3788

From: Andras Lasso <lasso@queensu.ca>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23579 3bd1e089-480b-0410-8dfb-8563597acbee
ENH: Always send transform "from parent" to CLI. See #3788

From: Andras Lasso <lasso@queensu.ca>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23580 3bd1e089-480b-0410-8dfb-8563597acbee
ENH: Implemented inverse ITK transform reading and writing. See #3788

From: Andras Lasso <lasso@queensu.ca>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23581 3bd1e089-480b-0410-8dfb-8563597acbee
ENH: Always save transforms as FromParent. See #3788

Kept readWriteTransformAsToParent flag just for backward
compatibility, when reading an old scene.

If in the future we want to save the ToParent transform or
both FromParent and ToParent then the flag has to be added
to the storage node (and not the transform node).

From: Andras Lasso <lasso@queensu.ca>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23582 3bd1e089-480b-0410-8dfb-8563597acbee
ENH: Linear transforms now use vtkTransform for transform storage. See #3788

Main limitation was that the vtkMatrixToLinearTransform did not
have a GetInverseFlag() method.

Couple of other smaller fixes.

From: Andras Lasso <lasso@queensu.ca>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23583 3bd1e089-480b-0410-8dfb-8563597acbee
BUG: Fixed shared memory image IO error. See #3788

Due to a copy-paste error a static ITK transform was instantiated,
which broke image IO (probably some static initialization race condition).

From: Andras Lasso <lasso@queensu.ca>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23584 3bd1e089-480b-0410-8dfb-8563597acbee
COMP: Fixes vtkITKTransform classes MacOSX compilation errors. See #3788

From: Steve Pieper <pieper@bwh.harvard.edu>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23585 3bd1e089-480b-0410-8dfb-8563597acbee
BUG: Fixed crash in vtkMRMLNode reference adding

Crashed when attempting to add a new reference with NULL referenced node pointer.

Caused the vtkMRMLNodeTest1 dashboard test to fail:

http://slicer.cdash.org/testDetails.php?test=5647387&build=259092

Test: vtkMRMLNodeTest1 (Failed) 
Build: Windows7-VS2008-64bits-QT4.8.6-NoVTKDebugLeaks-NoConsole-Release (factory-south-win7.kitware) on 2014-08-16 00:08:18
Repository revision: 23570

C:\D\N\Slicer-1-build\Slicer-build\Slicer.exe "--launcher-no-splash" "--launch" "C:/D/N/Slicer-1-build/Slicer-build/bin/Release/MRMLCoreCxxTests.exe" "vtkMRMLNodeTest1"


Test outputvtkMRMLNodeTestHelper1 (00000000038A8CA0)
  Debug: Off
  Modified Time: 16
  Reference Count: 1
  Registered Events: (none)
  ID: (none)
  Indent:      0
  Name: (none)
  Description: (none)
  SingletonTag: (none)
  HideFromEditors: 0
  Selectable: 1
  Selected: 0

Name of Class = vtkMRMLNodeTestHelper1
Name of Superclass = vtkMRMLNodeTestHelper1
WriteXML output:
 id="vtkMRMLNodeTest1" name="MyName" description="Testing a mrml node" hideFromEditors="false" selectable="true" selected="true" attributes="attName:attValue"
ERROR: In ..\..\..\..\..\Slicer-1\Libs\MRML\Core\vtkMRMLNode.cxx, line 815
vtkMRMLNodeTestHelper1 (00000000038A0080): GetAttribute: Name parameter is expected to be non NULL.

ERROR: In ..\..\..\..\..\Slicer-1\Libs\MRML\Core\vtkMRMLNode.cxx, line 820
vtkMRMLNodeTestHelper1 (00000000038A0080): GetAttribute: Name parameter is expected to have at least one character.

error: [C:/D/N/Slicer-1-build/Slicer-build/bin/Release/MRMLCoreCxxTests.exe] exit abnormally - Report the problem.


git-svn-id: http://svn.slicer.org/Slicer4/trunk@23586 3bd1e089-480b-0410-8dfb-8563597acbee
BUG: Fix compatibility with recent scenes containing inverted linear transforms

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