[vtkusers] Arrow and plane not orthogonal in vtkImplicitPlaneWidget

Xiaopeng Yang yxp233 at postech.ac.kr
Fri Nov 30 19:31:37 EST 2012


Dear Users,

 

I found a problem when I used vtkImplicitPlaneWidget for cutting. I set the
origin and normal for the planeWidget I defined. But when showing the
result, I found that the arrow and the plane was not orthogonal. I could not
understand why it happened. Here is my code:

 

        vtkImplicitPlaneWidget *planeWidget = vtkImplicitPlaneWidget::New();

 

        planeWidget_SP->SetInteractor(iren_SP);

        planeWidget_SP->SetPlaceFactor(1.0);

        planeWidget_SP->SetHandleSize(0.01);

        planeWidget_SP->SetInput(iso_Liver->GetOutput());

        

        planeWidget_SP->PlaceWidget();

        

        planeWidget_SP->SetOrigin(Center); 

        planeWidget_SP->SetNormal(n); 

        

        planeWidget_SP->SetRepresentationToSurface();

        planeWidget_SP->GetPlaneProperty()->SetColor(0.4,0.8,0.9);

        planeWidget_SP->GetPlaneProperty()->SetOpacity(0.9);

        

 
planeWidget_SP->AddObserver(vtkCommand::InteractionEvent,myCallback);

 

        planeWidget_SP->SetEnabled(1);

 

Could anyone please check my code and tell me whether and where I made a
mistake?

 

Thanks a lot,

Xiaopeng

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20121201/3be42434/attachment.htm>


More information about the vtkusers mailing list