<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 All: </DIV>
<DIV> </DIV>
<DIV>I am going through the example code of itkMRFImageFilter, but I have two questions.</DIV>
<DIV> </DIV>
<DIV>1, ScalarImageMarkovRandomField1.cxx require the reference labled image as input;<BR></DIV>
<DIV> </DIV>
<DIV> typedef itk::ImageFileReader< LabelImageType > LabelReaderType;<BR> LabelReaderType::Pointer labelReader = LabelReaderType::New();<BR> labelReader->SetFileName( inputLabelImageFileName );</DIV>
<DIV> </DIV>
<DIV>but in the example code, there is no code like labelReader->GetOutput(), seems the inputlabled image is never used, why?</DIV>
<DIV> </DIV>
<DIV>2, the example code calculated the meandistance as </DIV>
<DIV> </DIV>
<DIV> double meanDistance = 0;<BR> vnl_vector<double> centroid(1); <BR> for( unsigned int i=0; i < numberOfClasses; i++ )<BR> {<BR> MembershipFunctionPointer membershipFunction = <BR> MembershipFunctionType::New();</DIV>
<DIV> centroid[0] = atof( argv[i+numberOfArgumentsBeforeMeans] ); </DIV>
<DIV> membershipFunction->SetCentroid( centroid );</DIV>
<DIV> classifier->AddMembershipFunction( membershipFunction );<BR> meanDistance += static_cast< double > (centroid[0]);<BR> }<BR> meanDistance /= numberOfClasses;</DIV>
<DIV> </DIV>
<DIV>So if my inputimage is vector image, should I get the mean distance like sqrt( sum(centroid[NumberofCompoents)).</DIV>
<DIV> </DIV>
<DIV>But finally, the meanditance is only used:</DIV>
<DIV> </DIV>
<DIV>for(std::vector< double >::iterator wIt = weights.begin(); <BR> wIt != weights.end(); wIt++ )<BR> {<BR> *wIt = static_cast< double > ( (*wIt) * meanDistance / (2 * totalWeight));<BR> }</DIV>
<DIV> mrfFilter->SetMRFNeighborhoodWeight( weights );</DIV>
<DIV> </DIV>
<DIV>It looks to me the meanDistance has no effect on the result since all the neiborhood weight mutiple by same scale meanDistance.</DIV>
<DIV> </DIV>
<DIV>Can somebody teach me more..</DIV>
<DIV> </DIV>
<DIV>Baoyun</DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif"><BR>
<DIV style="FONT-SIZE: 13px; FONT-FAMILY: arial, helvetica, sans-serif"><FONT face=Tahoma size=2>
<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> Saturday, March 21, 2009 12:35:48 PM<BR><B><SPAN style="FONT-WEIGHT: bold">Subject:</SPAN></B> Re: can itkMRFImageFilter discard the intensity information<BR></FONT><BR><BR>Hi Baoyun,<BR><BR><BR>Please take a look at the example:<BR><BR> Insight/Examples/Statistics/<BR> ScalarImageMarkovRandomField1.cxx<BR><BR>You may find it to be a useful guide on how to use the MRF filter.<BR><BR>I'm not sure what you mean by "using the intensity information".<BR>Could you please explain this in more detail ?<BR><BR>A piece of source code will be great.....<BR><BR><BR> Thanks<BR><BR><BR>
Luis<BR><BR><BR><BR>------------------<BR>Baoyun Li wrote:<BR>> Dear All:<BR>> After going through the documents for itkMRFImageFilter, I have some doubts about using the intensity information.<BR>> I understand the filter using Gassian model to relabel the segmeantion image. But why?<BR>> In otherwords, if I have already got ok segmeantion result based EM Gaussian Mixuture model, thus I only need hMRF to take care of the continous of the labled segmetation. Seem reclassify the image based on Gassuian model is redundent or make the segmentation worse if I blieved my initial segmentation.<BR>> If there anyway to ignore using the intensity information.<BR>> Or I am fundmentally wrong, say that using intensity information certainly can improve the performance.<BR>> Can somebody teach me?<BR>> Best regards<BR>> Baoyun<BR>> <BR></DIV></DIV></div><br>
</body></html>