[vtk-developers] _possible_ buglet in vtkImageReslice

David Gobbi dgobbi at irus.rri.ca
Thu Jun 6 17:14:13 EDT 2002


On Thu, 6 Jun 2002, Charl P. Botha wrote:

> Dear developers (and especially David),
>
> In vtkImageReslice.cxx at line 599 (4.1 CVS) we have:
>
> s = inSpacing[i];
> d = (inWholeExt[2*i+1] - e)*s;
> e = inWholeExt[2*i];

This is definitely a mistake.  These lines should read

      s = inSpacing[i];
      d = (inWholeExt[2*i+1] - inWholeExt[2*i])*s;
      e = inWholeExt[2*i];

Thanks for noticing this.  I'll commit a fix ASAP.  This was probably
not noticed before because inWholeExtent[0,2,4] is usually zero.

 - David



>
> I believe the third line should come before the second, seeing as the second
> refers to a variable set in the third.  In the setting of this loop, this
> would mean that the start extent of the previous dimension would be used in
> the second and third iterations (e is initialised to 0.0 before the loop).
>
> Can I swap these, or is there some magic I missed?
>
> Thanks,
> Charl
>
>




More information about the vtk-developers mailing list