[vtkusers] about the center of the image
anast.jm at pg.com
anast.jm at pg.com
Wed Nov 28 11:26:07 EST 2001
Alex,
I suspect its because half the pixels are 0-127 and the other half are 128-255
so the exact center is at 127.5, and this becomes the offset at -127.5. Only if
the number of pixels is odd would the image center be directly on a pixel
center...john
Internet Mail Message
Received from host: public.kitware.com
[208.136.18.25]
From: "Alex zhang" <zjzhang at ee.cuhk.edu.hk>@public.kitware.com on 11/28/2001
11:48 PM ZE8
"Alex zhang" <zjzhang at ee.cuhk.edu.hk> To: <vtkusers at public.kitware.com>
@public.kitware.com Cc: (bcc: John Anast-JM/PGI)
Subject: [vtkusers] about the center of the
image
Sent by: vtkusers-admin at public.kitware.com
11/28/2001 10:48 AM
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