[Paraview] vtkHierarchicalDataExtractDataSets not passing
PointData from unstructured Grids?
Amy Squillacote
amy.squillacote at kitware.com
Thu Aug 18 10:35:36 EDT 2005
At 10:23 AM 8/18/2005, Jean M. Favre wrote:
>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?
>
vtkHierarchicalDataExtractDataSets produces vtkHierarchicalDataSet as
output; it's the data sets inside the vtkHierarchicalDataSet that
have point data. The vtkContourFilter does not know how to directly
operate on vtkHierarchicalDataSets. Either you need to use a
vtkHierarchicalPolyDataMapper when you are displaying your data, or
you need to tell the filter to use the vtkCompositeDataPipeline
(using the vtkAlgorithm::SetExecutive method). The second option is
what is done in ParaView.
- Amy
>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
>_______________________________________________
>ParaView mailing list
>ParaView at paraview.org
>http://www.paraview.org/mailman/listinfo/paraview
More information about the ParaView
mailing list