<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">You may just need more memory to
process your dataset.<br>
<br>
On 05/10/2013 04:26 AM, Laurence Griffiths wrote:
<blockquote type="cite">On small datasets it works fine, </blockquote>
<blockquote type="cite">If i take a slice in vtk, I get a
repeatable Bad Alloc error.</blockquote>
vtkDataArrays will detect failed malloc and throw std::bad_alloc,
classes that uses c++ new operator to allocate memory will do the
same. vtk classes that make use of malloc don't always check for
malloc failures which when it happens leads to strange behavior,
usually but not always, followed by a crash. it kind of sounds
like that's what's happening here.<br>
<br>
A couple of suggestions:<br>
<br>
run your code through valgrind to see if it reports any errors
while processing a small dataset.<br>
<br>
release vtk objects as soon as you are finished with them, with
vtk's reference counting you can usually delete the object as soon
as you've passed it to another vtk object. be aware about smart
pointers holding references until they go out of scope. you can
set them to NULL to force it to relinquish it's hold on the
object.<br>
<br>
if neither of those help, then you may need to parallelize your
code or use a parallel tool like ParaView.<br>
<br>
On 05/10/2013 04:26 AM, Laurence Griffiths wrote:<br>
</div>
<blockquote
cite="mid:CALOu3UkusqXO5eQKGwd5wvt54g89aVZp-iUo9WPL0sBRVR4RBA@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>Hi All,</div>
<div>I'm using vtkExtractGeometry on a large ensight dataset
(vtkUnstructuredGrid - 60 million cells, approximately). </div>
<div> </div>
<div>ExtractData=vtk.vtkExtractGeometry()</div>
<div>
ExtractData.SetInput(MultiBlock.GetOutput().GetBlock(0))</div>
<div>ExtractData.SetImplicitFunction(ClipBox)</div>
<div>ExtractData.ExtractInsideOn()</div>
<div>ExtractData.ExtractBoundaryCellsOn()</div>
<div>ExtractData.Update()</div>
<div> </div>
<div>ClipBox is an instance of vtk.vtkBox()</div>
<div> </div>
<div>On small datasets it works fine, however on large datasets
I seem to get Bands of cells missing internally in the
dataset. (seen by by saving the volume, opening in paraview,
and taking a slice).</div>
<div> </div>
<div>If i take a slice of the raw dataset (i.e. the
vtkUnstructuredGrid) before passing to vtkExtractGeometry - I
have no internal cells missing</div>
<div> </div>
<div>If i take a slice in vtk, I get a repeatable Bad Alloc
error.</div>
<div> </div>
<div>Anyone else had simillar problems to this? Or Know a work
around?</div>
<div> </div>
<div>Cheers,</div>
<div>Laurence.</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Powered by <a class="moz-txt-link-abbreviated" href="http://www.kitware.com">www.kitware.com</a>
Visit other Kitware open-source projects at <a class="moz-txt-link-freetext" href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a>
Please keep messages on-topic and check the VTK FAQ at: <a class="moz-txt-link-freetext" href="http://www.vtk.org/Wiki/VTK_FAQ">http://www.vtk.org/Wiki/VTK_FAQ</a>
Follow this link to subscribe/unsubscribe:
<a class="moz-txt-link-freetext" href="http://www.vtk.org/mailman/listinfo/vtkusers">http://www.vtk.org/mailman/listinfo/vtkusers</a>
</pre>
</blockquote>
<br>
</body>
</html>