[Paraview] Algorithm causing reader RequestData when running
Paul Edwards
paul.m.edwards at gmail.com
Fri Mar 26 10:42:15 EDT 2010
Hi,
I am writing an algorithm to operate on a vtkMultiBlockDataSet where I
would like to extract blocks depending on field data that is set.
Internally in my algorithm I am using the vtkExtractBlock filter and
when this is updated it causes the RequestData for my reader to be
executed again. This doesn't happen when applying ExtractBlock in
ParaView. Below I have included an example RequestData that causes
the data to be reloaded (note: this only happens when running in
parallel):
8<-----------------------------------------------------------------
int vtkTestMulti::RequestData(
vtkInformation* vtkNotUsed(request),
vtkInformationVector** inputVector,
vtkInformationVector* outputVector)
{
vtkInformation* inInfo = inputVector[0]->GetInformationObject(0);
vtkMultiBlockDataSet* input = vtkMultiBlockDataSet::SafeDownCast(
inInfo->Get(vtkDataObject::DATA_OBJECT()));
vtkInformation* outInfo = outputVector->GetInformationObject(0);
vtkMultiBlockDataSet* output = vtkMultiBlockDataSet::SafeDownCast(
outInfo->Get(vtkDataObject::DATA_OBJECT()));
VTK_CREATE(vtkExtractBlock, extractBlockFilter);
extractBlockFilter->SetInput(input);
extractBlockFilter->AddIndex(1);
extractBlockFilter->Update();
output->ShallowCopy(extractBlockFilter->GetOutput());
return 1;
}
----------------------------------------------------------------->8
Can anyone see what I am doing wrong or provide any pointers for where to look?
Thanks in advance,
Paul
More information about the ParaView
mailing list