[vtkusers] Re: bug in vtkVolumeTextureMapper3D

xabi riobe xabivtk at gmail.com
Thu Jul 19 05:11:00 EDT 2007


just a precision:
this is when a volume dimension is 1



2007/7/19, xabi riobe <xabivtk at gmail.com>:
>
> Hi,
>
> just to notice a bug in vtkVolumeTextureMapper3D (entered in bugTracker:
> 5366)
>
> in method UpdateVolume, the VolumeSpacing attribute can take a negative
> value (line 1149 in version 1.6):
>
> this->VolumeSpacing[i] = (static_cast<double>(dim[i])-1.01)*(double)spacing[i]
> / static_cast<double>(this->VolumeDimensions[i]-1);
>
> since dim[i] - 1.01 is negative, which causes a bad adress access in
> method vtkVolumeTextureMapper3DComputeScalars (line 217 in version 1.6):
>
> inPtr = dataPtr + components * ( z*inputDimensions[0]*inputDimensions[1] +
> dy*inputDimensions[0] + x );
>
> because z has value -1.
>
>
> HTH,
>
> Xabi R.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070719/b2961c79/attachment.htm>


More information about the vtkusers mailing list