[vtkusers] Read and resample large volumes
leandro
leobbastos at gmail.com
Wed Nov 2 14:19:38 EDT 2011
Hello David,
I have the same situation, but i don´t manage to do it with VTK without
first loading too much data into memory. Doing the way you suggested worked
even worse.
My code:
vtkImageReader2* image = vtkImageReader2::New();
image->SetDataExtent(extent);
image->SetDataByteOrderToLittleEndian();
image->SetFilePrefix (prefix);
image->SetDataSpacing(spacing);
vtkImageShrink3D *shrink = vtkImageShrink3D::New();
shrink->SetInputConnection(streamer->GetOutputPort());
shrink->SetShrinkFactors(2,2,2);
vtkImageDataStreamer* streamer = vtkImageDataStreamer::New();
streamer->GetOutput()->GlobalReleaseDataFlagOn();
streamer->SetInputConnection(image->GetOutputPort());
streamer->SetNumberOfStreamDivisions(10);
mapper -> SetInput(streamer->GetOutput());
The data is 700MB big. Resampled to the half it costs 250MB memory (done
without streaming and loads max. 795MB). But with this code it firsts need
almost 800MB then explodes to 2GB =(
I don´t get it, where is the mistake?
Thank you
--
View this message in context: http://vtk.1045678.n5.nabble.com/Read-and-resample-large-volumes-tp4484778p4958920.html
Sent from the VTK - Users mailing list archive at Nabble.com.
More information about the vtkusers
mailing list