<commit_before>/*=========================================================================
*
*  Copyright Insight Software Consortium
*
*  Licensed under the Apache License, Version 2.0 (the "License");
*  you may not use this file except in compliance with the License.
*  You may obtain a copy of the License at
*
*         http://www.apache.org/licenses/LICENSE-2.0.txt
*
*  Unless required by applicable law or agreed to in writing, software
*  distributed under the License is distributed on an "AS IS" BASIS,
*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*  See the License for the specific language governing permissions and
*  limitations under the License.
*
*=========================================================================*/
#ifndef __sitkEuler2DTransform_h
#define __sitkEuler2DTransform_h

#include "sitkCommon.h"
#include "sitkTransform.h"

namespace itk
{
namespace simple
{

class SITKCommon_EXPORT Euler2DTransform
  : public Transform
{
public:
  typedef Euler2DTransform Self;
  typedef Transform Superclass;

// construct identity
  Euler2DTransform();

  explicit Euler2DTransform(const std::vector<double> &fixedCenter,
                            double angle=0.0,
                            const std::vector<double> &translation = std::vector<double>(3,0.0) );

  Euler2DTransform( const Euler2DTransform & );

  Euler2DTransform &operator=( const Euler2DTransform & );

/** fixed parameter */
  Self &SetCenter(const std::vector<double> &params);
  std::vector<double> GetCenter( ) const;

  double GetAngle () const;

/** parameter */
  Self &SetAngle (double angle);

  std::vector<double> GetTranslation( ) const;
  Self &SetTranslation(const std::vector<double>& translation);

protected:

  virtual void SetPimpleTransform( PimpleTransformBase *pimpleTransform );

private:

  using Superclass::AddTransform;

  void InternalInitialization(itk::TransformBase *transform);

  template <typename TransformType>
    void InternalInitialization(TransformType *transform);

  nsstd::function<void(const std::vector<double>&)> m_pfSetCenter;
  nsstd::function<std::vector<double>()> m_pfGetCenter;
  nsstd::function<void(double)> m_pfSetAngle;
  nsstd::function<double()> m_pfGetAngle;
  nsstd::function<void(const std::vector<double>&)> m_pfSetTranslation;
  nsstd::function<std::vector<double>()> m_pfGetTranslation;

};

}
}

#endif // __sitkEuler2DTransform_h
<commit_msg>Fix default argument to euler2d constructor<commit_after>/*=========================================================================
*
*  Copyright Insight Software Consortium
*
*  Licensed under the Apache License, Version 2.0 (the "License");
*  you may not use this file except in compliance with the License.
*  You may obtain a copy of the License at
*
*         http://www.apache.org/licenses/LICENSE-2.0.txt
*
*  Unless required by applicable law or agreed to in writing, software
*  distributed under the License is distributed on an "AS IS" BASIS,
*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*  See the License for the specific language governing permissions and
*  limitations under the License.
*
*=========================================================================*/
#ifndef __sitkEuler2DTransform_h
#define __sitkEuler2DTransform_h

#include "sitkCommon.h"
#include "sitkTransform.h"

namespace itk
{
namespace simple
{

class SITKCommon_EXPORT Euler2DTransform
  : public Transform
{
public:
  typedef Euler2DTransform Self;
  typedef Transform Superclass;

// construct identity
  Euler2DTransform();

  explicit Euler2DTransform(const std::vector<double> &fixedCenter,
                            double angle=0.0,
                            const std::vector<double> &translation = std::vector<double>(2,0.0) );

  Euler2DTransform( const Euler2DTransform & );

  Euler2DTransform &operator=( const Euler2DTransform & );

/** fixed parameter */
  Self &SetCenter(const std::vector<double> &params);
  std::vector<double> GetCenter( ) const;

/** parameter */
  Self &SetAngle (double angle);
  double GetAngle () const;

  std::vector<double> GetTranslation( ) const;
  Self &SetTranslation(const std::vector<double>& translation);

protected:

  virtual void SetPimpleTransform( PimpleTransformBase *pimpleTransform );

private:

  using Superclass::AddTransform;

  void InternalInitialization(itk::TransformBase *transform);

  template <typename TransformType>
    void InternalInitialization(TransformType *transform);

  nsstd::function<void(const std::vector<double>&)> m_pfSetCenter;
  nsstd::function<std::vector<double>()> m_pfGetCenter;
  nsstd::function<void(double)> m_pfSetAngle;
  nsstd::function<double()> m_pfGetAngle;
  nsstd::function<void(const std::vector<double>&)> m_pfSetTranslation;
  nsstd::function<std::vector<double>()> m_pfGetTranslation;

};

}
}

#endif // __sitkEuler2DTransform_h

{'fraction_non_alphanumeric': 0.15841987375279984, 'fraction_numerical': 0.008348605172062717, 'mean_word_length': 5.178616352201258, 'pattern_counts': {'":': 0, '<': 39, '<?xml version=': 0, '>': 39, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2481812', 'n_tokens_mistral': 1422, 'n_tokens_neox': 1356, 'n_words': 375}