[vtkusers] Set a fixed control point in vtk contour widget
Gishara Indeewarie
gish.777 at gmail.com
Thu Jul 26 07:28:23 EDT 2012
Hi,
I did it by accessing the interaction event with vtkCommand and if the
interaction is with the point we need to set as fixed, set the active node
position to the
coordinates of that point.
So it remains fixed. Below is the code.
double point[3] =
{0.32722276735030559,0.086951000000000001,0};
this->Representation->GetNthNodeWorldPosition(0,pos2);
this->Representation->GetActiveNodeWorldPosition(pos);
if( (pos[0] == pos2[0]) && (pos[1]==pos2[1])){
this->Representation->SetActiveNodeToWorldPosition(point)
}
Thanks.
On Tue, Jul 24, 2012 at 4:33 PM, Gishara Indeewarie <gish.777 at gmail.com>wrote:
> Hi all,
>
> I am doing a contour widget in VTK according to the example below:
>
> http://www.vtk.org/Wiki/VTK/Examples/Cxx/Widgets/ContourWidget
>
> I want to make a certain control point as fixed, so the user can't drag it.
> I want to do it for that particular point only.
> I tried many methods, such as keypressactivationoff, draggableoff etc but
> did not work out.
> Is there any way to do this?
>
> Thanks.
>
--
Gish
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120726/d90a022f/attachment.htm>
More information about the vtkusers
mailing list