[vtkusers] Resampling an image to compare with other one

ra.corredor at gmail.com ra.corredor at gmail.com
Sat Sep 26 18:27:44 EDT 2009


Hi

I have two images of different sizes. Image A:80x120 Image B:120x80. I must  
compare both in the same size, so I have to resample or resize one of the  
images with the size values of the other one. When I use the  
vtkImageResample with B, the width changes to 80, but the height to  
119 !! ... And when I use different factor values in the method  
SetAxisMagnificationFactor, I note these results:
Factor Obtained Expected Height Value
0,5 40 40
1 80 80
1,5 119 120
2 159 160
2,01 159 161
2,1 166 168
2,7 214 216
3 238 240
3,5 277 280
4 317 320
4,1 324 328
So, when the factor increases, the number of pixels obtained with the  
SetAxisMagnificationFactor is less than the expected value.

Do you know how can I resize the B image keeping the extent of the A image  
and not losing some rows or columns in the process??


Thanks!!

RaC
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20090926/4a049047/attachment.htm>


More information about the vtkusers mailing list