Gishara Indeewarie | 24 Jul 13:03 2012
Picon

Set a fixed control point in vtk contour widget

Hi all,

I am doing a contour widget in VTK according to the example below:


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

Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers
Gishara Indeewarie | 26 Jul 13:28 2012
Picon

Re: Set a fixed control point in vtk contour widget

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:


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

Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers

Gmane