[vtk-developers] Understanding vtkMultiGroupDataGroupFilter
Bill McGrory
mcgrory at aerosft.com
Sat May 27 16:09:44 EDT 2006
Trying to get new pipeline set up for a multiblock dataset.
Following the suggestions of Berk, from previous thread, I'm now using a
vtkStructuredGridAlgorithm as a source to create a vtkStructuredGrid
I'm feeding the output ports of the algorithm into a
vtkMultiGroupDataGroupFilter in order to create a vtkMultiGroupData
which contains only vtkStructuredGrid's
my pipeline is below.
The problem as this is implemented is this:
When vtkCompositeDataPipeline::ExecuteDataObjectForBlock is called,
vtkMultiGroupDataGroupFilter::ExecuteData has yet to be called.
However, that is where the vtkMultiGroupDataSet has the children loaded.
This means that there are no datasets in the multigroupdataset, so the
request for a block data object fails, and a simple polydata object is
passed down the pipeline. At this point, the vtkStructuredGridOutline
filter fails, because, it does a check to make sure the input port is
correctly set to vtkStructuredGrid, and it's set to the dummy
vtkPolyData.
Is this a bug, or am I still trying to do something that's not
supported?
Regards, Bill
MyStructuredGridAlgorithm *sgridsrc0 = MyStructuredGridAlgorithm::New();
MyStructuredGridAlgorithm *sgridsrc1 = MyStructuredGridAlgorithm::New();
sgridsrc0->myoffset = 0.;
sgridsrc1->myoffset = 3.;
vtkMultiGroupDataGroupFilter *mbFilter =
vtkMultiGroupDataGroupFilter::New();
mbFilter->SetInputConnection(0,sgridsrc0->GetOutputPort(0));
mbFilter->AddInputConnection(0,sgridsrc1->GetOutputPort(0));
vtkStructuredGridOutlineFilter *outlineFilter =
vtkStructuredGridOutlineFilter::New();
outlineFilter->SetInputConnection(0, mbFilter->GetOutputPort(0));
vtkMultiGroupDataGeometryFilter *mgdgFilter =
vtkMultiGroupDataGeometryFilter::New();
mgdgFilter->SetInputConnection(0, outlineFilter->GetOutputPort(0));
vtkPolyDataMapper* mapper = vtkPolyDataMapper::New();
mapper->SetInputConnection(0, mgdgFilter->GetOutputPort(0));
--
Dr. William D. McGrory AeroSoft, Inc.
mcgrory at aerosft.com Suite 1275
(540) 557-1904 1872 Pratt Drive
(540) 557-1919 (FAX) Blacksburg, VA 24060
More information about the vtk-developers
mailing list