[vtkusers] Code controlling vtkImagePlaneWidget
Raúl Ferriz
raul at torresyvalero.com
Wed Sep 22 11:54:14 EDT 2010
El 22/09/2010 17:34, Dean Inglis escribió:
> did you check to see if your origin, point1 and point2
> are contained within the bounds of the image data?
> double bounds[6];
> image->GetBounds(bounds);
> vtkBoundingBox box;
> box.SetBounds(bounds);
> if(box.ContainsPoint( origin ) &&
> box.ContainsPoint( point1 ) && box.ContainsPoint( point2 ) )
> printf("ok");
> else printf("error");
>
> also, widget needs to have UpdatePlacement() called
> after changing origin/point1/point2.
>
> Dean
>
Many thanks!
I though that would be enought to call ImagePlaneWidget->Modified(), but
not, it is needed to call UpdatePlacement() :D.
More information about the vtkusers
mailing list