[vtkusers] vtkThreshold - multiple Input Ports?
David E DeMarle
dave.demarle at kitware.com
Mon Nov 25 08:56:05 EST 2013
The number of inputs that the threshold filter accepts cannot be changed,
without rewriting it that is.
Instead, think about making a branching pipeline, that is sending your
unstructured grid into multiple threshold filters, the output of each is to
be rendered independently.
David E DeMarle
Kitware, Inc.
R&D Engineer
21 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-881-4909
On Thu, Nov 21, 2013 at 3:22 PM, Bhanu Hariharan <bhanu at petrotel.com> wrote:
> Dear vtk-users,
>
> I am trying to do set up multiple Input Ports for a vtkThreshold type of
> filter.
> Input to the threshold filter is a vtkUnstructuredGrid.
>
> My code looks like
>
> myThresholdfilter.SetInput(port0, myUnstructuredGrid);
> myThresholdfilter.SetInput(port1, myUnstructuredGrid);
>
>
> I would like to setup multiple viewports in my rendering window and in
> each viewport I would like a different grid property rendered. The grid
> property is a scalar array added to myUnstructuredGrid.
>
> (I thought I can render different image in different viewports this way -
> I may be wrong here to begin with so if anyone wants to correct me here
> please feel free).
>
> At run time as soon as the debugger hits the line
> myThresholdfilter.SetInput(port1, myUnstructuredGrid);
> it complaints that I attempted to use port index 1 when number of ports is
> 1.
>
> I can't even seem to do
> myThresholdfilter.SetNumberofInputPorts();
> as this is a protected method.
>
> How do I set up multiple input ports for a vtkThreshold filter. Please if
> anyone can shed some light on it, it would be a great help as I have spent
> a lot of time on it trying this and that without any luck.
>
> Thanks in advance,
> Bhanu
>
> ------------------------------
> *DISCLAIMER*: This e-mail and any files transmitted with it ("Message")
> is intended only for the use of the recipient(s) named above and may
> contain confidential information. You are hereby notified that the taking
> of any action in reliance upon, or any review, retransmission,
> dissemination, distribution, printing or copying of this Message or any
> part thereof by anyone other than the intended recipient(s) is strictly
> prohibited. If you have received this Message in error, you should delete
> this Message immediately and advise the sender by return e-mail. Opinions,
> conclusions and other information in this Message that do not relate to the
> official business of PETROTEL or its affiliated Companies shall be
> understood as neither given nor endorsed by PETROTEL or any of its
> affiliated companies.
> _______________________________________________
> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20131125/c7d00235/attachment.htm>
More information about the vtkusers
mailing list