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

<!--**
**
** ImageBaseSetDirection.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>
      ImageBase SetDirection API Change
    </Title>

    <!--**
    ** The author of the change
    **-->
    <Author>
      Bill Lorensen
    </Author>

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

    <!--**
    ** Plain text description of the change
    ** Extracted from git commit messages
    **-->
    <Description>
      <![CDATA[
The signature for SetDirection has changed from SetDirection(const DirectionType direction) to SetDirection(const DirectionType &amp direction). The change was made to ImageBase and ImageAdaptor. Any classes that derive from ImageBase will also need to be changed.

The changes were suggested by Coverity. The Coverity error is:
      COMP: Big parameter passed by value
      CID 1106765 Big parameter passed by value
      Copying large values is inefficient, consider passing by reference;
      size thresholds for detection can be adjusted.
      In itk::​ImageBase&amp;lt;5u&gt;::​SetDirection(itk::​Matrix&amp;lt;double, 5u, 5u&gt;): A
      large function call parameter or exception catch statement is passed
      by value

      NOTEs: ImageAdaptor also needed the change since it derives from ImageBase.
      Other Set methods in ImageBase already passed their rguments by reference.

      ]]>
    </Description>

    <!--**
    ** Sample code snippets
    ** Extracted from git diff of changed files in Examples and Testing
    **-->
    <SampleCode>
      <Old>
        <![CDATA[
SetDirection(const DirectionType direction)
        ]]>
      </Old>

      <New>
        <![CDATA[
SetDirection(const DirectionType &ampdirection)
        ]]>
      </New>

    </SampleCode>

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

    <!--**
    ** List of all changed files from the topic branch
    **-->
    <FileList>
      Modules/Core/Common/include/itkImageBase.h
      Modules/Core/Common/include/itkImageBase.hxx
      Modules/Core/ImageAdaptors/include/itkImageAdaptor.h
      Modules/Core/ImageAdaptors/include/itkImageAdaptor.hxx
    </FileList>

</Change>
