<DIV >Hi Patrick,</DIV>
<DIV> </DIV>
<DIV>I have seen a nasty things for a long time, although it is not a bug in general.</DIV>
<DIV> </DIV>
<DIV>When I launch FourViewsTrackingWithCT or other application, open DICOM</DIV>
<DIV>images in Sandbox/Testing/Data/E000192.</DIV>
<DIV> </DIV>
<DIV>In general, the information important is</DIV>
<DIV>Origin:  (0020,0032) Tag "Image Position (Patient)" [-153.66406 -307.66406 -196]<BR>Voxel Spacing: [0.671875 0.671875 5] mm</DIV>
<DIV>Orientation:   (0020|0037) Image Orientation (Patient) = 1\0\0\0\1\0<BR>Tehn the bounding box is as follows<BR>x belongs to [-153.66406 190.335940),<BR>y belongs to [-307.66406 36.335940),<BR>z belongs to [-196       -171).</DIV>
<DIV> </DIV>
<DIV>If move the axial slider bar to "0" and "4", click left button in the slice,<BR>the point for example will be<BR>[..., ..., -195.99983634979358]<BR>and<BR>[..., ..., -175.99984029590132]</DIV>
<DIV>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<BR>[-153.66404315062994, ..., ...]<BR>and<BR>[189.66402805204811, ..., ...]</DIV>
<DIV>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<BR>[..., -307.66407584841579, ...]<BR>and<BR>[..., 35.66404315062988,   ...]</DIV>
<DIV> </DIV>
<DIV>And you can see, when the pick position is in coronal slice "0", the first slice,</DIV>
<DIV>because -307.66407584841579 is less than -307.66406, so the ITK Inside function will report </DIV>
<DIV>"(DEBUG) Picked point outside image..."<BR>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.</DIV>
<DIV> </DIV>
<DIV>I think this is due to double numeric precision and ITK convention</DIV>
<DIV>in the convention, the bounds of a voxel whose spacing is 1mm and originated</DIV>
<DIV>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.</DIV>
<DIV> </DIV>
<DIV>I am also confused by the origin, as in ITK DICOM orientation proposal:</DIV>
<DIV>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.</DIV>
<DIV>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(<A href="http://afni.nimh.nih.gov">http://afni.nimh.nih.gov</A>), it will generate its local image format and report </DIV>
<DIV>origin as</DIV>
<DIV>I-to-S extent:  -196.000 [I] -to-  -176.000 [I] -step-     5.000 mm [  5 voxels]</DIV>
<DIV>in the centeric meaning.</DIV>
<DIV> </DIV>
<DIV>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.</DIV>
<DIV> </DIV>
<DIV>Thank you very much!</DIV>
<DIV> </DIV>
<DIV>Best,</DIV>
<DIV>Fucang</DIV><br><!-- footer --><br>