[Insight-users] numerical problem after point transformation?
Stefanie Nowak
stefanie.nowak at igd.fraunhofer.de
Mon Oct 9 10:36:29 EDT 2006
Hallo,
in my algorithm, I use an inital seedpoint for my computations. After
setting the seedpoint in our application, I cut the volume with a region
of interest and compute an axis through it.
Next I resample the volume with an affine transform that consists of a
translation of the middle of the cutted volume to the origin, a rotation
around the computed axis with an defined angle and a back translation.
Now I want to know at which position the inital seedpoint is in the
resampled volume.
For that I convert the seedpoint from index coordinates to world
coordinates with the image information of the volume that was the input
of the resample filter:
for(int i = 0; i < 3; i++)
{
point[i] = inputResampleOrigin[i] + seedPoint[i] *
inputResampleSpacing[i];
}
Then I take the transform that was used as input in the resample filter:
PointType resultPoint = transform->TransformPoint(point);
And transform the computed point back to index coordinates with the
image information taken from the result of the resampling.
for(int i = 0; i < 3; i++)
{
seedOutput[i] = int(0.5 + (resultPoint[i] -
originAfterResampling[i]) / spacingAfterResampling[i]);
}
When I now mark the position of the transformed seedpoint in the
resampled volume as a black dot, the seedpoint is not at the place where
I initially set it.
To be sure about that, I marked the inital seedpoint in the dataset with
a white dot. I need the transformed seed point for further computations
and it is important that it lies in the anatomical region where I set
it. You can see a picture of it in the attachment
Has anybody an idea where my mistake is? Is it a rounding error or
numerical instabil?
Any help is appreciated!
Thanks,
Stefanie
--
---------------------------------------------------------------------
Dipl.-Inform. Stefanie Nowak
Fraunhofer Institute for Computer Graphics
Cognitive Computing and Medical Imaging (A7)
Fraunhoferstr. 5, 64283 Darmstadt, Germany
---------------------------------------------------------------------
email: stefanie.nowak at igd.fraunhofer.de
http://a7www.igd.fhg.de/persons/snowak/
phone: +49 6151 - 155 520
fax: +49 6151 - 155 480
---------------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PositionAfterTransformation.jpg
Type: image/jpeg
Size: 21851 bytes
Desc: not available
Url : http://public.kitware.com/pipermail/insight-users/attachments/20061009/a29777f9/PositionAfterTransformation-0001.jpg
More information about the Insight-users
mailing list