[IGSTK-Users] Voxel bound and numeric precision problem
jiafucang at 126.com
jiafucang at 126.com
Thu Jan 25 22:33:04 EST 2007
Hi Patrick,
I have seen a nasty things for a long time, although it is not a bug in general.
When I launch FourViewsTrackingWithCT or other application, open DICOM
images in Sandbox/Testing/Data/E000192.
In general, the information important is
Origin: (0020,0032) Tag "Image Position (Patient)" [-153.66406 -307.66406 -196]
Voxel Spacing: [0.671875 0.671875 5] mm
Orientation: (0020|0037) Image Orientation (Patient) = 1\0\0\0\1\0
Tehn the bounding box is as follows
x belongs to [-153.66406 190.335940),
y belongs to [-307.66406 36.335940),
z belongs to [-196 -171).
If move the axial slider bar to "0" and "4", click left button in the slice,
the point for example will be
[..., ..., -195.99983634979358]
and
[..., ..., -175.99984029590132]
Move the sagittal slider bar to "0" and "511", zoom in the image, clikc left button in the slice, the point for example will be
[-153.66404315062994, ..., ...]
and
[189.66402805204811, ..., ...]
Move the coronal slider bar to "0" and "511", zoom in the image, click left button in the slice, the point for example will be
[..., -307.66407584841579, ...]
and
[..., 35.66404315062988, ...]
And you can see, when the pick position is in coronal slice "0", the first slice,
because -307.66407584841579 is less than -307.66406, so the ITK Inside function will report
"(DEBUG) Picked point outside image..."
so the ellipsoid object does not display on this plane. These phenomenon can also occurs in axial or sagittal plane depends the DICOM image it reads.
I think this is due to double numeric precision and ITK convention
in the convention, the bounds of a voxel whose spacing is 1mm and originated
from (0,0,0) will be [0,1) in x,y,z direction respectively, so it will easily generate the error above. If the bounds change to [-0.5,0.5) convention, it may not change the error. Or to avoid numeric error, a small number such as 0.001 could be considered in the Inside function but will at performance penalty.
I am also confused by the origin, as in ITK DICOM orientation proposal:
Image Position (Patient) (0020,0032) The x, y, and z coordinates of the upper left hand corner (center of the first voxel transmitted) of the image, in mm.
It seems that the origin is the center of the first voxel, so in physical semantics, the voxel should originated at z direction -196-0.5*5 = -198.5, is that right in the ITK convention? In other popular software such as AFNI(http://afni.nimh.nih.gov), it will generate its local image format and report
origin as
I-to-S extent: -196.000 [I] -to- -176.000 [I] -step- 5.000 mm [ 5 voxels]
in the centeric meaning.
Although bound problem is a small problem, but in Parkinson's disease neurosurgery, the target to be damaged required to be in 1mm precision to get the perfect effect, so if a voxel computed in the image inside can be mis-computed as half a voxel distance.
Thank you very much!
Best,
Fucang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/igstk-users/attachments/20070126/63c82645/attachment-0001.html>
More information about the IGSTK-Users
mailing list