[vtkusers] Standard Views
David Gobbi
dgobbi at irus.rri.ca
Mon Jan 21 15:54:20 EST 2002
Hi Julien,
The problem is not with vtkImageClip, it is with vtkImageViewer.
That is to say, the image is being clipped but the viewer draws
the lower-left corner at the image at window coordinates (xmin,ymin)
instead of at window coordinates (0,0) like you would expect.
This bug (feature?) of VTK has been around forever. You can
use vtkImageTranslateExtent to translate the image extent by
(-xmin,-ymin,0) and this should fix the display problem.
- David
On Mon, 21 Jan 2002, Julien Bailly wrote:
> Hi,
> I'm almost a new user of VTK, and I'm trying to learn using it by doing some
> not to complicated things.
> But I've got a little problem:
>
> I'm trying to display only a part oh a 2D image, using vtkImageClip.
> The image is well clipped, but it still has its original dimension
> (everithing that is clipped is black).
> I'm using tcl/tk and the interersting part of my function is:
>
> imageClip SetOutputWholeExtent xmin xmax ymin ymax 0 0
> viewer SetInput [ $Draw(imageClip) GetOutput ]
>
> imageclip is my vtkImageClip object, and viewer is my vtkImageViewer.
> what I would like, is that if the size of my viewer is (xmax - xmin) and
> (ymax-ymin), it shows the whole imageclip.
> Instead, if for example xmin equal 10, the viewer shows black background for
> x 0->10 and then my image correctly, but from xmax-10 to xmax, it is not
> displayed (outside of the viewer).
>
> I hope I'm enough clear so that you can understand what I'm trying to
> explain.
> And if yes, do you have any suggestions ?
>
> Thany you very much
>
> JUL
>
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
>
More information about the vtkusers
mailing list