[Ves] Transparent plane

Eduardo Poyart poyart at gmail.com
Mon Mar 18 17:37:25 EDT 2013


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 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.

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
>> >
>> >
>
>



More information about the Ves mailing list