[Ves] Transparent plane
Aashish Chaudhary
aashish.chaudhary at kitware.com
Tue Mar 19 00:14:00 EDT 2013
Hi Eduardo
On Mon, Mar 18, 2013 at 5:37 PM, Eduardo Poyart <poyart at gmail.com> wrote:
> Hi Pat,
>
> Thanks, it has been really helpful. It turns out I can't use
> vesKiwiPlaneWidget, because it doesn't have an actor() accessor like
> vesKiwiPolyDataRepresentation does. In my scene graph, I have a
> Transform node with my model underneath, and I want the plane node to
> be another child of the same Transform so that it moves with it.
>
> I guess my suggestion would be to add actor() accessors to all
> Representations to make them consistent. I think it's a common need to
> create your own scene graph with the provided widgets.
>
This sounds like a good idea.
>
> This would introduce an interesting issue: for representations that
> have multiple sub-representations (like vesKiwiPlaneWidget itself),
> the sub-representations should be in their own scene graph, i.e. child
> of a Transform. It would actually be cleaner to modify changes to the
> parent Transform instead of individually modifying all the Transforms
> (for example in vesKiwiPlaneWidget::onTransformModified()).
>
> You can also think about making the Representations implement the
> vesNode interface so that they can be directly added to the scene
> graph.
>
This is an interesting suggestion but I think if we do this then it may
change the API (implementation more so) of representations somewhat
although it does have some benefits too.
When we get an opportunity we will discuss this possibility.
Thanks,
>
> Best
> Eduardo
>
>
> On Mon, Mar 18, 2013 at 1:14 AM, Pat Marion <pat.marion at kitware.com>
> wrote:
> > Ok. I think you'll find the vesKiwiPlaneWidget is missing a crucial
> > function- a function to initialize the plane position, orientation, and
> > scale. I just merged a branch into next, called plane-widget-api which
> adds
> > some more helpful methods. It's still not great, and is missing
> > documentation, I want to improve it later when I have some time. But,
> you
> > can now access the vtkTransform and call the vtkTransform api to position
> > and rotate and scale the widget. If you use it and have suggestions for
> > possible improvements, let me know!
> >
> > Pat
> >
> >
> > On Mon, Mar 18, 2013 at 5:58 PM, Eduardo Poyart <poyart at gmail.com>
> wrote:
> >>
> >> Thank you for the pointers. I see that it's wrapped by the
> >> vesKiwiPlaneWidget, I'll try that route.
> >>
> >> Cheers
> >> Eduardo
> >>
> >> On Sun, Mar 17, 2013 at 9:29 PM, Pat Marion <pat.marion at kitware.com>
> >> wrote:
> >> > Have you seen the interactive brain atlas demo in KiwiViewer? That
> uses
> >> > a
> >> > clipping plane. Is that similar to what you are trying to do? The
> >> > plane is
> >> > generated using the vtkPlaneSource, then set the color and
> transparency
> >> > using vesKiwiPolyDataRepresentation::setColor().
> >> >
> >> > Pat
> >> >
> >> > On Mon, Mar 18, 2013 at 2:18 PM, Eduardo Poyart <poyart at gmail.com>
> >> > wrote:
> >> >>
> >> >> Hi,
> >> >>
> >> >> I would like to add a transparent plane to the scene graph. I need to
> >> >> indicate a cutting plane for simulation of an ultrasound procedure.
> >> >> Ideally it would be a transparent green quad, with no texture.
> >> >>
> >> >> What would be the best way to do it?
> >> >>
> >> >> Thanks
> >> >> Eduardo
> >> >> _______________________________________________
> >> >> Ves mailing list
> >> >> Ves at public.kitware.com
> >> >> http://public.kitware.com/cgi-bin/mailman/listinfo/ves
> >> >
> >> >
> >
> >
> _______________________________________________
> Ves mailing list
> Ves at public.kitware.com
> http://public.kitware.com/cgi-bin/mailman/listinfo/ves
>
--
| Aashish Chaudhary
| R&D Engineer
| Kitware Inc.
| www.kitware.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/ves/attachments/20130319/5f281e94/attachment-0001.html>
More information about the Ves
mailing list