[vtkusers] FOV problem with vtkPerspectiveTransform?

Lloyd, Chuck (MED) Charles.Lloyd at med.ge.com
Fri Jan 2 09:51:03 EST 2004


The scale (and for OpenGL the position) of the view is 
not exactly as I would expect it to be. This is causing 
problems in my automated testing.

It seems that the FOV is off by some rounding error.
I've been trying to trace down the error with a debugger but it is 
slow going. I thought I would see if someone could point me to
a specific section of code. 

I could obviously add an error tolerance to the test or leave the
fudge factor. I'd prefer not to because it is a much stronger 
verification without these.

The test creates an image, postions it in space, creates a vtkImageActor
from the image, sets a camera for a full view of the image, renders the
view,
grabs the image from the render window, and compares the input and
output.

With the fudge factor and interpolation off, I can get exactly zero
errors.

The simplest case to see is a 3x3 image.

Run 3x3 case with fudge factor applied and it works
	 (You will need to hit 'q' three times to close the viewer
windows)
	>imgcmp 3
Run 3x3 case with no fudge factor applied and it fails
	>imgcmp 3 0.0


 <<imgcmp.cxx>> 

g                                         GE Medical Systems
______________________________________________________
Charles F. Lloyd
Sr. Software Engineer
GE Medical Systems Navigation and Visualization, Inc
439 South Union Street
Lawrence, MA 01843
Phone: (978) 552-5282
email: Charles.Lloyd at med.ge.com



-------------- next part --------------
A non-text attachment was scrubbed...
Name: imgcmp.cxx
Type: application/octet-stream
Size: 7907 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20040102/c16534c0/attachment.obj>


More information about the vtkusers mailing list