[vtkusers] vtkImageChangeInformation Negative Offset

Ben Wilde werewolfolondon at hotmail.com
Fri Feb 17 16:38:47 EST 2006


Hello,

I've come across a strange behavior with vtk, and I'm wondering if I'm doing 
something wrong or if I've come across a bug.

I am using vtkImageChangeInformation to define an image, which works without 
any problems.  I then want to change the scaling of the image, so I use 
SetOutputSpacing, passing the x scale, y scale and 1 as the three arguments. 
  Next, I want to try negative scaling to be able to 'flip' the image 
horizontally or vertically.  When I pass negative values (from 0 to -1) as 
the y scale factor (the second argument in SetOutputScaling), the image 
flips perfectly.  When I try the same thing with the y scale factor, though, 
the image disappears as soon as the scale factor gets below zero (even 
though scaling works fine for positive values).

Has anybody come across this before?  Or does it look like I'm just doing 
something stupid?

Thanks,
Ben





More information about the vtkusers mailing list