[Insight-users] Bug in itkMRFImageFilter.hxx

Arnaud Gelas arnaudgelas at gmail.com
Thu Feb 2 02:12:33 EST 2012


Salut Joel,

Thanks for reporting and providing a solution for this bug!

---

By the means of git / gerrit, you can contribute a patch which, I guess, 
is the fastest way to get bug fixed and start discussions in between 
contributors and reviewers.

You can find here related information:

     http://www.itk.org/Wiki/ITK/Git/Develop

Best,
Arnaud

On 02/01/2012 01:36 PM, Joël Schaerer wrote:
> Hello all,
>
> The MRFImageFilter takes a smoothing parameter to set the desired 
> balance between spatial smoothness and data fidelity. This parameter 
> is supposed to be set using the SetSmoothingFactor() method.
>
> Unfortunately, this parameter is not actually used in the computation. 
> The reason is that it is used only in the 
> SetDefaultMRFNeighborhoodWeight() method, which is private (why?) and 
> called in the constructor, before the user has a chance to set the 
> smoothing factor. Of course, if the user sets his own weights, the 
> factor is also ignored.
>
> I would suggest using the m_SmoothingFactor in DoNeighborhoodOperation 
> instead, independently of the weights, as follows:
>
> (line 637)
> - m_NeighborInfluence[index] += m_MRFNeighborhoodWeight[i];
> + m_NeighborInfluence[index] += m_MRFNeighborhoodWeight[i] * 
> m_SmoothingFactor;
>
> and removing all the occurrences in SetDefaultMRFNeighborhoodWeight().
>
> Joel
>
> PS: I am aware the project has a bug tracker, but since most of my 
> previous bug reports were ignored for years before "expiring", I am 
> hoping posting on the mailing list will gather more attention.
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users



More information about the Insight-users mailing list