<div dir="ltr"><div><div><div><div><div><div><div>Hi,<br><br></div>there is no SetNormal() method but a plane normal can be defined from 3 points<br></div>and vtkImagePlaneWidget allows SetPoint1(), SetPoint2(), SetOrigin() .<br><br></div>try this (pseudocode):<br><br></div><div>if you define your normal from an origin, o and 2 other points p1, p2<br></div><div>such that p1 , p2 and o define a plane (and also 3 corners of the widget)<br></div><div>then a normal to the plane, n, can be found with<br></div><div>po1 = p1 - o;<br></div><div>po2 = p2 - o;<br></div><div>n = po1/||po1|| x po1/||po2||<br></div><div><br></div><div>where x is the cross product operator and ||.|| is the norm of a vector.<br></div><div></div><div>To set the widget's plane normal, you do so indirectly from p1, p2 and o:<br></div><div><br></div>w.SetPoint1(p1)<br></div>w.SetPoint2(p2)<br></div>w.SetOrigin(o)<br></div>w.UpdatePlacement()<br><div><br><br></div><div>best,<br></div><div>Dean<br></div><div><div><div><div><br><br></div></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jun 22, 2015 at 10:14 PM, 沧海一粟 <span dir="ltr"><<a href="mailto:liyihai2009@qq.com" target="_blank">liyihai2009@qq.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>I just found method GetNormal() of vtkImagePlaneWidget, but no SetNormal(). I want to set the plane normal, how should I do it ?</div><br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" rel="noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=vtkusers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><br></div>