<DIV>hi:</DIV>
<DIV>this function is a member of VectorFuzzyConnectednessImageFilter.txx,</DIV>
<DIV>my question is :</DIV>
<DIV>is this function used to compute the fuzzyconnectedness object of each voxels in the image?is this equall to the Algotithms kVMRFOE in paper</DIV>
<DIV>"Vectorial scale-based fuzzy connected image segmentation"?</DIV>
<DIV>program code is as followed:<BR>template <class TInputImage, class TOutputImage><BR>void<BR>VectorFuzzyConnectednessImageFilter<TInputImage,TOutputImage><BR>::Fast_Tracking(const int object)<BR>{<BR> std::vector<ListSeedType> chash;<BR> typename ListSeedType::iterator iter;<BR> IndexType current,max_index,index1,index2;<BR> AffinityVector vectorValue;<BR> unsigned short topIndex = 4096;</DIV>
<DIV> ImageRegionConstIterator<AffinityImageType> it;<BR> it = ImageRegionConstIterator<AffinityImageType>(m_AffinityImage,m_AffinityImage->GetRequestedRegion());</DIV>
<DIV> chash.resize(topIndex+1);<BR> for(int i=0;i<=topIndex;i++)<BR> chash[i].clear();</DIV>
<DIV> unsigned short initialValue=0;<BR> m_FuzzyConnImage->FillBuffer( initialValue );</DIV>
<DIV> /** object tracking...*/<BR> while(!m_ObjectSeeds[object].empty())<BR> {<BR> current = m_ObjectSeeds[object].back();<BR> m_ObjectSeeds[object].pop_back();<BR> m_FuzzyConnImage->SetPixel(current,topIndex);<BR> chash[topIndex].push_front(current);<BR> }</DIV>
<DIV> SizeType size;<BR> size = m_AffinityImage->GetLargestPossibleRegion().GetSize();</DIV>
<DIV> for(int i = 0;i<static_cast<int>(ImageDimension);i++)<BR> {<BR> max_index[i] = static_cast<typename IndexType::IndexValueType>(size[i])-1;<BR> }<BR> while((topIndex>0) && (chash[topIndex].size() !=0))<BR> {<BR> current = chash[topIndex].back();<BR> chash[topIndex].pop_back();</DIV>
<DIV> while((topIndex>0) && (chash[topIndex].size() == 0))<BR> {<BR> topIndex--;<BR> }<BR> unsigned short pmax,pmin,dimensionValue;</DIV>
<DIV> pmax = m_FuzzyConnImage->GetPixel(current);<BR> for(unsigned int i = 0;i<ImageDimension;i++)<BR> {<BR> index1 = current;<BR> if(index1[i] < max_index[i])<BR> {<BR> index1[i]++;<BR> vectorValue = m_AffinityImage->GetPixel(current);<BR> dimensionValue = (vectorValue[i]);<BR> pmin = (pmax < dimensionValue ? pmax: dimensionValue);</DIV>
<DIV> unsigned short value = m_FuzzyConnImage->GetPixel(index1);<BR> if (pmin > value)<BR> {<BR> if (value == 0)<BR> {<BR> chash[pmin].push_front(index1);<BR> } <BR> else<BR> {<BR> for( iter = chash[value].begin();iter !=chash[value].end();iter++)<BR> {<BR>
index2 = *iter;<BR> if(index2 == index1)<BR> {<BR> chash[value].erase(iter);<BR> break;<BR> }<BR> }<BR> chash[pmin].push_front(index1);<BR> }</DIV>
<DIV> if (pmin>topIndex)<BR> {topIndex = pmin;}<BR> m_FuzzyConnImage->SetPixel(index1,pmin);<BR> }<BR> }<BR> index1 = current;<BR> if(index1[i]>0)<BR> {<BR> index1[i]--;<BR> vectorValue = m_AffinityImage->GetPixel(index1);<BR> dimensionValue = vectorValue[i];<BR> pmin = (pmax < dimensionValue ? pmax: dimensionValue);</DIV>
<DIV> unsigned short value = m_FuzzyConnImage->GetPixel(index1);<BR> if (pmin > value)<BR> {<BR> if (value == 0)<BR> {<BR> chash[pmin].push_front(index1);<BR> }<BR> else<BR> {<BR> for( iter = chash[value].begin();iter !=chash[value].end();iter++)<BR> {<BR>
index2 = *iter;<BR> if(index2 == index1)<BR> {<BR> chash[value].erase(iter);<BR> break;<BR> }<BR> }<BR> chash[pmin].push_front(index1);<BR> }</DIV>
<DIV> if (pmin>topIndex)<BR> {topIndex = pmin;}<BR> m_FuzzyConnImage->SetPixel(index1,pmin);<BR> }<BR> }<BR> }<BR> }</DIV>
<DIV>}<BR></DIV><p>
                <hr size=1>DO YOU YAHOO!?<br>
<a href="http://cn.mail.yahoo.com/mail_alert/promo1.html" target=blank>
雅虎邮箱超强增值服务-2G超大空间、pop3收信、无限量邮件提醒</a>