[Paraview] vtkHierarchicalDataExtractDataSets not passing PointData from unstructured Grids?

Jean M. Favre jfavre at cscs.ch
Thu Aug 18 10:23:49 EDT 2005


Dear all

I have a reader building a hierarchical dataset made of Unstructured Grids.

If I use the following code:

  reader->Update();

  vtkHierarchicalDataExtractDataSets *Part =
vtkHierarchicalDataExtractDataSets::New();
  Part->SetInputConnection(0, reader->GetOutputPort(0));
  Part->AddDataSet(0,0);

  vtkContourFilter *watersheets = vtkContourFilter::New();
  watersheets->SetInputConnection(0, Part->GetOutputPort(0));
  watersheets->SetInputArrayToProcess(0,0,0,
vtkDataObject::FIELD_ASSOCIATION_POINTS,"Volume Fraction");
  watersheets->SetValue(0, .5);

ContourFilter complains that there is no data to process (line 250 of
vtkContourFilter)

if instead, I set the input to contour directly from the DataSet (0,0 in
my example), my isosurface is correctly built.

Here is what I do to make it work:

  watersheets->SetInput(reader->GetOutput()->GetDataSet(0,0));

==
This is telling me my reader correctly loads the PointData and I am
thinking that maybe vtkHierarchicalDataExtractDataSets only does a
shallow copy of Unstructured Grids without passing the PointData? I have
other examples (AMR) which work fine. The only difference here is that I
have Unstructured grids.

Any idea to help me debug this?

Thanks in advance.


-- 
Dr. Jean M. Favre,                            email:favre @ cscs.ch
http://www.cscs.ch/about/Favre.php
CSCS, Swiss National Supercomputing Centre  | Tel:  +41 (91) 610.82.40
Via Cantonale, 6928 Manno, Switzerland      | Fax:  +41 (91) 610.82.82


More information about the ParaView mailing list