[vtkusers] What is intermediate nodes in vtkContourWidgets?

Prathamesh Kulkarni prathameshmkulkarni at gmail.com
Thu Jul 22 12:20:22 EDT 2010


I have not tried changing the representation in my application for
vtkContourWidget. For vtkSeedWidget, I could do it using
seed_representation->setHandleRepresentaion(). So you might have to insert a
similar method into your subclass of (a derived class of)
vtkContourRepresentation.

Initializing a wiget should take the following:
yourContourRepresention->AddNodeAt....() and then widget->SetVisibleOn()

This will make the widget (with whatever number of points you add) appear by
default. More points can always be added to it by the user.

Hope this helps.


Prathamesh

On Thu, Jul 22, 2010 at 11:00 AM, Rakesh Patil <rakeshthp at in.com> wrote:

>
> Dear Prathamesh,
>
> I was trying to insert the intermediate nodes.. But i failed to do so..
> Well, i went through the documentation of vtkHandleRepresentation..
> It is an abstract class.. So do i need to derive my own class and implement
> some functions..?? How do i use this class with
> vtkContourRepresentation..?
>
> Well, i create a contour using the mouse clicks.. In this case, how can i
> initialize a contour with two nodes,,?? As the positions of the nodes
> will be available only when user clicks on the graphics window..
>
>
> Thanks
>
> ---------- Original message ----------
> From:"Prathamesh Kulkarni"< prathameshmkulkarni at gmail.com >
> Date: 22 Jul 10 20:21:38
> Subject: Re: Re: What is intermediate nodes in vtkContourWidgets?
> To: Rakesh Patil <rakeshthp at in.com>
>
> I have not had the representations changed for my applicat ion. But this
> may be achieved by using the vtkHandleRepresentation with your
> vtkContourRepresentation.
>
> To handle the intermediate nodes, you can initialize a contour with two
> nodes (with some representation) and allow the user to add more nodes (with
> some other representation).
>
> Prathamesh
>
> On Wed, Jul 21, 2010 at 11:42 PM, Rakesh Patil <rakeshthp at in.com> wrote:
>
>>
>> Hi Prathamesh,
>>
>> What i want is a contour having two end nodes displayed as a big circles
>> or any other shape
>> and all the other points in the contour wherever i have clicked must be
>> displayed in a small size
>>
>> Is it possible to do that..?? I mean except for the first and the last
>> click all other nodes must be intermediate nodes.
>>
>> Any idea, how to do this??
>>
>> Thanks
>>
>>
>>
>> ---------- Original message ----------
>> From:"Prathamesh Kulkarni"< prathameshmkulkarni at gmail.com >
>> Date: 21 Jul 10 21:45:46
>> Subject: Re: What is intermediate nodes in vtkContourWidgets?
>> To: rakeshthp at in.com
>>
>> Hello Rakesh,
>>
>> Going by the default behavior of vtkContourWidget, the representation
>> should not have any nodes (intermediate or not) until you right click (or
>> close the contour). You can verify this by
>> contour_representation->GetNumberOfNodes();
>>
>> The intermediate nodes should be (though I have not) used to get the nodes
>> within a certain range.
>>
>> There are many ways to adding a node to a contour, for example:
>> contour_representation->AddNodeOnContour(x, y);
>>
>>
>> Prathamesh
>>
>> Message: 30
>> Date: Wed, 21 Jul 2010 20:18:51 +0530
>> From: "Rakesh Patil" <rakeshthp at in.com>
>> Subject: [vtkusers] What is intermediate nodes in vtkContourWidgets?
>> To: "vtkusers" <vtkusers at vtk.org>
>> Message-ID: <1279723731.8133415ea4647b6345849fb38311cf32 at mail.in.com>
>> Content-Type: text/plain; charset="utf-8"
>>
>> Hello,From the documentation of vtkOrientedGlyphContourReprese
>> ntation, i came across intermediate nodes..?? What are these and how to
>> add them?? When i get the total number of intermediate nodes, i get the
>> output as zero..what is this intermediate nodes and how to add them and
>> display?thanks.Dear vtkusers ! Get Yourself a cool, short @in.com Email
>> ID now!
>>
>>
>>
>> Get Yourself a cool, short *@in.com* Email ID now!<http://mail.in.com/mails/new_reg.php?utm_source=invite&utm_medium=outgoing>
>>
>
>
>
> Get Yourself a cool, short *@in.com* Email ID now!<http://mail.in.com/mails/new_reg.php?utm_source=invite&utm_medium=outgoing>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100722/024cb417/attachment.htm>


More information about the vtkusers mailing list