Try something like this.
In this case the mapper takes in either type, which you may or may not want.

//----------------------------------------------------------------------------
int vtkCompositePolyDataMapper2::FillInputPortInformation(
  int vtkNotUsed(port), vtkInformation* info)
{
  info->Set(vtkAlgorithm::INPUT_REQUIRED_DATA_TYPE(), "vtkPolyData");
  info->Append(vtkAlgorithm::INPUT_REQUIRED_DATA_TYPE(),
"vtkCompositeDataSet");
  return 1;
}

David E DeMarle
Kitware, Inc.
R&D Engineer
21 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-881-4909


On Fri, Jan 20, 2012 at 2:36 PM, Sohail Shafii <[email protected]>wrote:

> Hi,
>
> I am developing an algorithm that requires a composite data set as input
> while creating a vtkDataSet as output -- basically it inherit from
> vtkDataSetAlgorithm. I know that one must provide a new definition to the
> FillInputPortInformation(int port, vtkInformation *info) function, but I'm
> not sure how. Please advise, thank you.
>
> Sohail
>
> _______________________________________________
> 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
>
>
_______________________________________________
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

Reply via email to