<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Change SYSTEM "https://itk.org/migrationv4/ITKMigration.dtd">

<!--**
**
** PatchBasedDenoiserAPIChanges.xml
**
**-->
<Change>
    <!--**
    ** Title for the online migration page
    **-->
    <Title>
      Patch Based Denoiser A P I Changes
    </Title>

    <!--**
    ** The author of the change
    **-->
    <Author>
      Kris Zygmunt
    </Author>

    <!--**
    ** Date of creation for the XML document
    **-->
    <Date>
      2013-01-25
    </Date>

    <!--**
    ** Plain text description of the change
    ** Extracted from git commit messages
    **-->
    <Description>
      <![CDATA[
      PERF: Provide better default config for patch-based denoiser
      Change the defaults for the patch-based denoiser to provide a faster
      default configuration.  The new default does not do kernel bandwidth
      estimation, and only performs one iteration of denoising.  Also, the
      default configuration now provides a default sampling strategy of
      sampling all the patches within 25 pixels of the current patch.

      In addition, there have been some name changes to make the parameter
      names more consistent and understandable.

      GaussianKernelSigma, DoKernelBandwidthEstimation, SigmaMultiplicationFactor,
      FractionPixelsForSigmaUpdate all control the kernel bandwidth estimation process
      and have thus all been renamed to start with KernelBandwidth resulting in the new names:
      KernelBandwidthSigma, KernelBandwidthEstimation, KernelBandwidthMultiplicationFactor,
      KernelBandwidthFractionPixelsForEstimation.

      Similarly, since the noise model is only applied when the fidelity weight is
      nonzero, FidelityWeight has been renamed NoiseModelFidelityWeight.

      ]]>
    </Description>

    <!--**
    ** Sample code snippets
    ** Extracted from git diff of changed files in Examples and Testing
    **-->
    <SampleCode>
      <Old>
        <![CDATA[
        filter->SetFidelityWeight( 0.1 );
        ]]>
      </Old>

      <New>
        <![CDATA[
        filter->SetNoiseModelFidelityWeight( 0.1 );
        ]]>
      </New>
    </SampleCode>

    <SampleCode>
      <Old>
        <![CDATA[
        filter->DoKernelBandwidthEstimationOn();
        ]]>
      </Old>

      <New>
        <![CDATA[
        filter->KernelBandwidthEstimationOn();
        ]]>
      </New>
    </SampleCode>

    <SampleCode>
      <Old>
        <![CDATA[
        filter->SetGaussianKernelSigma();
        ]]>
      </Old>

      <New>
        <![CDATA[
        filter->SetKernelBandwidthSigma();
        ]]>
      </New>
    </SampleCode>

    <SampleCode>
      <Old>
        <![CDATA[
        filter->SetFractionPixelsForSigmaUpdate( 0.20 );
        ]]>
      </Old>

      <New>
        <![CDATA[
        filter->SetKernelBandwidthFractionPixelsForEstimation( 0.20 );
        ]]>
      </New>
    </SampleCode>

    <SampleCode>
      <Old>
        <![CDATA[
        filter->SetSigmaMultiplicationFactor( 1.0 );
        ]]>
      </Old>

      <New>
        <![CDATA[
        filter->SetKernelBandwidthMultiplicationFactor( 1.0 );
        ]]>
      </New>

    </SampleCode>

    <!--**
    ** The change-ids for all commits in the topic branch
    **-->
    <Gerrit-ChangeId>
      I4b98823bde5ecca27a993f41d3a05ffb8b1861a8
    </Gerrit-ChangeId>

    <!--**
    ** List of all changed files from the topic branch
    **-->
    <FileList>
      Modules/Filtering/Denoising/include/itkPatchBasedDenoisingBaseImageFilter.h
      Modules/Filtering/Denoising/include/itkPatchBasedDenoisingBaseImageFilter.hxx
      Modules/Filtering/Denoising/include/itkPatchBasedDenoisingImageFilter.h
      Modules/Filtering/Denoising/include/itkPatchBasedDenoisingImageFilter.hxx
      Modules/Filtering/Denoising/test/Baseline/PatchBasedDenoisingImageFilterDefaultTest.mha.md5
      Modules/Filtering/Denoising/test/Baseline/PatchBasedDenoisingImageFilterTest0.mha.md5
      Modules/Filtering/Denoising/test/Baseline/PatchBasedDenoisingImageFilterTestGaussian.mha.md5
      Modules/Filtering/Denoising/test/Baseline/PatchBasedDenoisingImageFilterTestPoisson.mha.md5
      Modules/Filtering/Denoising/test/Baseline/PatchBasedDenoisingImageFilterTestRician.mha.md5
      Modules/Filtering/Denoising/test/CMakeLists.txt
      Modules/Filtering/Denoising/test/itkPatchBasedDenoisingImageFilterDefaultTest.cxx
      Modules/Filtering/Denoising/test/itkPatchBasedDenoisingImageFilterTest.cxx
    </FileList>

    <!--**
    ** If the migration can be accomplished by a simple string
    ** substitution, then use the following construct to define
    ** the substitution rule.
    **
    ** <MigrationFix-Automatic>
    **   <Old>
    **     <![CDATA[MipsleledName]]>
    **   </Old>
    **   <New>
    **     <![CDATA[MisspelledName]]>
    **   </New>
    ** </MigrationFix-Automatic>
    **-->

    <MigrationFix-Automatic>
      <Old>
        <![CDATA[FidelityWeight]]>
      </Old>
      <New>
        <![CDATA[NoiseModelFidelityWeight]]>
      </New>
    </MigrationFix-Automatic>

    <MigrationFix-Automatic>
      <Old>
        <![CDATA[GaussianKernelSigma]]>
      </Old>
      <New>
        <![CDATA[KernelBandwidthSigma]]>
      </New>
    </MigrationFix-Automatic>

    <MigrationFix-Automatic>
      <Old>
        <![CDATA[FractionPixelsForSigmaUpdate]]>
      </Old>
      <New>
        <![CDATA[KernelBandwidthFractionPixelsForEstimation]]>
      </New>
    </MigrationFix-Automatic>

    <MigrationFix-Automatic>
      <Old>
        <![CDATA[SigmaMultiplicationFactor]]>
      </Old>
      <New>
        <![CDATA[KernelBandwidthMultiplicationFactor]]>
      </New>
    </MigrationFix-Automatic>

    <MigrationFix-Automatic>
      <Old>
        <![CDATA[DoKernelBandwidthEstimation]]>
      </Old>
      <New>
        <![CDATA[KernelBandwidthEstimation]]>
      </New>
    </MigrationFix-Automatic>


    <!--**
    ** If the migration can NOT be accomplished by a simple string
    ** substitution, but potential problem spots can be identified,
    ** use the following construct to define a migration flag rule.
    **
    ** <MigrationFix-Manual>
    **   OldFunctionName
    ** </MigrationFix-Manual>
    **-->

</Change>
