1) At the beginning of a RequestData function for a filter, this is typically the first thing:<br><br> // get the info object<br> vtkInformation *inInfo = inputVector[0]->GetInformationObject(0);<br><br> // get the input<br>
vtkPolyData *input = vtkPolyData::SafeDownCast(<br> inInfo->Get(vtkDataObject::DATA_OBJECT()));<br><br>If there are multiple inputs, do I need to do:<br> vtkInformation *inInfo = inputVector[0]->GetInformationObject(1); //1 instead of 0 here? Or should it be inputVector[1]?<br>
<br>
// get the second input input<br>
vtkPolyData *input1 = vtkPolyData::SafeDownCast(<br>
inInfo->Get(vtkDataObject::DATA_OBJECT()));<br>
<br>to get the second input? Is there a way to access the inputs by a name instead of depending on the order? That is, instead of saying first input, second input, etc, can you say MyBigInput, MyOtherInput so the order does not matter?<br>
<br>2) In my FillInputPortInformation function, I have been doing: (for a filter with 4 inputs)<br><br> if (!this->Superclass::FillInputPortInformation(port, info))<br> {<br> return 0;<br> }<br> if ( port >= 0 && port <=3 )<br>
{<br> info->Set( vtkAlgorithm::INPUT_REQUIRED_DATA_TYPE(), "vtkPolyData" );<br> return 1;<br> }<br><br>It seems that 'port' is never used anywhere - is this the correct way to tell the pipeline the type of the 4 inputs? Is the correct 'info' object automatically passed when the FillInputPortInformation function is called with the corresponding port number?<br>
<br>3) When making a Paraview plugin for a vtk filter, in the XML I will do something like <br> <InputProperty<br> name="Source"<br><br>to tell Paraivew to make an input connection. Since these inputs are not named in the vtk filter, is paraview associating the first InputProperty that appears in the xml with input 0 of the filter, etc?<br>
<br clear="all">Thanks,<br><br>David<br>