[Insight-users] How to label the output of binary threshold filter

Gaëtan Lehmann gaetan.lehmann at jouy.inra.fr
Thu Oct 18 10:30:07 EDT 2007


Le 18 oct. 07 à 01:04, Ali - a écrit :

> Gaëtan,
>
> What would be the best way of iterating over a 'label map'

you can iterate over simply by using their labels :

labelMap = filter.GetOutput()
for label in range(0, labelMap.GetNumberOfLabelObjects()+1 ):
   labelObject = labelMap.GetLabelObject(label)

> and fit each indivdual object to a know model (eg 2D Gaussian) and  
> then adding the attributes of the fitting (eg the sigma of the  
> Gaussian fit) to the corresponding object? I guess this could be a  
> good extention of your binary attribute morphology classes.

I don't know how to fit a 2D gaussian. It may be an interesting  
feature though.
If you can provide some informations about that, and if that's not  
much difficult, I would be pleased to add it :-)

Regards,

Gaëtan



>
> >
> >
> > Le 15 oct. 07 à 16:25, Ali - a écrit :
> >
> > > Gaëtan,
> > >
> > > That include command solved the problem. Thank you.
> > >
> >
> > Great :-)
> >
> > The changes are commited, and will be in the next revision to the
> > insight journal.
> >
> > Gaëtan
> >
> >
> > > >
> > > >
> > > > Hi Ali,
> > > >
> > > > Le 14 oct. 07 à 19:47, Ali - a écrit :
> > > >
> > > > > Gaëtan,
> > > > >
> > > > > I get these errors while compiling your IJ labeling classes  
> with
> > > > > python wrappers:
> > > > >
> > > > > Generating wrap_itkStatisticsOpeningLabelMapFilter.xml
> > > > > In file included from E:/dev/itk/IJ/IJ-
> > > > > Label_object_representation_and_manipulation_with_ITK.3/
> > > > > binaryAttributeMorphology/itkLabelMapFilter.h:116,
> > > > > from E:/dev/itk/IJ/IJ-
> > > > > Label_object_representation_and_manipulation_with_ITK.3/
> > > > > binaryAttributeMorphology/itkInPlaceLabelMapFilter.h:23,
> > > > > from E:/dev/itk/IJ/IJ-
> > > > > Label_object_representation_and_manipulation_with_ITK.3/
> > > > > binaryAttributeMorphology/itkShapeOpeningLabelMapFilter.h:20,
> > > > > from E:/dev/itk/IJ/IJ-
> > > > > Label_object_representation_and_manipulation_with_ITK.3/
> > > > > binaryAttributeMorphology/ 
> itkStatisticsOpeningLabelMapFilter.h:20,
> > > > > from E:/dev/itk/IJ/IJ-
> > > > > Label_object_representation_and_manipulation_with_ITK.3/build/
> > > > > Wrapping/wrap_itkStatisticsOpeningLabelMapFilter.cxx:19:
> > > > > E:/dev/itk/IJ/IJ-
> > > > > Label_object_representation_and_manipulation_with_ITK.3/
> > > > > binaryAttributeMorphology/itkLabelMapFilter.txx: In
> > > > > member function `virtual void itk::LabelMapFilter<TInputImage,
> > > > > TOutputImage>::BeforeThreadedGenerateData()':
> > > > > E:/dev/itk/IJ/IJ-
> > > > > Label_object_representation_and_manipulation_with_ITK.3/
> > > > > binaryAttributeMorphology/itkLabelMapFilter.txx:88: error:  
> syntax
> > > > > error before `(' token
> > > > > Project : error PRJ0019: A tool returned an error code from
> > > > > "Generating wrap_itkStatisticsOpeningLabelMapFilter.xml"
> > > > >
> > > > > The tests compile fine though. Is this a known bug? It was
> > > compiled
> > > > > by VS.net 8 SP1.
> > > > >
> > > >
> > > > That's not a known bug.
> > > > I think I have forgotten to include itkProgressReporter.h.  
> Can you
> > > > add the line:
> > > >
> > > > #include "itkProgressReporter.h"
> > > >
> > > > line 23 in itkLabelMapFilter.h", and tell me if it works ?
> > > >
> > > > Thanks for your patience,
> > > >
> > > > Gaëtan
> > > >
> > > >
> > > >
> > > > > >
> > > > > > Le 11 oct. 07 à 17:25, Ali - a écrit :
> > > > > >
> > > > > > > Gaëtan,
> > > > > > >
> > > > > > > Are your labeling classes included in ITK cvs version?
> > > > > >
> > > > > > not yet
> > > > > >
> > > > > > > Any plans to include them in near future?
> > > > > >
> > > > > > that contribution is made to be included in ITK, but, I  
> can't
> > > say
> > > > > > when it will be effectively included.
> > > > > > Anyway, you can use it already if you like :-)
> > > > > >
> > > > > > Gaëtan
> > > > > >
> > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > Hi Ali,
> > > > > > > >
> > > > > > > > Please look at the contribution I made recently :  
> http://
> > > > > insight-
> > > > > > > > journal.org/InsightJournalManager/view_reviews.php?
> > > > > > > > back=index.php&pubid=176
> > > > > > > > I'm using it extensively currently, with WrapITK.
> > > > > > > >
> > > > > > > > Gaëtan
> > > > > > > >
> > > > > > > >
> > > > > > > > Le 11 oct. 07 à 16:18, Ali - a écrit :
> > > > > > > >
> > > > > > > > > Hi,
> > > > > > > > >
> > > > > > > > > How is it possible to have a watershed-output-like  
> for the
> > > > > output
> > > > > > > > > of a binary threshold filter, that is, how to  
> access the
> > > > > > > individual
> > > > > > > > > regoins of the output of a binary threshold filter for
> > > further
> > > > > > > > > manipulation?
> > > > > > > > >
> > > > > > > > > The next generation of MSN Hotmail has arrived -
> > > Windows Live
> > > > > > > Hotmail
> > > > > > > > > _______________________________________________
> > > > > > > > > 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
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > > Get free emoticon packs and customisation from Windows
> > > Live. Pimp
> > > > > > > My Live!
> > > > > >
> > > > > > --
> > > > > > 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
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > > Play Movie Mash-up and win BIG prizes!
> > > >
> > > > --
> > > > 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
> > > >
> > > >
> > > >
> > >
> > > Do you know a place like the back of your hand? Share local
> > > knowledge with BackOfMyHand.com
> >
> > --
> > 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
> >
> >
> >
>
> The next generation of MSN Hotmail has arrived - Windows Live Hotmail

--
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/20071018/b32410ef/PGP.pgp


More information about the Insight-users mailing list