[vtkusers] in TestImageTracerWidget, how can I get the VOI

Flo snrf at no-log.org
Thu Aug 9 22:42:23 EDT 2007


Dear Yang:
This might be part of the answer:

Forwarded from an answer I had from Dean regarding  
vtkImagePlaneWidget (similar to TestImageTracerWidget)

Hi Flo,

vtkImagePlaneWidget does not use reference counting
when you set the input image data: it maintains a
pointer to the input, so that if what the pointer
points to changes (in terms of memory) you can get
an access violation or a crash.  What you can do
to work around this is to turn off the widget BEFORE
you load your data, set it's input to NULL, then
load your new data and turn the widget back on.

Dean


In my case, I created a global structure containing a dynamic array  
of pointers of type TestImageTracerWidget - object derived from the  
TestImageTracerWidget example - Works perfectly for me !

HTH
Flo.

On 9-Aug-07, at 10:19 PM, vtk itk wrote:

> dear all,
>
> I need to get the VOI by interact operation. I tried to use the  
> TestImageTracerWidget example, but the VOI can display in the  
> screen. I need to get it using pointer, then I can use it in other  
> function.
>
> Regards,
>
> Yang
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/ 
> Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers




More information about the vtkusers mailing list