[vtkusers] Input type validity

David E DeMarle dave.demarle at kitware.com
Tue Feb 14 12:25:07 EST 2012


ParaView does connectability checking in the proxy layer (specifically
in vtkSMSourceProxy and vtkSMOutputPort). The pipeline of proxies
mimics the eventual VTK pipeline and proxies contain enough meta
information that ParaView doesn't have to ask the VTK layer directly
like you are trying to do.

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



On Tue, Feb 14, 2012 at 12:02 PM, Marc Ferland <ferlandm at sonatest.com> wrote:
> Hi David,
>
> Thanks for your advice. I'll definitely have a look at your proposition.
>
> BTW, how do you guys do it in paraview? Is it a best effort method or is
> the node compatibility hard-coded? By best-effort I mean testing the
> input port information object against the output port information. If
> both really have incompatible types then the link is impossible.
>
> Regards,
>
> Marc
>
> David E DeMarle <dave.demarle at kitware.com> writes:
>
>> A prettier way would be to make a new executive class that exists just
>> to provide a public method that internally calls that one.
>>
>> But what happens when you promote that method to public? Does it
>> compile without warnings? Does it work the way you want? Do any tests
>> fail because of doing that? If not we can push the change through
>> gerrit code review, and if the reviewers agree it will go into
>> mainline vtk.
>>
>> David E DeMarle
>> Kitware, Inc.
>> R&D Engineer
>> 21 Corporate Drive
>> Clifton Park, NY 12065-8662
>> Phone: 518-881-4909
>>
>>
>>
>> On Fri, Feb 10, 2012 at 4:04 PM, Marc Ferland <ferlandm at sonatest.com> wrote:
>>> Hi,
>>>
>>> I'm currently writing a small "pipeline editor" using VTK and I wanted
>>> to know if there is any way to test if a SetInputConnection will fail
>>> before actually sending data throught the pipe?
>>>
>>> I see that vtkDemandDrivenPipeline::InputTypeIsValid() implements this,
>>> but since it is protected, I do not have access to it.
>>>
>>> Should I just copy/paste the algorithm described in InputTypeIsValid?
>>>
>>> Any suggestions appreciated!
>>>
>>> Regards,
>>>
>>> Marc
>>> _______________________________________________
>>> 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 VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://www.vtk.org/mailman/listinfo/vtkusers



More information about the vtkusers mailing list