[vtkusers] reading new volume data with larger size

Niels Bakker n.h.bakker at amc.uva.nl
Thu Aug 8 08:27:23 EDT 2002


Hi,

I have a volume of 128,128,128 read by a vtkImageReader passed onto a
vtkVolumeRayCastMapper which is asigned to a volume vtkVolume. Rendering
works fine.

However, when I try to set the reader to a new data file with 256,256,256
size the renderer shows the new data but only 1/8 part of it:

reader->SetDataExtent(0,255,0,255,0,255);
reader->SetFileName(filename);
reader->UpdateWholeExtent();
volume->Update();
renwin->Render();

Checking the volume with Print(cout) shows that the Bounds are still <0 127>
and are not reset to the larger volume data size.
reader->getOutput->Print(cout) shows that the dataextend is updated to <0
255>. I use no clipping planes.

The only thing that works is deleting the vtkVolumeRayCastMapper, creating a
new one and setting all its required parameters. This seems to be a bit
rough.

Can anyone help?

Niels Bakker


N.H.Bakker PhD
Academic Medical Center
Dept. of Medical Physics
Meibergdreef 9
1105 AZ Amsterdam

Phone: (+31) 20-566 8978
Mail : n.h.bakker at amc.uva.nl




More information about the vtkusers mailing list