[Insight-users] Funny LabelObject GetCentroid() behaviour

Mario Ceresa mrceresa at gmail.com
Fri Sep 17 11:05:20 EDT 2010


Hello again!
At last I traced the problem down to GDCM itself.

In one machine I compiled ITK using the included gdcm lib (ver 1.2.2?)
while in the other I link against the newer gdcm 2.0.

It seems that the gdcm 2.0 that I installed is not reading correctly
the origin and the spacing from the dicom header, as the values
defaults to (0,0,0) and (1,1,1).

On the other machine gdcm 1.22 reads the values (-211, -430, -347.5)
and (0.8, 0.8, 1) and this originates the negative centroid after a
call to:
 output->TransformContinuousIndexToPhysicalPoint( centroid, physicalCentroid );

I'll separately ask to the gdcm mailing list for help!

Thanks and sorry for the noise,

Mario

On 14 September 2010 18:33, Mario Ceresa <mrceresa at gmail.com> wrote:
> Hello everybody!
> I have a funny problem with the GetCentroid() method of LabelObject:
>
> On a Fedora 13 64 bit - ITK 3.16 +  binaryAttributeMorphology
> downloaded on Jan  3  2010 everything works correctly:
>
> [mario at 1006505 bin]$ ./test_centroid 3-map.dcm
>    Considering object 1 with size 37839488 and center [251.218,
> 171.493, 174.806]
>    Considering object 2 with size 9791707 and center [261.554,
> 316.538, 154.827]
>    Considering object 20 with size 134676 and center [373.458,
> 177.895, 337.078]
>
> On a Red Hat Enterprise Linux Server release 5.5 - 64 bit - with the
> same ITK and binaryAttributeMorphology version, the output is:
>
> [mario at 1006504 bin]$ test_centroid 3-map.dcm
>    Considering object 1 with size 37839488 and center [-9.43763,
> -292.436, -172.694]
>    Considering object 2 with size 9791707 and center [-1.14033,
> -176.002, -192.673]
>    Considering object 20 with size 134676 and center [88.689,
> -287.296, -10.4225]
>
> I attach the program that I used to test the error and I also uploaded
> the image on dropbox just in case:
>
> http://dl.dropbox.com/u/9513411/3-map.dcm.tar.gz
>
> Thanks for any insight ;) you might provide on this issue,
>
> With best regards,
>
> Mario
>


More information about the Insight-users mailing list