[vtkusers] vtkExtractVOI in 3D

Thomas Deschamps tdeschamps at lbl.gov
Thu Nov 14 20:06:18 EST 2002


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 -> SetSampleRate(xRatio,yRatio,zRatio);
            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?

Thomas (TDeschamps at lbl.gov)




More information about the vtkusers mailing list