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

<!--**
**
** MaurerDefaultBehavior.xml
**
** >>>>>>>>>>>>>>>>>>>>>>>>>>>>
** THIS FILE HAS BEEN AUTOMATICALLY GENERATED. EDIT IT BEFORE COMMITING
** <<<<<<<<<<<<<<<<<<<<<<<<<<<
**
** Please, make sure this file validates the following w3c test before committing it: http://validator.w3.org
**-->
<Change>
    <!--**
    ** Title for the online migration page
    **-->
    <Title>
      Signed Distance Map Default Behavior
    </Title>

    <!--**
    ** The author of the change
    **-->
    <Author>
      Gaëtan Lehmann
    </Author>

    <!--**
    ** Date of creation for the XML document
    **-->
    <Date>
      2011-09-16
    </Date>

    <!--**
    ** Plain text description of the change
    ** Extracted from git commit messages
    **-->
    <Description>
      <![CDATA[
      BUG: Distance filter should use consistent defaults

      Distance maps are commonly regarded as know to be a way to
      compute exact Euclidean distance, but with the default values, that
      was not the case, forcing the user to change those values each time to
      get exact results.

      In order to make the all distance maps
      behave consistently, they should default to
      the natural Euclidean distance measures in physical space.

      The filters are configurable to run faster but with results that
      require end-user care to ensure that they are used properly (i.e.
      distances can be squares of either physical or voxel distances).

      ]]>
    </Description>

    <!--**
    ** Sample code snippets
    ** Extracted from git diff of changed files in Examples and Testing
    **-->
    <SampleCode>
      <Old>
        <![CDATA[
        /* For Dannielsson, SignedDannielsson, SignedMaurer, DirectedHausdorff, and Hausdorff */

       DistanceFilterType::PointerPointer distanceFilter = DistanceFilterType::PointerType::New();
       distanceFilter->SetInput( reader->GetOutput() );
       /*ITKv3 default to fastest computation, but data dependant interpretations*/
       /*ITKv3 method defaulted to implied behavior of SetSquaredDistance(true), SetUseImageSpacing(false) */
       distanceFilter->Update();
        ]]>
      </Old>

      <New>
        <![CDATA[
       DistanceFilterType::PointerPointer distanceFilter = DistanceFilterType::PointerType::New();
       distanceFilter->SetInput( reader->GetOutput() );
       /*ITKv4 defaults to consistent physical space interpretation*/
       /*ITKv4 method defaults to SetSquaredDistance(false), SetUseImageSpacing(true) */
       distanceFilter->SetUseImageSpacing(false);/*Force ITKv3 default behavoir*/
       /* For SignedMaurer, the ITKv3 method used SetSquaredDistance(true), all others used (false)
       distanceFilter->SetSquaredDistance(true); /*Force ITKv3 default behavior*/
       distanceFilter->Update();
        ]]>
      </New>

    </SampleCode>

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

    <!--**
    ** List of all changed files from the topic branch
    **-->
    <FileList>
      Modules/Filtering/DistanceMap/include/itkSignedMaurerDistanceMapImageFilter.h
      Modules/Filtering/DistanceMap/include/itkSignedMaurerDistanceMapImageFilter.hxx
      Modules/Nonunit/Review/include/itkMultiphaseDenseFiniteDifferenceImageFilter.hxx
    </FileList>
</Change>
