[vtkusers] vtkExtractGeometry problems on large cell sets

burlen burlen.loring at gmail.com
Fri May 10 17:21:09 EDT 2013


You may just need more memory to process your dataset.

On 05/10/2013 04:26 AM, Laurence Griffiths wrote:
> On small datasets it works fine, 
> If i take a slice in vtk, I get a repeatable Bad Alloc error.
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.

  A couple of suggestions:

run your code through valgrind to see if it reports any errors while 
processing a small dataset.

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.

if neither of those help, then you may need to parallelize your code or 
use a parallel tool like ParaView.

On 05/10/2013 04:26 AM, Laurence Griffiths wrote:
> Hi All,
> I'm using vtkExtractGeometry on a large ensight dataset 
> (vtkUnstructuredGrid - 60 million cells, approximately).
> ExtractData=vtk.vtkExtractGeometry()
> ExtractData.SetInput(MultiBlock.GetOutput().GetBlock(0))
> ExtractData.SetImplicitFunction(ClipBox)
> ExtractData.ExtractInsideOn()
> ExtractData.ExtractBoundaryCellsOn()
> ExtractData.Update()
> ClipBox is an instance of vtk.vtkBox()
> 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).
> If i take a slice of the raw dataset (i.e. the vtkUnstructuredGrid) 
> before passing to vtkExtractGeometry - I have no internal cells missing
> If i take a slice in vtk, I get a repeatable Bad Alloc error.
> Anyone else had simillar problems to this? Or Know a work around?
> Cheers,
> Laurence.
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20130510/12b33ab4/attachment.htm>


More information about the vtkusers mailing list