is it possible to add new connections to a fitler port via the pipeline browser

Hello,

Everything is in the title ! I want to add a second connection to the port 0 of a filter via the pipeline browser. Is it feasible ?

Thanks.

  • Right click on your filter
  • Change inputs
  • Click on the inputs you want to use
  • Ok
1 Like

I can only choose one filter (I tried using CTRL to select a second input but it won’t let me).

In fact, I don’t want to add an input to another port (my filter has only one port) ! I just want to add a connection to the first port of it (index 0) ! I have already done this in VTK with AddInputConnection…

If this feature doesn’t exist, I may spent some time to implement it and contribute it to ParaView… I just need a confirmation that it does not exist.

This is because your filter does not declare its input as repeatable. Which filter are you using ?

You’re right ! I will fix that in my code and try again…

I’m using a custom filter, and no it still doesn’t work, with CTRL button I can’t select a second input for my filter having :

int myMagnitudeFilter::FillInputPortInformation(int port, vtkInformation* info)
{
    info->Set(vtkAlgorithm::INPUT_IS_REPEATABLE(), 1);

    return Superclass::FillInputPortInformation(port, info); // no information will be removed here
}

PS : I’m using ParaView 5.4.1

In the pqChangeInputDialog’s constructor, I saw that the multiple connection properties is retrieved from the proxy (thus XML isn’t it), so what should I do ?

Otherwise, is it possible to have a vtkWriter class with a single port (mandatory anyway) and having multiple connections in a Catalyst Pipeline ?

You are missing the following xml code : multiple_input="1"

It may look like this :

      <InputProperty clean_command="RemoveAllInputs"
                     command="AddInputConnection"
                     multiple_input="1"
                     name="Input">
        <ProxyGroupDomain name="groups">
          <Group name="sources" />
          <Group name="filters" />
        </ProxyGroupDomain>
        <DataTypeDomain composite_data_supported="0"
                        name="input_type">
          <DataType value="vtkDataSet" />
        </DataTypeDomain>
        <Documentation>This property specifies the datasets to be merged into a
        single dataset by the Append Datasets filter.</Documentation>
      </InputProperty>

Thank you, Yes, I found how to do it, I had also to change SetInputConnection to AddInputConnection (I just took a look at filters.xml).

When using Catalyst, I noticed something odd : timestamps retrieved via vtkStreamingDemandDrivenPipeline::UPDATE_TIME_STEP key :

double con1time = inputVector[0]->GetInformationObject(0)->Get(vtkStreamingDemandDrivenPipeline::UPDATE_TIME_STEP()); double con2time = inputVector[0]->GetInformationObject(1)->Get(vtkStreamingDemandDrivenPipeline::UPDATE_TIME_STEP());

are not epochs when my filter has 2 inputs connections on its port, but rather incremental reals, something like: 1, 1.5, 2, 3, 4, 4.5 etc… in both connections.

Can you please give me an explanation ? How can I fix it ? Thanks.

Otherwise, the filter in question, is a writer, I succeeded in creating a python pipeline script via ParaView in which, I connected the output of 2 filters in the the first port of the writer, I used that in the XML (by the way, do you think my XML is “good” ?)

<ProxyGroup name="writers">

    <WriterProxy name="myHDF5Writer" class="myHDF5Writer" label="myHDF5Writer">

        <InputProperty name="Input" command="AddInputConnection" multiple_input="1">
            <DataTypeDomain name="input_type">
                <DataType value="vtkImageData"/>
            </DataTypeDomain>
        </InputProperty>

        <!-- Etc... -->

    </WriterProxy>

</ProxyGroup>

<ProxyGroup name="insitu_writer_parameters">

    <SourceProxy name="myHDF5Writer" class="vtkPVNullSource" label="myHDF5Writer">

        <InputProperty name="Input" multiple_input="1"> <!-- <===== Here... -->
            <ProxyGroupDomain name="groups">
                <Group name="sources"/>
                <Group name="filters"/>
            </ProxyGroupDomain>
            <DataTypeDomain name="input_type">
                <DataType value="vtkImageData"/>
            </DataTypeDomain>
        </InputProperty>

        <StringVectorProperty name="FileName" number_of_elements="1" default_values="filename.h5"/>

        <IntVectorProperty name="WriteFrequency" number_of_elements="1" default_values="1">
            <IntRangeDomain name="range" min="1"/>
        </IntVectorProperty>

        <IntVectorProperty name="PaddingAmount" number_of_elements="1" default_values="0">
            <IntRangeDomain name="range" min="0"/>
        </IntVectorProperty>

        <IntVectorProperty name="File lifetime (hours)" number_of_elements="1" default_values="1">
            <IntRangeDomain name="range" min="1"/>
        </IntVectorProperty>

        <Hints>
            <WriterProxy group="writers" name="myHDF5Writer"/>
        </Hints>

    </SourceProxy>

</ProxyGroup>

Thanks !