<commit_before>/*======================================================================

  This file is part of the elastix software.

  Copyright (c) University Medical Center Utrecht. All rights reserved.
  See src/CopyrightElastix.txt or http://elastix.isi.uu.nl/legal.php for
  details.

     This software is distributed WITHOUT ANY WARRANTY; without even
     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
     PURPOSE. See the above copyright notices for more information.

======================================================================*/

#ifndef __elxAffineDTITransform_H__
#define __elxAffineDTITransform_H__

#include "itkAdvancedCombinationTransform.h"
#include "itkAffineDTITransform.h"
#include "itkCenteredTransformInitializer.h"
#include "elxIncludes.h"

namespace elastix
{

  /**
   * \class AffineDTITransformElastix
   * \brief A transform based on the itk AffineDTITransform.
   *
   * This transform is an affine transformation, with a different parametrisation
   * than the usual one. It is specialised for MR-DTI applications.
   * See also the description of the itk::AffineDTI3DTransform.
   *
   * \warning: the behaviour of this transform might still change in the future. It is still experimental.
   *
   * The parameters used in this class are:
   * \parameter Transform: Select this transform as follows:\n
   *    <tt>(%Transform "AffineDTITransform")</tt>
   * \parameter Scales: the scale factor for each parameter, used by the optimizer. \n
   *    example: <tt>(Scales -1 -1 -1 100000000 -1 -1 -1 -1 -1 -1 -1 -1)</tt> \n
   *    The scales work a bit different in this transformation, compared with the other
   *    transformations like the EulerTransform. By default, if no scales are
   *    supplied, the scales are estimated automatically. With the scales parameter,
   *    the user can override the automatically determined scales. Values smaller than
   *    or equal to 0 are ignored: the automatically estimated value is used for these
   *    parameters. Positive values override the automatically estimated scales. So,
   *    in the example above, the shear_x parameter is given a very large scale, which
   *    effectively turns off the optimization of that parameters. This might be useful
   *    in some MR-DTI application.
   * \parameter CenterOfRotation: an index around which the image is rotated. \n
   *    example: <tt>(CenterOfRotation 128 128 90)</tt> \n
   *    By default the CenterOfRotation is set to the geometric center of the image.
   * \parameter AutomaticTransformInitialization: whether or not the initial translation
   *    between images should be estimated as the distance between their centers.\n
   *    example: <tt>(AutomaticTransformInitialization "true")</tt> \n
   *    By default "false" is assumed. So, no initial translation.
   *
   * The transform parameters necessary for transformix, additionally defined by this class, are:   *
   * \transformparameter CenterOfRotation: stores the center of rotation as an index. \n
   *    example: <tt>(CenterOfRotation 128 128 90)</tt>\n
   *    <b>depecrated!</b> From elastix version 3.402 this is changed to CenterOfRotationPoint!
   * \transformparameter CenterOfRotationPoint: stores the center of rotation, expressed in world coordinates. \n
   *    example: <tt>(CenterOfRotationPoint 10.555 6.666 12.345)</tt>
   * \transformparameter MatrixTranslation: the parameters as matrix and translation, so written
   *    in the same way as the parameters of the normal AffineTransform.\n
   *    example: <tt>(MatrixTranslation 1 0 0 0 1 0 0 0 0.9 0.1 0.1 0.2)</tt>\n
   *    This parameter is just for convenience, so that the user can compare the results between
   *    the AffineTransform and AffineDTITransform. It is not a mandatory parameter.
   *
   * \ingroup Transforms
   * \sa AffineDTI3DTransform
   */

  template < class TElastix >
    class AffineDTITransformElastix:
      public itk::AdvancedCombinationTransform<
        typename elx::TransformBase< TElastix >::CoordRepType,
        elx::TransformBase< TElastix >::FixedImageDimension >,
      public elx::TransformBase< TElastix >
  {
  public:

    /** Standard ITK-stuff.*/
    typedef AffineDTITransformElastix                           Self;
    typedef AdvancedCombinationTransform<
      typename elx::TransformBase< TElastix >::CoordRepType,
      elx::TransformBase< TElastix >::FixedImageDimension >     Superclass1;
    typedef elx::TransformBase< TElastix >                      Superclass2;
    typedef itk::SmartPointer<Self>                                  Pointer;
    typedef itk::SmartPointer<const Self>                            ConstPointer;

    /** The ITK-class that provides most of the functionality, and
     * that is set as the "CurrentTransform" in the CombinationTransform */
    typedef itk::AffineDTITransform<
      typename elx::TransformBase< TElastix >::CoordRepType,
      elx::TransformBase< TElastix >::FixedImageDimension >     AffineDTITransformType;

    /** Method for creation through the object factory. */
    itkNewMacro( Self );

    /** Run-time type information (and related methods). */
    itkTypeMacro( AffineDTITransformElastix, AdvancedCombinationTransform );

    /** Name of this class.
     * Use this name in the parameter file to select this specific transform. \n
     * example: <tt>(Transform "AffineDTITransform")</tt>\n
     */
    elxClassNameMacro( "AffineDTITransform" );

    /** Dimension of the fixed image. */
    itkStaticConstMacro( SpaceDimension, unsigned int, Superclass2::FixedImageDimension );

    /** Typedefs inherited from the superclass. */
<commit_msg>COMP: missing itk:: qualifier<commit_after>/*======================================================================

  This file is part of the elastix software.

  Copyright (c) University Medical Center Utrecht. All rights reserved.
  See src/CopyrightElastix.txt or http://elastix.isi.uu.nl/legal.php for
  details.

     This software is distributed WITHOUT ANY WARRANTY; without even
     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
     PURPOSE. See the above copyright notices for more information.

======================================================================*/

#ifndef __elxAffineDTITransform_H__
#define __elxAffineDTITransform_H__

#include "itkAdvancedCombinationTransform.h"
#include "itkAffineDTITransform.h"
#include "itkCenteredTransformInitializer.h"
#include "elxIncludes.h"

namespace elastix
{

  /**
   * \class AffineDTITransformElastix
   * \brief A transform based on the itk AffineDTITransform.
   *
   * This transform is an affine transformation, with a different parametrisation
   * than the usual one. It is specialised for MR-DTI applications.
   * See also the description of the itk::AffineDTI3DTransform.
   *
   * \warning: the behaviour of this transform might still change in the future. It is still experimental.
   *
   * The parameters used in this class are:
   * \parameter Transform: Select this transform as follows:\n
   *    <tt>(%Transform "AffineDTITransform")</tt>
   * \parameter Scales: the scale factor for each parameter, used by the optimizer. \n
   *    example: <tt>(Scales -1 -1 -1 100000000 -1 -1 -1 -1 -1 -1 -1 -1)</tt> \n
   *    The scales work a bit different in this transformation, compared with the other
   *    transformations like the EulerTransform. By default, if no scales are
   *    supplied, the scales are estimated automatically. With the scales parameter,
   *    the user can override the automatically determined scales. Values smaller than
   *    or equal to 0 are ignored: the automatically estimated value is used for these
   *    parameters. Positive values override the automatically estimated scales. So,
   *    in the example above, the shear_x parameter is given a very large scale, which
   *    effectively turns off the optimization of that parameters. This might be useful
   *    in some MR-DTI application.
   * \parameter CenterOfRotation: an index around which the image is rotated. \n
   *    example: <tt>(CenterOfRotation 128 128 90)</tt> \n
   *    By default the CenterOfRotation is set to the geometric center of the image.
   * \parameter AutomaticTransformInitialization: whether or not the initial translation
   *    between images should be estimated as the distance between their centers.\n
   *    example: <tt>(AutomaticTransformInitialization "true")</tt> \n
   *    By default "false" is assumed. So, no initial translation.
   *
   * The transform parameters necessary for transformix, additionally defined by this class, are:   *
   * \transformparameter CenterOfRotation: stores the center of rotation as an index. \n
   *    example: <tt>(CenterOfRotation 128 128 90)</tt>\n
   *    <b>depecrated!</b> From elastix version 3.402 this is changed to CenterOfRotationPoint!
   * \transformparameter CenterOfRotationPoint: stores the center of rotation, expressed in world coordinates. \n
   *    example: <tt>(CenterOfRotationPoint 10.555 6.666 12.345)</tt>
   * \transformparameter MatrixTranslation: the parameters as matrix and translation, so written
   *    in the same way as the parameters of the normal AffineTransform.\n
   *    example: <tt>(MatrixTranslation 1 0 0 0 1 0 0 0 0.9 0.1 0.1 0.2)</tt>\n
   *    This parameter is just for convenience, so that the user can compare the results between
   *    the AffineTransform and AffineDTITransform. It is not a mandatory parameter.
   *
   * \ingroup Transforms
   * \sa AffineDTI3DTransform
   */

  template < class TElastix >
    class AffineDTITransformElastix:
      public itk::AdvancedCombinationTransform<
        typename elx::TransformBase< TElastix >::CoordRepType,
        elx::TransformBase< TElastix >::FixedImageDimension >,
      public elx::TransformBase< TElastix >
  {
  public:

    /** Standard ITK-stuff.*/
    typedef AffineDTITransformElastix                           Self;
    typedef itk::AdvancedCombinationTransform<
      typename elx::TransformBase< TElastix >::CoordRepType,
      elx::TransformBase< TElastix >::FixedImageDimension >     Superclass1;
    typedef elx::TransformBase< TElastix >                      Superclass2;
    typedef itk::SmartPointer<Self>                             Pointer;
    typedef itk::SmartPointer<const Self>                       ConstPointer;

    /** The ITK-class that provides most of the functionality, and
     * that is set as the "CurrentTransform" in the CombinationTransform */
    typedef itk::AffineDTITransform<
      typename elx::TransformBase< TElastix >::CoordRepType,
      elx::TransformBase< TElastix >::FixedImageDimension >     AffineDTITransformType;

    /** Method for creation through the object factory. */
    itkNewMacro( Self );

    /** Run-time type information (and related methods). */
    itkTypeMacro( AffineDTITransformElastix, AdvancedCombinationTransform );

    /** Name of this class.
     * Use this name in the parameter file to select this specific transform. \n
     * example: <tt>(Transform "AffineDTITransform")</tt>\n
     */
    elxClassNameMacro( "AffineDTITransform" );

    /** Dimension of the fixed image. */
    itkStaticConstMacro( SpaceDimension, unsigned int, Superclass2::FixedImageDimension );

    /** Typedefs inherited from the superclass. */

{'fraction_non_alphanumeric': 0.09974469583590105, 'fraction_numerical': 0.013381459635531296, 'mean_word_length': 3.4202334630350193, 'pattern_counts': {'":': 0, '<': 67, '<?xml version=': 0, '>': 67, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3020975', 'n_tokens_mistral': 3205, 'n_tokens_neox': 2989, 'n_words': 1139}