[vtkusers] vtkImagePlaneWidget offset from cut plane

Shashwath T.R. trshash at gmail.com
Tue Mar 15 11:20:25 EDT 2011


You can try SetPlaneProperty() also - maybe the property isn't available to
begin with?

On Mon, Mar 14, 2011 at 9:52 PM, Bjorn Oksnevad <boksnevad at gmail.com> wrote:

> Thank you for the reply Shash.
>
> I am using the ActiViz which apparently does not support
> GetPlaneProperty(), because that threw a memory access exception.
> I looked at GetPolyData() and that lead me to look at
> GetPolyDataAlgrotithm() and GetPolyDataSource().  I'm guessing
> that vtkImagePlaneWidget.GetOrigin() is using the underlying poly data, so
> the offset would occur with the poly data as well.
>
> I did create a "fix" by setting my cut origin as the widget origin + (0.5 *
> widget normal).  That appears to align my cut outlines perfectly with the
> image plane widget.  I did remove the tubes and the outlines appear as flat
> lines on the front and back of the vtkImagePlaneWidget.
>
> Thanks,
> Bjorn
>
>
> On Sat, Mar 12, 2011 at 1:53 AM, Shashwath T.R. <trshash at gmail.com> wrote:
>
>> Hi Bjorn,
>> As I recall, vtkImagePlaneWidget already has a polydata describing the
>> boundary of the plane. You could get that and manipulate it instead of
>> mucking about with a cutter / tube filter...
>>
>> You can either directly manipulate the plane property (
>> http://www.vtk.org/doc/nightly/html/classvtkImagePlaneWidget.html#aa967a678dc64d006ef7d9c9bce703e77)
>> or get the polydata (
>> http://www.vtk.org/doc/nightly/html/classvtkImagePlaneWidget.html#a118b91779af7e29ab0162b6109531b95)
>> and send it to the tube filter if you really can't do without the tubes.
>>
>> HTH
>> Shash
>>
>> On Fri, Mar 11, 2011 at 12:53 AM, Bjorn Oksnevad <boksnevad at gmail.com>wrote:
>>
>>> Hello,
>>> I am using a vtkImagePlaneWidget to define a cutting plane for a
>>> vtkCutter.  The vtkCutter is then used to create tube outlines where the cut
>>> plane intersects some 3d mesh structures.  However, when I render the
>>> resulting outline, the outline tubes are slightly offset from the
>>> vtkImagePlaneWidget in the direction of the normal.  I was expecting the
>>> outlines to be positioned exactly on the vtkImagePlaneWidget plane, since I
>>> used GetOrigin() and GetNormal() from the plane widget to define the cutting
>>> plane.
>>>
>>> Has anyone experienced this and have a solution/explanation?
>>>
>>> Thanks in advance!
>>> Bjorn
>>>
>>>
>>> _______________________________________________
>>> 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
>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110315/4708b567/attachment.htm>


More information about the vtkusers mailing list