[vtkusers] Possible bug in vtkImageResample or vtkImageReslic e when doing de mag

Huntsinger, Reid reid_huntsinger at merck.com
Wed Dec 8 17:24:22 EST 2004

You seem to have asked for (tri-) cubic interpolation, which may indeed
introduce new maxima and minima, since your interpolation points are not
just data points (with a factor of 2 exactly they would be). 

Reid Huntsinger

-----Original Message-----
From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] On Behalf
Of Leue, William M (Research)
Sent: Wednesday, December 08, 2004 4:52 PM
To: 'vtkusers at vtk.org'
Subject: [vtkusers] Possible bug in vtkImageResample or vtkImageReslice when
doing de mag

Hi, I appear to have found a bug when using vtkImageResample to do image
demagnification. I am guessing the bug is really in vtkImageReslice because
vtkImageResample is just a thin wrapper object. I am using VTK Release

The bug symptoms are that an image volume that has been demagnified by
approximately a factor of 2 (not exactly) has a small percentage of voxel
values that are outside the range of the input values. The image volume is
CT data with a range of 0..4095. The image data has been converted from the
original unsigned short format to float before demagnification. The output
volume after demagnification has a range of 0..4938. About 1.5% of the
original voxels now have values that are higher than 4095.

A snippet of the relevant code is:

  vtkImageResample* samp = vtkImageResample::New();
  samp->SetAxisMagnificationFactor(0, xratio);
  samp->SetAxisMagnificationFactor(1, yratio);
  samp->SetAxisMagnificationFactor(2, zratio);

xratio and yratio are about 2.0916, and zratio is exactly 2.

Any ideas?
-Bill Leue
William M. Leue
GE Global Research
M/S KWC-211
1 Research Circle
Schenectady, NY 12309
518-387-7210, 8*833-7210
leue at crd.ge.com

This is the private VTK discussion list. 
Please keep messages on-topic. Check the FAQ at:
Follow this link to subscribe/unsubscribe:

Notice:  This e-mail message, together with any attachments, contains information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station, New Jersey, USA 08889), and/or its affiliates (which may be known outside the United States as Merck Frosst, Merck Sharp & Dohme or MSD and in Japan, as Banyu) that may be confidential, proprietary copyrighted and/or legally privileged. It is intended solely for the use of the individual or entity named on this message.  If you are not the intended recipient, and have received this message in error, please notify us immediately by reply e-mail and then delete it from your system.

More information about the vtkusers mailing list