[vtkusers] Set plane normal/center of vtkImplicitPlaneWidget manually

circass circass at gmail.com
Wed Jan 27 04:17:39 EST 2010


Try to take axes Extents of ImageData and calculate the slice number for each
axes then use setSlice 

method of imlicitimageplane ( if it exists :) ) 



superzz wrote:
> 
> Sorry, I meant vtkImplicitPlaneWidget. But misspelt it to
> vtkImagePlaneWidget.
> 
> Neither SetNormal nor SetOrigin work for vtkImplicitPlaneWidget. No matter
> what values I pass to SetNormal and SetOrigin. Its origin is always
> (0,0,0) and normal is (0,0,1). But NormalToX/Y/ZAxisOn work. Is it a bug?
> 
> Thanks
> 
> superZZ
> 
> 
> David Doria-2 wrote:
>> 
>> On Thu, Jan 21, 2010 at 9:04 PM, superzz <jxdw_zlf at yahoo.com.cn> wrote:
>> 
>>>
>>> Hello
>>> How to set plane of vtkImagePlaneWidget manually? I tried
>>> vtkImagePlaneWidget->GetPlane(), then update plane center and normal to
>>> specified values. But the plane on screen kept unchanged.
>>>
>>> Thanks
>>>
>>> superZZ
>>>
>>>
>> You can change the origin like this:
>> 
>> http://www.cmake.org/Wiki/VTK/Examples/Widgets/ImagePlaneWidget
>> 
>> But VTK never has a "SetNormal" function for this type of this (which has
>> always annoyed me). There are SetPoint1 and SetPoint2 functions to set
>> two
>> of the other corners of the planar patch. I believe this is because they
>> want to allow non-rectangular patches - but it seems to me that there
>> should
>> definitely be a way to convert from an origin+normal (surely the form
>> everyone thinks in) to an origin+p1+p2.
>> 
>> Hope this helps.
>> 
>> David
>> 
>> _______________________________________________
>> 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
>> 
>> 
> 
> 

-- 
View this message in context: http://old.nabble.com/Set-plane-normal-center-of-vtkImplicitPlaneWidget-manually-tp27266462p27335611.html
Sent from the VTK - Users mailing list archive at Nabble.com.




More information about the vtkusers mailing list