Hello,
What is the proper way to write a filter plugin for paraview w/ multiple
connections and access the data from each connection?
I have been trying to use the vtkProgrammableFilter,
vtkPythonProgrammableFilter, vtkMultiBlockDataGroupFilter, and
vtkTemporalStaticsFilter as examples.
int vtkMyFilterPlugin::RequestData(
vtkInformation *vtkNotUsed(request),
vtkInformationVector **inputVector,
vtkInformationVector *outputVector)
{
int numInputs = inputVector[0]->GetNumberOfInformationObjects();
for (int idx = 0; idx < numInputs; ++idx)
{
vtkInformation *inInfo = inputVector[0]->GetInformationObject(idx);
vtkDataObject *input = vtkDataObject::GetData(inInfo);
vtkDataSet *inputDataSet = vtkDataSet::SafeDownCast( input) ;
.
.
.
}
where numInputs = the number of connections to my Filter.
vtkDataSet::SafeDownCast(input) returns a NULL pointer when I have
multiple connections to the filter but works for ONE connection.
How do I get the pointer(s) that will let me access the vtkDataArray
for each connection to my filter? ie
vtkPointData *pd=inputDataSet->GetPointData();
int numArrays = pd->GetNumberOfArrays();
for (int i = 0; i < numArrays; i++)
{
vtkDataArray *array = pd->GetArray(i);
}
thanks,
df
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the ParaView Wiki at:
http://paraview.org/Wiki/ParaView
Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview