[vtkusers] Processing large raw(binary) files

Glen mrholmes at yandex.ru
Mon Jul 1 08:09:05 EDT 2013


Hello everyone.

I have a quite large binary file (> 6 GB) which contains the data I want to
visualize. I am trying to read and shrink it using vtkImageReader,
vtkImageShrink3D and vtkMemoryLimitImageDataStreamer.
The code is listed below.

vtkImageReader reader = vtkImageReader.New();
reader.SetDataScalarTypeToSignedChar();
reader.SetDataExtent(0, extent[0], 0, extent[1], 0, extent[2]);
reader.SetDataSpacing(spacing[0], spacing[1], spacing[2]);
reader.SetFileDimensionality(3);
reader.SetFileName(filePath);

vtkImageShrink3D shrink = vtkImageShrink3D.New();
shrink.SetShrinkFactors(shrinkFactor, shrinkFactor, shrinkFactor);
shrink.AveragingOn();
shrink.MedianOn();
shrink.SetInputConnection(reader.GetOutputPort());

vtkMemoryLimitImageDataStreamer limitStreamer =
vtkMemoryLimitImageDataStreamer.New();
limitStreamer.SetInputConnection(shrink.GetOutputPort());
limitStreamer.SetMemoryLimit(memoryLimit);
limitStreamer.UpdateWholeExtent();

But when I am loading file I am getting a runtime wornings and errors and
the object loads partially (sometimes just several slices). I couldn't solve
the problem by increasing shrink factor or memory limit. I also checked
extent, dimensionality and spacing, but result was the same.

Could you please help me. 



--
View this message in context: http://vtk.1045678.n5.nabble.com/Processing-large-raw-binary-files-tp5721699.html
Sent from the VTK - Users mailing list archive at Nabble.com.



More information about the vtkusers mailing list