<div dir="ltr"><div><div><div><div><div><div><div>&gt;&gt; But when I am loading file I am getting a runtime wornings and errors and<br>
the object loads partially (sometimes just several slices). I couldn&#39;t solve<br>
the problem by increasing shrink factor or memory limit. I also checked<br>
extent, dimensionality and spacing, but result was the same.<br>
&gt;&gt; Could you please help me.<br><br></div>You do not provide enough information (what warninhgs, what errors, system you are on, RAN available etc )<br><br></div>So just a few comments:<br></div>If you are on win32 you are limited to 2GB for data per process by default.<br>
</div><div>
</div>It is not enough to read 6GB of data, not even counting memory required to keep shrinked data.<br><br></div>Even if you are on 64 bit system the amount of memory you need may be to large for the system you are running on.<br>
</div>You need approximately 12 GB of memory to be able to run your code and better it should not count virtual memory,<br></div>otherwise process may take weeks to finish.<br><div><div><div><div><br></div><div>Regards,<br>
</div><div>    Alex<br><br><div><div><br>
</div></div></div></div></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Jul 1, 2013 at 5:09 AM, Glen <span dir="ltr">&lt;<a href="mailto:mrholmes@yandex.ru" target="_blank">mrholmes@yandex.ru</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello everyone.<br>
<br>
I have a quite large binary file (&gt; 6 GB) which contains the data I want to<br>
visualize. I am trying to read and shrink it using vtkImageReader,<br>
vtkImageShrink3D and vtkMemoryLimitImageDataStreamer.<br>
The code is listed below.<br>
<br>
vtkImageReader reader = vtkImageReader.New();<br>
reader.SetDataScalarTypeToSignedChar();<br>
reader.SetDataExtent(0, extent[0], 0, extent[1], 0, extent[2]);<br>
reader.SetDataSpacing(spacing[0], spacing[1], spacing[2]);<br>
reader.SetFileDimensionality(3);<br>
reader.SetFileName(filePath);<br>
<br>
vtkImageShrink3D shrink = vtkImageShrink3D.New();<br>
shrink.SetShrinkFactors(shrinkFactor, shrinkFactor, shrinkFactor);<br>
shrink.AveragingOn();<br>
shrink.MedianOn();<br>
shrink.SetInputConnection(reader.GetOutputPort());<br>
<br>
vtkMemoryLimitImageDataStreamer limitStreamer =<br>
vtkMemoryLimitImageDataStreamer.New();<br>
limitStreamer.SetInputConnection(shrink.GetOutputPort());<br>
limitStreamer.SetMemoryLimit(memoryLimit);<br>
limitStreamer.UpdateWholeExtent();<br>
<br>
But when I am loading file I am getting a runtime wornings and errors and<br>
the object loads partially (sometimes just several slices). I couldn&#39;t solve<br>
the problem by increasing shrink factor or memory limit. I also checked<br>
extent, dimensionality and spacing, but result was the same.<br>
<br>
Could you please help me.<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://vtk.1045678.n5.nabble.com/Processing-large-raw-binary-files-tp5721699.html" target="_blank">http://vtk.1045678.n5.nabble.com/Processing-large-raw-binary-files-tp5721699.html</a><br>

Sent from the VTK - Users mailing list archive at Nabble.com.<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
</blockquote></div><br></div>