[vtk-developers] Which class to derive from for filter with input: PolyData, output: Graph
David Doria
daviddoria+vtk at gmail.com
Wed Nov 11 13:41:00 EST 2009
What are the differences between deriving from vtkPolyDataAlgorithm vs
deriving from vtkGraphAlgorithm? I've seen that you are supposed to
derive from the algorithm class that matches the type of your output.
However, it seems that you can change the input to an arbitrary data
type using:
int vtkYourilter::FillInputPortInformation( int port, vtkInformation* info )
{
if (!this->Superclass::FillInputPortInformation(port, info))
{
return 0;
}
if ( port == 0)
{
info->Set( vtkAlgorithm::INPUT_REQUIRED_DATA_TYPE(), "vtkPolyData" );
return 1;
}
}
Is this correct then? Should I derive from vtkGraphAlgorithm and set
the input to expect a vtkPolyData using the above method?
Thanks,
David
More information about the vtk-developers
mailing list