[Insight-users] How to locate centroid position after RelabelComponentImageFilter

Gaëtan Lehmann gaetan.lehmann at jouy.inra.fr
Sun Aug 12 07:07:16 EDT 2007


Hi Gopal,

There is currently nothing ready to use to do that in ITK.
You may want to look at http://voxel.jouy.inra.fr/darcs/contrib-itk/ 
binaryAttributeMorphology/
That's a contribution I hope to submit to the insight journal next  
week, and which can give you the centroid of your objects (a much more).

Your question make me realize I haven't documented yet how to read  
attributes of an object. The basic step to get the informations you  
want are:
- convert your image to an object representation with  
LabelImageToLabelCollectionImageFilter or  
BinaryImageToLabelCollectionImageFilter
- compute the values of the attribute for all the objects with  
ShapeLabelCollectionImageFilter
- read the values your interested in the output of the  
ShapeLabelCollectionImageFilter - something like shapeFilter- 
 >GetOutput()->GetLabelObject( label )->GetCentroid()

Regards,

Gaëtan



Le 12 août 07 à 01:28, gkaremore at scai.fraunhofer.de a écrit :

> Hi All
>
> I am using RelabelComponentImageFilter to get the labeled image. Now I
> want to locate the position (Pixel coordinate) of centroid of each  
> label.
> I have gone through the filter "LabelStatisticsImageFilter" but it
> computes only min, max, variance and mean of the pixels associated  
> with
> each label or segment. If any body has come across such requirement  
> please
> let me know.
>
> Thanks!
>
> Sincerely
> Gopal
>
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users

--
Gaëtan Lehmann
Biologie du Développement et de la Reproduction
INRA de Jouy-en-Josas (France)
tel: +33 1 34 65 29 66    fax: 01 34 65 29 09
http://voxel.jouy.inra.fr



-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: =?ISO-8859-1?Q?Ceci_est_une_signature_=E9lectronique_PGP?=
Url : http://public.kitware.com/pipermail/insight-users/attachments/20070812/54e0ec0c/PGP.pgp


More information about the Insight-users mailing list