[vtkusers] Data got duplicated when update()?

feigee at us.sina.com feigee at us.sina.com
Fri Apr 20 12:58:10 EDT 2001


Datasets:  Mesh of 10 million points, and 5 scalar data associated with each point.

Senario: Want to show isosurface of function #1 and contour lines on a cutting plane of function #2, etc.

Question: Take vtkPLOT3DReader for example, 
    vtkPLOT3DReader *p3dReader = vtkPLOT3DReader::New();
      p3dReader->SetXYZFileName(path_to_mesh);
      p3dReader->SetQFileName(path_to_soln);
      p3dReader->SetFunctionNumber(100);
      p3dReader->update();

Now all are in place.  So we can construct the pipeline using this p3dReader->GetOutput() for one actor.  But now, to construct the second actor pipeline, I have to
     p3dReader2....
     p3dReader2->SetFuctionNumber(110);
     p3dReader2->Update();
     [other filter with SetInput( p3dReader2->GetOutput())...]

in order not to change the first pipeline. But that will duplicated the memory requirement, and the same dataset got read twice.

I also looked at what is done in the graphics/examplesTcl/MultidimensionalSolution.tcl, it seems that this is the right answer for it.  But I am wondering how the memory is managed here?  When vtkFiedlDataToAttributeDataFilter is used twice to create velocityDataSet and pressureGradientDataset, does the underlaying data (10 million points) got duplicated in the memory for each of them so that they can have independent pipelines? (so the system needs to be able to handle 20 million points) or they are pointed to the same dataset? (so only 10 million points and its solution is in the memory, no matter how many different fuctions we want to create).

In short, I would like to know if I want to show various functions of a dataset (mesh + soln) at the same time without duplicating the data itself, what is the best way to do it?  If you can write the sequences of which class to use, I would very much appreciate.  Assume that we are talking about a standard PLOT3D dataset with 10mil points.

Thank you

Alan





_______________________________________________________________
http://www.SINA.com - #1 Destination Site for Chinese Worldwide




More information about the vtkusers mailing list