Import 2017-06-07 23:51:09: master 539c5e5f

Author Committer Branch Timestamp Parent
jcfr jcfr master 2015-10-30 13:44:58 master 99d3b4d7
Changeset

BUG: Fix doubleArrayStorageNode Reader return value

Corrects typo returning wrong value at the end of ReadData.

It is now returning 0 if the DoubleArray is empty. This is
not a usual behavior as we should allow reading an empty
node, but we are doing this for backward compatibility with
the behavior prior to r24675 (BUG: Fix support for missing
labels in vtkMRMLDoubleArrayStorage reader) [1].

[1] http://viewvc.slicer.org/viewvc.cgi/Slicer4/trunk/Libs/MRML/Core/vtkMRMLDoubleArrayStorageNode.cxx?revision=23021&view=markup&pathrev=24674#l200

This fixes those two failing tests:
(1) vtkSlicerDoubleArraysLogicAddFileTest
(2) vtkMRMLDoubleArrayNodeTest1

//----------
$ ctest -R "DoubleArray[s]?(Logic|Node)"
Test project /home/jcfr/Projects/Slicer-Debug/Slicer-build
Start 25: vtkMRMLDoubleArrayNodeTest1
1/2 Test 0000025: vtkMRMLDoubleArrayNodeTest1 ............. Passed 0.95 sec
Start 326: vtkSlicerDoubleArraysLogicAddFileTest
2/2 Test 0000326: vtkSlicerDoubleArraysLogicAddFileTest ... Passed 1.19 sec
//----------

Reviewed-by: Jean-Christophe Fillion-Robin <jchris.fillionr@kitware.com>

From: Alexis Girault <alexis.girault@kitware.com>

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

mod - Libs/MRML/Core/vtkMRMLDoubleArrayStorageNode.cxx Diff File