<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman,new york,times,serif;font-size:12pt"><div>Dear Luis<br>Thank you for your reply. My question is that <br>In multivariate statisticsk, if it will be common to express a Gaussian density function as:<br><br> exp( - mahalanobisDistance ^ 2 )<br>In this way, using Gaussian Density Function with maximum decision rule or MahalanobisDistance distance with minimum decision rule will give the same classification result.<br>However, the true Gassian PDF is (1/det(covmatrix)^0.5)* exp( - mahalanobisDistance ^ 2 ). So Gaussian Density Function with maximu decision rule or MahalanobisDistance distance with mimimum decision rule will give us difference result even the difference is minor.<br><br>So my understanding:<br>1: Since I use GassianMixture model in EM, the natual way
should be used GassianDensity Function in MRFImageFilter. However, I do not know how to change MRRImageFilter class lessly to get this.<br>2: Does the itk new statistic framework surpport EM on the Image since I am thinking to do something similar with FSL(HMM sovled by EM), thus spatial prior need to be inserted into EM iteration. Can I do this in the new ITK framework? I think I may modify the itkMRFImageFilter to interated EM, that means I need to calculate the EM parameters and update them inside the MRFImageFilter since MRFImageFilterDoNeiborhood alreay provied me the spatial prio. Do you have any suggestions?<br>3: To be honest with you, I have compared the result I compose based on itkExpectationEstimator followed by MRFImageFilter with FSL result based on brainweb date with noise but without bias field. The result I obtained is comparable with FSL. My result underestimated the grey matter somehow, but FSL underestimate the white matter.
Certainly the comparision is not completely, but I have a feeling the two solution may give similar results. But it looks to me theortically, FSL solution seems more reasonable or should be better since MRF interated in EM. Would you like to give any comments.<br>4: In my furture work, I will certainly like to have spatial prio obtained from atlas into EM. So I am seriously in using ITK to do the work. Any suggestions?<br>5: I knew slice implemented EM with MRF field. Can you tell me whether they do MRF followed EM or fully insert MRF spatial info into EM.<br><br>Thanks<br><br>Baoyun<br></div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><br><div style="font-family: arial,helvetica,sans-serif; font-size: 13px;"><font size="2" face="Tahoma"><hr size="1"><b><span style="font-weight: bold;">From:</span></b> Luis Ibanez <luis.ibanez@kitware.com><br><b><span style="font-weight: bold;">To:</span></b> Baoyun Li
<baoyun_li123@yahoo.com><br><b><span style="font-weight: bold;">Cc:</span></b> insight-users@itk.org<br><b><span style="font-weight: bold;">Sent:</span></b> Tuesday, March 31, 2009 5:26:14 PM<br><b><span style="font-weight: bold;">Subject:</span></b> Re: is it limitation in itkMRFImageFilter class?<br></font><br>
Hi Baoyun,<br><br>There is an important difference between:<br><br> A) Density functions, and<br> B) Distance functions<br><br><br>in particular,<br>Typically density functions decrease in value as you move away from the origin,<br>(or wherever they are centered), while distance functions increase when you<br>move away.<br><br>You seem to be confusing the use of a GaussianDensityFunction, with the<br>one of a MahalanobisDistance.<br><br>That is:<br><br> 1) Gaussian exp( - ( x / sigma )^2 )<br><br> 2) Mahalanobis distance = sqrt( X . E . X^t )<br> where E is the covariance matrix of the distribution<br> and X is an N-dimensional array with coordinates in this space.<br><br>You may want to take a look at:<br><br><br><span>* <a
target="_blank" href="http://en.wikipedia.org/wiki/Normal_distribution">http://en.wikipedia.org/wiki/Normal_distribution</a></span><br><span>* <a target="_blank" href="http://en.wikipedia.org/wiki/Mahalanobis_distance">http://en.wikipedia.org/wiki/Mahalanobis_distance</a></span><br><br>In multivariate statistics it will be common to express a<br>Gaussian density function as:<br><br> exp( - mahalanobisDistance ^ 2 )<br><br><br>BTW: If you are planning on making a serious use of<br> the ITK statistics framework, you may want to look<br> at the refactored version described in:<br><br><span><a target="_blank" href="http://www.itk.org/Wiki/Proposals:Refactoring_Statistics_Framework_2007">http://www.itk.org/Wiki/Proposals:Refactoring_Statistics_Framework_2007</a></span><br><br><br> Regards,<br><br><br>
Luis<br><br><br>----------------------------------------<br>On Wed, Mar 25, 2009 at 4:01 PM, Baoyun Li <<a ymailto="mailto:baoyun_li123@yahoo.com" href="mailto:baoyun_li123@yahoo.com">baoyun_li123@yahoo.com</a>> wrote:<br>> Dear Luis and All:<br>><br>> I am woring on EM and MRF for image segmentation. I made the EM clustering<br>> working, and then using the segmenation result to perfrom MRF for refinment.<br>><br>> I followed the styles in ITK example ScalarImageMarkovRandomField1.cxx .<br>><br>> If I use the DistancCentroid as membershim function of the classifier, I can<br>> get the segmetation improved after MRF filter.<br>><br>> Since I using EM GaussianMixture model to intial segmentation, I think using<br>> itkGaussianDensityFunction as membership function of classifier may give<br>> better result.<br>><br>> When I changed the membership function, the result is totally wrong, then
I<br>> checked the code for itkMRFImageFilter..cxx, I figure out why.<br>><br>> //////////////////////////////////////////////////////////////////////////////////<br>><br>> 00625 const std::vector<double> & pixelMembershipValue =<br>> 00626 m_ClassifierPtr->GetPixelMembershipValue( *inputPixelVec );<br>> 00648 //Add the prior probability to the pixel probability<br>> 00649 for( index = 0; index < m_NumberOfClasses; index++ )<br>> 00650 {<br>> 00651 m_MahalanobisDistance[index] = m_NeighborInfluence[index] -<br>> 00652 pixelMembershipValue[index] ;<br>> 00653 }<br>> ////////////////////////////////////////////////////////////////////////////////<br>><br>> In line 651, when calculating the MahaanoistDistance,<br>>
m_MahalanobisDistance[index] = m_NeighborInfluence[index] -<br>> pixelMembershipValue[index] ;<br>> assuming my weight are all zeros, then class with maximum pdf will give the<br>> lowest Distance. As a result, the segmentation is fully wrong.<br>><br>> My question is why the filter was designed in the way, is MRFImageFilter not<br>> designed to apply GassianDensityFuncion as membershipfunction.<br>><br>> Can I still use GaussianDensityFunction in this case? Would if work if I<br>> change the sign of code 651 to +?<br>><br>> Please give me some guide.<br>><br>> Baoyun<br>><br>><br></div></div></div><br>
</body></html>