Resizing vtkImageWindow vs. Resizing vtkRenderWindow
Brian Alexander Todd
bat5 at po.cwru.edu
Mon Nov 22 09:12:00 EST 1999
Thanks David.
Quick recap. I had asked how to implement some default
resizing behavior for images in vtk. David's responses
are: (I have a couple followup questions afterwards)
At 08:20 PM 11/19/99 -0500, David Gobbi wrote:
>Hi Brian,
>
>There are two ways of doing what you are looking for.
>1) use a vtkRenderWindow with parallel projection, and display
> your images on texture maps
>2) use a vtkImageWindow, but use either vtkImageResample or
> vtkImageReslice to scale the image data -- see the
> example contrib/examplesPython/SliceViewerWidget.py
> in recent nightly releases to get an idea of the math involved.
>
> - David
>
>--
> David Gobbi, MSc dgobbi at irus.rri.on.ca
> Advanced Imaging Research Group
> Robarts Research Institute, University of Western Ontario
>
I think I am going to go with the first option,
since I would prefer to work at the window level. Will
I take a huge hit on efficiency since I'm moving away
from the image window, to the 3D pipeline? I'm dealing
with images typically of 512x512 pixels and only one
z-slice but I would like everything to run reasonably
smoothly on the average PC. Is TPlane.tcl a good example
of parallel projection, and displaying images on texture
maps or should I look somewhere else?
Thanks,
Brian Todd
My original message
>On Fri, 19 Nov 1999, Brian Alexander Todd wrote:
>
>> I have a question about resizing windows in vtk. vtkRenderWindow
>> seems to respond to size events automatically by scaling all
>> of the actors to the new screen coordinates. vtkImageWindow does
>> not. I assume that this behavior is used because images have
>> implicit geometry and the window is therefore expected to conform
>> to the image geometry.
>>
>> For my application, I would like to implement some default rescaling
>> of images (the images are subordinate to the window). I would probably
>> have the image maximize its dimensions to fill the window while
>> maintaining the appropriate aspect ratio. What is the easiest way
>> to go about this. It would be best if it could occur at the level
>> of vtkImageWindow (since I already have a reference to this and
>> it assumes little), maybe if at the vtkImager level if vtkImageWindow
>> is not possible, but preferably not at the level of individual image
>> sources or something.
>>
>> What is the best way to go about this.
>>
>> Thanks,
>> Brian
>>
>> _____________________________________________________
>> ________| |________
>> \ | Brian Todd email: bat5 at po.cwru.edu | /
>> \ | N.O.B.L. home: (216) 791-2407 | /
>> \ | C.W.R.U. office: (216) 368-4209 | /
>> / | Cleveland, OH 44106 fax: (216) 368-4969 | \
>> / |_____________________________________________________| \
>> /___________) (__________\
>>
>>
>>
-----------------------------------------------------------------------------
>> This is the private VTK discussion list. Please keep messages on-topic.
>> Check the FAQ at: <http://www.automatrix.com/cgi-bin/vtkfaq>
>> To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
>> <majordomo at gsao.med.ge.com>. For help, send message body containing
>> "info vtkusers" to the same address. Live long and prosper.
>>
-----------------------------------------------------------------------------
>>
>
>
>
>-----------------------------------------------------------------------------
>This is the private VTK discussion list. Please keep messages on-topic.
>Check the FAQ at: <http://www.automatrix.com/cgi-bin/vtkfaq>
>To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
><majordomo at gsao.med.ge.com>. For help, send message body containing
>"info vtkusers" to the same address. Live long and prosper.
>-----------------------------------------------------------------------------
>
>
>
_____________________________________________________
________| |________
\ | Brian Todd email: bat5 at po.cwru.edu | /
\ | N.O.B.L. home: (216) 791-2407 | /
\ | C.W.R.U. office: (216) 368-4209 | /
/ | Cleveland, OH 44106 fax: (216) 368-4969 | \
/ |_____________________________________________________| \
/___________) (__________\
-----------------------------------------------------------------------------
This is the private VTK discussion list. Please keep messages on-topic.
Check the FAQ at: <http://www.automatrix.com/cgi-bin/vtkfaq>
To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
<majordomo at gsao.med.ge.com>. For help, send message body containing
"info vtkusers" to the same address. Live long and prosper.
-----------------------------------------------------------------------------
More information about the vtkusers
mailing list