[Insight-users] Multi-Spectral segmentation, K-means and Python wrapping

Gaëtan Lehmann gaetan.lehmann at jouy.inra.fr
Thu Sep 25 06:16:04 EDT 2008


Le 24 sept. 08 à 00:46, Tom Nash a écrit :

> Hi Gaetan
>
> I am basically trying to implement something using http://www.itk.org/Insight/Doxygen/html/classitk_1_1ImageKmeansModelEstimator.html 
> .
> and http://www.itk.org/Insight/Doxygen/html/classitk_1_1ScalarImageKmeansImageFilter.html 
> . using python. I have heard about WrapITK and have the  
> documentation but I am not comfortable with swig, so do not know how  
> to use the pipelined approach for wrapping. I am basically using  
> Pythonxy at the moment, but I don't see most of the classes and  
> header files imported in these two examples in pythonxy. Please help  
> me out

Hi Tom,

There is no need to know anything about swig, but you'll have to  
rebuild wrapitk by yourself, or at least build an external project to  
add that class (I don't know if everything is there in pythonxy for  
that task).
The hard part is to figure which type to use as template parameters  
for that class. For example what should be the type  
TMembershipFunction in ImageKmeansModelEstimator?

Gaëtan


>
>
> Regards
> Tom
>
> > CC: insight-users at itk.org; luis.ibanez at kitware.com
> > From: gaetan.lehmann at jouy.inra.fr
> > To: tomnash1 at hotmail.com
> > Subject: Re: [Insight-users] Multi-Spectral segmentation, K-means  
> and Python wrapping
> > Date: Tue, 23 Sep 2008 20:41:43 +0200
> >
> >
> > Le 23 sept. 08 à 17:16, Luis Ibanez a écrit :
> >
> > >
> > > Hi Tom,
> > >
> > > My only suggestion could be to add the KMeans filter to the set of
> > > wrapped filters.
> > >
> > > You may want to give it a shot by looking at other wrapped filters
> > > in the Insight/Wrapping directory.
> > >
> > > Are you using WrapITK ?
> > >
> > > In that case, Gaetan will be the best person to provide advice.
> >
> > Even better, if you can give me some types to use as template
> > arguments of that class, I can add it in ITK cvs for you.
> >
> > >
> > > Another option is to take a full ITK pipeline (instead of every
> > > individual class) and wrapping for Python. In that way you will
> > > have access to a higher-level segmentation algorithm.
> > >
> >
> > Yes, that's another good way to go.
> >
> > >
> > > Regards,
> > >
> > >
> > > Luis
> > >
> > >
> > > ---------------
> > > Tom Nash wrote:
> > >> Hi Luis\All
> > >> I was going through the example and I think
> > >> ImageKmeansModelEstimator is a good way to go ahead with K-Means.
> > >> But my basic problem is I'm using ITK wrapped with Python and  
> hence
> > >> none of the C++ classes and header files are available in my  
> Python
> > >> module. Porting all of the code might be a tiresome task. Do you
> > >> have any suggestions on how to proceed.
> > >> Regards
> > >> Tom
> > >> > Date: Fri, 19 Sep 2008 09:28:43 -0400
> > >> > From: luis.ibanez at kitware.com
> > >> > To: tomnash1 at hotmail.com
> > >> > CC: insight-users at itk.org
> > >> > Subject: Re: [Insight-users] Multi-Spectral segmentation
> > >> >
> > >> >
> > >> >
> > >> > Hi Tom,
> > >> >
> > >> > For running K-Means on a multi-spectral image you may want to  
> use:
> > >> >
> > >> > http://www.itk.org/Insight/Doxygen/html/classitk_1_1ImageKmeansModelEstimator.html
> > >> >
> > >> >
> > >> > Regards,
> > >> >
> > >> >
> > >> > Luis
> > >> >
> > >> >
> > >> > ---------------
> > >> > Tom Nash wrote:
> > >> > > Hi Luis
> > >> > >
> > >> > > Thank you for letting me know. I am Thinking to first  
> segment a
> > >> single
> > >> > > MRI using K-means and later try multi-spectral segmentation  
> on
> > >> the other
> > >> > > slices. Any pointers for k-means other than the K-means
> > >> classification
> > >> > > example given in the guide?
> > >> > >
> > >> > > Regards
> > >> > > Tom Nash
> > >> > >
> > >> > > > Date: Sun, 14 Sep 2008 10:50:48 -0400
> > >> > > > From: luis.ibanez at kitware.com
> > >> > > > To: tomnash1 at hotmail.com
> > >> > > > CC: insight-users at itk.org
> > >> > > > Subject: Re: [Insight-users] Multi-Spectral segmentation
> > >> > > >
> > >> > > >
> > >> > > > Hi Tom,
> > >> > > >
> > >> > > > You may want to explore the following:
> > >> > > >
> > >> > > > 1) Region Growing with based on Mahalanobis distance.
> > >> > > >
> > >> > > http://www.itk.org/Insight/Doxygen/html/classitk_1_1VectorConfidenceConnectedImageFilter.html
> > >> > > >
> > >> > > >
> > >> > > > 2) Statistical classifiers
> > >> > > >
> > >> > > > See examples in
> > >> > > >
> > >> > > > Insight/Examples/Statistics
> > >> > > >
> > >> > > >
> > >> > > >
> > >> > > > Regards,
> > >> > > >
> > >> > > >
> > >> > > > Luis
> > >> > > >
> > >> > > >
> > >> > > > --------------
> > >> > > > Tom Nash wrote:
> > >> > > > > Hi all
> > >> > > > >
> > >> > > > > I wish to implement a multi-spectral segmentation of  
> Brain
> > >> MRIs. Any
> > >> > > > > pointers on how to go about doing doing it? I am familiar
> > >> with 2D
> > >> > > > > segmentations using thresholding and region growing
> > >> techniques. I am
> > >> > > > > planning to use ITK wrapped with Python for this. Do I  
> need
> > >> ITK-SNAP?
> > >> > > > >
> > >> > > > > Regards
> > >> > > > > Tom
> > >> > > > >
> > >> > > > > _______________________________________________
> > >> > > > > Insight-users mailing list
> > >> > > > > Insight-users at itk.org
> > >> > > > > http://www.itk.org/mailman/listinfo/insight-users
> > >> > >
> > >> > >
> > >>  
> ------------------------------------------------------------------------
> > >> > > Watch useful tips on recipes, fitness, yoga and fashion  
> only on
> > >> MSN
> > >> > > videos. Try it! <http://video.msn.com/?mkt=en-in>
> > >>  
> ------------------------------------------------------------------------
> > >> Watch useful tips on recipes, fitness, yoga and fashion only on  
> MSN
> > >> videos. Try it! <http://video.msn.com/?mkt=en-in>
> > > _______________________________________________
> > > 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 http://www.mandriva.org
> > http://www.itk.org http://www.clavier-dvorak.org
> >
>
> Hottest news and in-depth analysis that goes beyond the headlines.  
> Only on MSN News Check it out!

-- 
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  http://www.mandriva.org
http://www.itk.org  http://www.clavier-dvorak.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
URL: <http://www.itk.org/pipermail/insight-users/attachments/20080925/7db84eca/attachment-0001.pgp>


More information about the Insight-users mailing list