[Insight-users] EM segmentation with MRF
Luis Ibanez
luis.ibanez at kitware.com
Tue Nov 30 10:38:16 EST 2004
Hi Jimmy,
A) You will find a full example on how to use
the ITK Statistical Classification classes
in the directory
InsightApplications/
IBSRValidation/
IBSRClassification/
You will find there examples on how to perform
Gaussian Mixture Modeling, K-Means, and how
to combine them with Markov Random Fields.
This is the code developed by Insightful for
a validation of the statistical methods.
A report on this validation study is avalable
in the InsightDocuments CVS checkout.
B) You will find an example on how to perform
KMeans, and another on how to use the Markov
Random Field in the directory:
Insight/Examples/Statistics/
ExpectationMaximizationMixtureModelEstimator.cxx
ScalarImageKmeansModelEstimator.cxx
ScalarImageMarkovRandomField1.cxx
ScalarImageKmeansClassifier.cxx
The container used for the class labels is an itk::Image,
whose pixel type is usually an integer type (e.g. char,
int, short...etc). You will see how this is done in the
examples in Insight/Examples/Statistics.
These examples were *recently* added, so you will *NOT*
find them in the ITK release 1.8. You *must* use a recent
CVS checkout if you want to take a look at these examples.
C) For instructions on how to read values from ITK images,
please read the ITK Software Guide
http://www.itk.org/ItkSoftwareGuide.pdf
in particular Chapter 4, Section 4.1, pdf-page 61-73.
D) NOTE that labels are usually produced with values
0,1,2,3,4.... etc, and therefore, when you attempt
to look at these images of labels using naive viewers,
you may find that the image "seems to be empty".
If you plan to use the labeled image for visualization
you will have to rescale the intensities in the image
in order to better use the dynamic range.
For example, note that the filter:
ScalarKmeansImageFilter
http://www.itk.org/Insight/Doxygen/html/classitk_1_1ScalarImageKmeansImageFilter.html
and its methods
GetUseNonContiguousLabels
SetUseNonContiguousLabels
E) You will also find a K-Means ITK plugin that was
recently added to VolView.
The source code is available in
InsightApplications/
VolviewPlugins
The free binary version of VolView can be downloaded
from
http://www.kitware.com/products/volview.html
F) If you are writing new classes for Statistical
classification, you *must* read the ITK Software
Guide chapter on Statistics,
This is Chapter 10, in pdf-pages 421-478.
Regards,
Luis
--------------------------------------------------------
Jimmy Wong wrote:
> Hi, dear insight-users,
>
> If I want to simulate the image segmentation by using EM algorithm,
> Gaussian Mixture Model and Markov Random Filed, is any template
> available for this, no matter it is test version or not?
>
> Another thing is, if I segment the image via a particular method, then
> what I have are the class labels? What kind of container I should use to
> store the labels if I want to use these labels in ITK toolkit for
> displaying segmented image, or constructing a mask or something like that?
>
> You know, the particular algorithm or function is written by me, but I
> want it to be compatible with ITK.
>
> In a word, the second question is: for segmentation, we mainly treat
> with the intensity value? How can I extract the intensity value from the
> ImageReader or Image type data? And how can I recover the segmentation
> information or reuse the labels in ITK again? What kind of data
> structures should I use for the intensity value and class labels.
>
> Thank you very much.
>
> Zhimin
>
>
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
>
>
More information about the Insight-users
mailing list