<div dir="ltr">Hi,<div><br></div><div>The following code currently produces an error message:</div><div>  vtkGridTransform* a = vtkGridTransform::New();</div><div>  vtkGridTransform* b = vtkGridTransform::New();</div><div>

  a->DeepCopy(b);</div><div><br></div><div> 34: ERROR: In /Users/exxos/Work/Slicer/Slicer4/Slicer-R64-Qt4.7.4-VTKv6/VTKv6/Common/ExecutionModel/vtkAlgorithm.cxx, line 1421</div><div>34: vtkGridTransformConnectionHolder (0x7fe2fa11a730): Attempt to get connection index 0 for input port 0, which has 0 connections. </div>

<div><br></div><div>This is due to vtkGridTransform::InternalDeepCopy(vtkAbstractTransform*):</div><div>  ...</div><div><div>  this->ConnectionHolder->SetInputConnection(</div><div>    0, gridTransform->ConnectionHolder->GetInputConnection(0, 0));</div>

</div><div>  ...</div><div><br></div><div>Do we really consider GetInputConnection(0,0) as an error if there is no connection yet(or the connection has been removed)  ?</div><div><br></div><div>When porting code from VTK5 to VTK6, I had to wrap every GetInputConnection(0,0) call with a test on the number of input connections:</div>

<div>  return myFilter->GetNumberOfInputConnections(0) ? myFilter->GetInputConnection(0,0) : 0;</div><div><br></div><div>Isn't it a bit too much verbose ?</div><div>I would suggest to remove the error. What do you think ?</div>

<div><br></div><div>Thanks,</div><div>Julien.</div></div>