[Insight-users] is it limitation in itkMRFImageFilter class?

Baoyun Li baoyun_li123 at yahoo.com
Tue Mar 31 23:27:58 EDT 2009


Dear Luis
Thank you for your reply. My question is that 
In multivariate statisticsk, if it will be common to express a Gaussian density function as:

                     exp( - mahalanobisDistance ^ 2 )
In this way, using Gaussian Density Function with maximum decision rule or MahalanobisDistance distance with minimum decision rule will give the same classification result.
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.

So my understanding:
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.
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?
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.
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?
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.

Thanks

Baoyun




________________________________
From: Luis Ibanez <luis.ibanez at kitware.com>
To: Baoyun Li <baoyun_li123 at yahoo.com>
Cc: insight-users at itk.org
Sent: Tuesday, March 31, 2009 5:26:14 PM
Subject: Re: is it limitation in itkMRFImageFilter class?

Hi Baoyun,

There is an important difference between:

           A) Density functions, and
           B) Distance functions


in particular,
Typically density functions decrease in value as you move away from the origin,
(or wherever they are centered), while distance functions increase when you
move away.

You seem to be confusing the use of a GaussianDensityFunction, with the
one of a MahalanobisDistance.

That is:

      1) Gaussian    exp( - ( x / sigma )^2 )

      2) Mahalanobis distance =    sqrt(   X . E . X^t   )
           where E is the covariance matrix of the distribution
          and X is an N-dimensional array with coordinates  in this space.

You may want to take a look at:


* http://en.wikipedia.org/wiki/Normal_distribution
* http://en.wikipedia.org/wiki/Mahalanobis_distance

In multivariate statistics it will be common to express a
Gaussian density function as:

                     exp( - mahalanobisDistance ^ 2 )


BTW: If you are planning on making a serious use of
  the ITK statistics framework, you may want to look
  at the refactored version described in:

http://www.itk.org/Wiki/Proposals:Refactoring_Statistics_Framework_2007


       Regards,


             Luis


----------------------------------------
On Wed, Mar 25, 2009 at 4:01 PM, Baoyun Li <baoyun_li123 at yahoo.com> wrote:
> Dear Luis and All:
>
> I am woring on EM and MRF for image segmentation. I made the EM clustering
> working, and then using the segmenation result to perfrom MRF for refinment.
>
> I followed the styles in ITK example ScalarImageMarkovRandomField1.cxx  .
>
> If I use the DistancCentroid as membershim function of the classifier, I can
> get the segmetation improved after MRF filter.
>
> Since I using EM GaussianMixture model to intial segmentation, I think using
> itkGaussianDensityFunction as membership function of classifier may give
> better result.
>
> When I changed the membership function, the result is totally wrong, then I
> checked the code for itkMRFImageFilter..cxx, I figure out why.
>
> //////////////////////////////////////////////////////////////////////////////////
>
> 00625   const std::vector<double> & pixelMembershipValue =
> 00626     m_ClassifierPtr->GetPixelMembershipValue( *inputPixelVec );
> 00648   //Add the prior probability to the pixel probability
> 00649   for( index = 0; index < m_NumberOfClasses; index++ )
> 00650     {
> 00651     m_MahalanobisDistance[index] = m_NeighborInfluence[index] -
> 00652       pixelMembershipValue[index] ;
> 00653     }
> ////////////////////////////////////////////////////////////////////////////////
>
> In line 651, when calculating the MahaanoistDistance,
> m_MahalanobisDistance[index] = m_NeighborInfluence[index] -
> pixelMembershipValue[index] ;
> assuming my weight are all zeros, then class with maximum pdf will give the
> lowest Distance. As a result, the segmentation is fully wrong.
>
> My question is why the filter was designed in the way, is MRFImageFilter not
> designed to apply GassianDensityFuncion as membershipfunction.
>
> Can I still use GaussianDensityFunction in this case? Would if work if I
>  change the sign of code 651 to +?
>
> Please give me some guide.
>
> Baoyun
>
>



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20090331/73e3437c/attachment-0001.htm>


More information about the Insight-users mailing list