[vtkusers] Re: vtkExtractVOI in 3D

Thomas Deschamps tdeschamps at lbl.gov
Fri Nov 15 12:44:18 EST 2002


I obtained exactly the same wrong result with vtkImageClip.
Please help!

Thomas (TDeschamps at lbl.gov)

Thomas Deschamps wrote:

> HI vtkUsers,
>
> Does someone notice any problem using vtkExtractVOI on 3d 
> vtkStructuredPoints datasets?
> It seems the 3d image obtained with the following code has problems.
>
>            int extent[6];
>            imageData -> GetExtent(extent);
>            extent[0] = 10;
>
>            vtkExtractVOI * tmpVOI = vtkExtractVOI::New();
>            tmpVOI -> SetInput(imageData);             tmpVOI -> 
> SetVOI(extent);
>            tmpVOI -> Update();
>
>            imageData -> DeepCopy();
>
> The resulting image is weird: it is shifted in the x direction by 
> extent[0] = 10, and the data between 0 and extent[0] is replaced by 
> zeros, and lots of others strange behaviors (The geometry of the image 
> is lost).
> The strange part is I did not change my code for a long time, that is 
> why I suspect my yesterday checked out cvs version of vtk to be 
> responsible. But as usual there is probably something I forgot to do.
> Does anyone have an idea? 






More information about the vtkusers mailing list