[vtkusers] How to bypass parts of the VTK pipeline

Dan Lipsa dan.lipsa at kitware.com
Wed May 4 17:57:22 EDT 2016


You want to make sure that the pipeline run before you can get the data
from A and B. So I would listen to EndEvent on render window and do the
bounding box check and possible reconfigure the pipeline then (remove B).
Not sure that removing the clip filter would save you that much though.

Dan


On Wed, May 4, 2016 at 3:48 PM, Seun Odutola <seun at rogue-research.com>
wrote:

> Thanks guys, it’s looking more like I have to take that route as you all
> described (reconnecting the pipeline as desired). However, I would like to
> know if it’s possible to compare the (B - ClipPolyData’s) bounding box
> against the input’s box (A) in order to decide if the ‘B’ should be skipped
> (thus connecting A to C) as described in my previous email, how can I
> achieve this.  Thanks a lot guys, truly appreciate the help.
>
> Regards,
>    Seun
>
>
>
>
> On May 4, 2016, at 12:39 PM, Elvis Stansvik <elvis.stansvik at orexplore.com>
> wrote:
>
>
> Den 3 maj 2016 10:40 em skrev "Dan Lipsa" <dan.lipsa at kitware.com>:
> >
> > Seun,
> > There is no flag that would remove the effects of a filter from the
> pipeline. You'll have keep pointers to A and C and insert B in the pipeline
> when needed and remove it when you don't.
> > To execute the new pipeline you'll call vktRenderWindow::Render.
>
> I guess you could subclass B and give it an easy switch function to turn
> it into a noop filter.. But better/easier to just reconfigure the pipeline
> like Dan suggests.
>
> Elvis
>
> >
> >
> >
> > On Tue, May 3, 2016 at 4:28 PM, Seun Odutola <seun at rogue-research.com>
> wrote:
> >>
> >>   Apologies for not being clear in my initial message, what I meant to
> say was that A—>C does work. I was hoping to find out a way of having
> A—>B—>C all connected but to suppress any effect of B when I don’t need it
> thus working like (A—>C) and turn B’s effect back on when I need it. In
> short, I have A(probe filter) —> B(ClipPolyData) —> C(PolyDataMapper) all
> connected but since one won’t be clipping much in the application am
> working with I want to keep the connection but just completely ignore B’s
> effect when clipping isn’t being executed (which is most of the time during
> normal operations) and vice versa turn it back on for just clipping.
> >>
> >>> On May 2, 2016, at 4:36 PM, Dan Lipsa <dan.lipsa at kitware.com> wrote:
> >>>
> >>> Seun,
> >>> What you tried should work. Call SetInputConnection on C with the
> output port of A and then call vktRenderWindow::Render.
> >>> This should execute A->C
> >>> Try setting a breakpoint on RequestUpdate for A, B and C to see what
> gets called.
> >>>
> >>>
> >>>
> >>> On Mon, May 2, 2016 at 4:19 PM, Seun Odutola <seun at rogue-research.com>
> wrote:
> >>>>
> >>>> Hello Everyone,
> >>>>
> >>>>         After researching & googling for answers to no avail, I was
> wondering if someone here could help me regarding a situation am facing. To
> keep things simple let’s say I have 3 nodes, A, B, C. A is a probeFilter, B
> is a ClipPolyData and C is a PolyDataMapper. I currently have a pipeline
> A—> B—>C and I would like to occasionally ignore B and thus have A—>C
> directly, how do I achieve this. I have tried to connect directly A—> to C
> which does nothing (unless am doing something wrong). Hoping someone could
> point me in the right direction.
> >>>>
> >>>> Regards,
> >>>>    Seun
> >>>> _______________________________________________
> >>>> 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
> >>>>
> >>>> Search the list archives at: http://markmail.org/search/?q=vtkusers
> >>>>
> >>>> Follow this link to subscribe/unsubscribe:
> >>>> http://public.kitware.com/mailman/listinfo/vtkusers
> >>>
> >>>
> >>
> >
> >
> > _______________________________________________
> > 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
> >
> > Search the list archives at: http://markmail.org/search/?q=vtkusers
> >
> > Follow this link to subscribe/unsubscribe:
> > http://public.kitware.com/mailman/listinfo/vtkusers
> >
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160504/48c09d7d/attachment.html>


More information about the vtkusers mailing list