<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Change SYSTEM "http://itk.org/migrationv4/ITKMigration.dtd">
<!--**
**
** CArrayRemoval.xml
**
** >>>>>>>>>>>>>>>>>>>>>>>>>>>>
** THIS FILE HAS BEEN AUTOMATICALLY GENERATED. EDIT IT BEFORE COMMITING
** <<<<<<<<<<<<<<<<<<<<<<<<<<<
**
**-->
<Change>
    <!--**
    ** Title for the online migration page
    **-->
    <Title>
      C Array Removal
    </Title>

    <!--**
    ** Plain text description of the change
    ** Extracted from git commit messages
    **-->
    <Description>
      C arrays are not used any more as method parameter or return value.

      There are several places in ITK where C arrays are used as method
      parameter or return value instead of stronger array like types, like
      itk::Index, itk::Size, itk::Offset, itk::FixedArray or itk::Array.
      Using stronger types makes more efficient the error checking at compile
      time and enhance the user integration by using the same types and
      conventions than elsewhere.

      More important, the C arrays are not wrappable without further
      information that we don&apos;t have at wrap time. As a consequence, the
      classes which are using them are at best partially usable in Python,
      Java or Tcl. Using stronger types completely fix that problem.

      Backward compatibility is fully preserved for input parameters, but
      not for return values. Usually, return values will require an additional
      call to GetDataPointer(), m_Offset, m_Size or m_Index to be fully compatible.

      However, to pass and get the values to or from the filter it is adviced to rather
      use the stronger type (itk::Index, itk::Size, itk::Offset, itk::FixedArray or
      itk::Array) used to replace the C array instead of the legacy C array.
    </Description>

    <!--**
    ** Sample code snippets
    ** Extracted from git diff of changed files in Examples and Testing
    **-->
    <SampleCode>
      <Old>
        const long * outputOffset = filter-&gt;GetOutputOffset();
        const long * outputIndex = filter-&gt;GetOutputIndex();
        const unsigned long * outputSize = filter-&gt;GetOutputSize();
        const float * outweights =  filter-&gt;GetWeights();
        const double * spacingValue = import-&gt;GetSpacing();
        const double * originValue = import-&gt;GetOrigin();
      </Old>

      <New>
        const long * outputOffset = filter-&gt;GetOutputOffset().m_Offset;
        const long * outputIndex = filter-&gt;GetOutputIndex().m_Index;
        const unsigned long * outputSize = filter-&gt;GetOutputSize().m_Size;
        const float * outweights =  filter-&gt;GetWeights().GetDataPointer();
        const double * spacingValue = import-&gt;GetSpacing().GetDataPointer();
        const double * originValue = import-&gt;GetOrigin().GetDataPointer();
      </New>

    </SampleCode>

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

    <!--**
    ** List of all changed files from the topic branch
    **-->
    <FileList>
      Code/Algorithms/itkFastChamferDistanceImageFilter.h
      Code/Algorithms/itkMultiResolutionPDEDeformableRegistration.h
      Code/Algorithms/itkMultiResolutionPDEDeformableRegistration.txx
      Code/Algorithms/itkPDEDeformableRegistrationFilter.h
      Code/BasicFilters/itkBilateralImageFilter.txx
      Code/BasicFilters/itkChangeInformationImageFilter.h
      Code/BasicFilters/itkChangeInformationImageFilter.txx
      Code/BasicFilters/itkDisplacementFieldJacobianDeterminantFilter.h
      Code/BasicFilters/itkDisplacementFieldJacobianDeterminantFilter.txx
      Code/BasicFilters/itkExpandImageFilter.h
      Code/BasicFilters/itkExpandImageFilter.txx
      Code/BasicFilters/itkGaussianImageSource.h
      Code/BasicFilters/itkGaussianImageSource.txx
      Code/BasicFilters/itkGradientImageToBloxBoundaryPointImageFilter.h
      Code/BasicFilters/itkGradientImageToBloxBoundaryPointImageFilter.txx
      Code/BasicFilters/itkGrayscaleMorphologicalClosingImageFilter.txx
      Code/BasicFilters/itkGrayscaleMorphologicalOpeningImageFilter.txx
      Code/BasicFilters/itkImportImageFilter.h
      Code/BasicFilters/itkImportImageFilter.txx
      Code/BasicFilters/itkPadImageFilter.h
      Code/BasicFilters/itkReconstructionImageFilter.txx
      Code/BasicFilters/itkShrinkImageFilter.h
      Code/BasicFilters/itkShrinkImageFilter.txx
      Code/BasicFilters/itkVectorExpandImageFilter.h
      Code/BasicFilters/itkVectorExpandImageFilter.txx
      Code/BasicFilters/itkVectorGradientMagnitudeImageFilter.h
      Code/BasicFilters/itkVectorGradientMagnitudeImageFilter.txx
      Code/IO/itkStimulateImageIO.h
      Code/Review/itkBinaryMorphologicalClosingImageFilter.txx
      Code/Review/itkWarpHarmonicEnergyCalculator.h
      Code/Review/itkWarpHarmonicEnergyCalculator.txx
      Examples/Registration/DeformableRegistration16.cxx
      Migration/CArrayRemoval.xml
      Testing/Code/Algorithms/itkFastChamferDistanceImageFilterTest.cxx
      Testing/Code/BasicFilters/itkChangeInformationImageFilterTest.cxx
      Testing/Code/BasicFilters/itkImportImageTest.cxx
    </FileList>

</Change>
