[vtkusers] zooming in on a volume in a render window

Jesse Corrington corrington_j at hotmail.com
Thu Dec 1 15:46:17 EST 2005


I am trying to automate the process of creating volumes of cells and 
rendering images of it rotating to make a movie.  The volumes are varying 
sizes, and I want to have the camera zoom in as far as possible so the 
volume is as big as possible without going outside the render window.  I 
know the slice width, height, and the number of slices, and I also know the 
actual object size.  For instance for one object it may be on 300 X 300 
images with 500 slices and the actual object size might be 270 X 280 X 395.  
I was trying to make an algorithm by making use of the ratio of actual size 
to image size and that ratio to the size of the window.  I also was finding 
out if the object took up more space vertically or horizontally, so i 
compared the height to the lenght of the horizontal diagonal (since it 
rotates 360).  I am running into lots of trouble getting the right answer.  
Part of the problem is that based on the object image size i don't know how 
big it will be displayed in a render window without any zoomnig.  If for 
instance i knew it would take up 100 pixels in height, then this would be 
much easier.  Can anyone give me any advice on how to do this, it would be 
much appreciated.

Thanks

Jesse Corrington

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/




More information about the vtkusers mailing list