[vtkusers] about the center of the image
Alex zhang
zjzhang at ee.cuhk.edu.hk
Wed Nov 28 10:48:53 EST 2001
Dear all:
In many examples we have these code:
vtkImageReader reader
reader ReleaseDataFlagOff
reader SetDataByteOrderToLittleEndian
reader SetDataExtent 0 255 0 255 1 93
reader SetDataOrigin -127.5 -127.5 -47
reader SetFilePrefix "$VTK_DATA/fullHead/headsq"
reader SetDataMask 0x7fff
reader Update
we use the setDataOrigin to make the image center to be the the image center,
but I don't know why the data origin is -127.5 but not -128, there are totally
256 pixels and I think if the center is 0, then there will be both 128 pixel in the
positive side and in negtive coordinate system, why -127.5?
regards,
zhang zhijun
More information about the vtkusers
mailing list