[vtkusers] Fail to render big data of unstructured Grid

R M mlokida at yahoo.fr
Tue Nov 22 10:18:13 EST 2011


Hello,

Here's my problem. I use vtk 5.8.0 on a windows XP platform with 3GB of RAM (it is an application using vtk and Qt). I have a geometry which is composed of about 2 000 000 hexadrons cells.  My geometry is composed of about 20 blocks.
Now, I want to transform my 20 unstructuredGrid blocks (in a vtkMultiBlockDataSet) in one polydata or unstructuredGrid. 

First, I have try the vtkMergeCells in order to have 1 vtkUnstructuredGrid.  I have the following error: 

vtkDataArrayTemplate.cxx l 359 Unable to allocate 35,793,215 Elements of... (I don't have the end of the message).  The number (35,793,...) is not always the same.

Now, I have decided to use the vtkAppendFilter. For that I use the following code :

vtkAppendPolyData* append = vtkAppendPolyData::New();

for(unsigned int i = 0; i < mbds->GetNumberOfBlocks(); ++i)
    {
        vtkDataSetSurfaceFilter* dssf = vtkDataSetSurfaceFilter::New();
        dssf->PassThroughCellIdsOn();
        dssf->PassThroughPointIdsOn();

        dssf->SetInput( ptr_mbds->GetBlock(i) );
        dssf->Update();

        append->AddInput( dssf->GetOutput());

        dssf->Delete();
  }

   append->Update();

With this code, I have the same error. It occurs at line269 of vtkAppendPolyData.cxx ->  newStrips->Allocate(numCells*4); with numCells = 2251994

I don't know why there is this multiplication *4 since we have the exact number of cells. May be the process will create more cells than it exists.

Moreover, both method are very time consuming.


So, can someone tell me what 's wrong with my methods and what can I do  to display my geometry ?


Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20111122/6a20b057/attachment.htm>


More information about the vtkusers mailing list