[vtk-developers] Re: Understanding vtkMultiGroupDataGroupFilter
Bill McGrory
mcgrory at aerosft.com
Tue May 30 13:25:11 EDT 2006
Responding to my own e-mail.
I implemented a vtkMultiGroupDataGroupFilter::RequestDataObject, and
filled the the vtkMultiGroupDataSet with vtkDataSet's that were obtained
from the input connections to the filter.
this got me past the error listed below, but now I fail, because
ExecuteDataForBlock doesn't use my created vtkMultiBlockDataSet from the
request.
In trying to understand this filter, I compared it to other
vtkMultiGroupDataSetAlgorithm's and I noticed that
vtkMultiGroupDataExtractDataSets and vtkMultiGroupDataExtractGroup both
implement ::RequestInformation and fill a vtkMultiGroupDataInformation
object with information about the children. So I tried to implement a
similar method in vtkMultiGroupDataGroupFilter, and that didn't seem to
have any effect.
So, next, I tried to change my pipeline. I filled a vtkMultiGroupDataSet
with statically created vtkStructuredGrids. I then fed this
vtkMultiGroupDataSet into a vtkMultiGroupDataExtractGroup and fed that
filter as input to my pipeline below. When I do this, I get the same
error as listed below.
So, it appears to me that none of the vtkMultiGroupDataSetAlgorithms
work correctly with vtkMultiGroupDataGeometryFilter. Is there truth to
this?
On Sat, 2006-05-27 at 16:09 -0400, Bill McGrory wrote:
> 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