[Insight-users] ResampleImageFIlter discards input image's spacing?
Zachary Pincus
zpincus at stanford.edu
Tue Apr 19 14:39:49 EDT 2005
Hello,
From a brief look at the code, it appears that the
itk::ResampleImageFilter class uses a default origin of all zeros and a
default spacing of all ones, if SetOutputOrigin() and
SetOutputSpacing() are not called.
This doesn't seem to be the most intuitive behavior -- is would seem
more correct for the ResampleImageFilter to use the input image's
origin, and *especially* its spacing than defaulting to something
arbitrary. That is, given the importance of the spacing values in ITK
and the fact that a resampler is probably more likely to be used in a
geometric transform than to change spacing values, it seems like
throwing away the input image's spacing information by default might
not be the right way to go. Moreover, if I recall correctly, other
image filter classes just pass along the origin and spacing of the
input, so this seems even more at variance.
Is this in fact the case, or did I overlook the part of the code where
the ResampleImageFilter actually does, by default, retain the input
image's spacing?
Zach Pincus
Department of Biochemistry and Program in Biomedical Informatics
Stanford University School of Medicine
More information about the Insight-users
mailing list