<commit_before>/*=========================================================================
 *
 *  Copyright RTK 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 __rtkDrawSheppLoganFilter_h
#define __rtkDrawSheppLoganFilter_h

#include <itkInPlaceImageFilter.h>

#include "rtkThreeDCircularProjectionGeometry.h"
#include "rtkConvertEllipsoidToQuadricParametersFunction.h"

namespace rtk
{

/** \class DrawSheppLoganFilter
 * \brief Draws in a 3D image the Shepp-Logan phantom described in
 *  http://www.slaney.org/pct/pct-errata.html
 * Y and Z have been exchanged to follow the coordinate system of the IEC 61217
 * international standard used by RTK.
 *
 * \author <NAME>
 *
 * \ingroup InPlaceImageFilter
 */
template <class TInputImage, class TOutputImage>
class ITK_EXPORT DrawSheppLoganFilter :
  public itk::InPlaceImageFilter<TInputImage,TOutputImage>
{
public:
  /** Standard class typedefs. */
  typedef DrawSheppLoganFilter                              Self;
  typedef itk::InPlaceImageFilter<TInputImage,TOutputImage> Superclass;
  typedef itk::SmartPointer<Self>                           Pointer;
  typedef itk::SmartPointer<const Self>                     ConstPointer;
  typedef typename TOutputImage::RegionType                 OutputImageRegionType;

  typedef std::vector<double>                               VectorType;
  typedef std::string                                       StringType;

  typedef rtk::ConvertEllipsoidToQuadricParametersFunction          EQPFunctionType;
  struct figure
  {
    VectorType semiprincipalaxis;
    VectorType center;
    double     angle;
    double     attenuation;
  };
  /** Method for creation through the object factory. */
  itkNewMacro(Self);

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

  /** Multiplicative Scaling factor for the phantom parameters described in
   * http://www.slaney.org/pct/pct-errata.html. */
  itkSetMacro(PhantomScale, double);
  itkGetMacro(PhantomScale, double);

protected:
  DrawSheppLoganFilter();
  virtual ~DrawSheppLoganFilter() {};

  virtual void ThreadedGenerateData( const OutputImageRegionType& outputRegionForThread, ThreadIdType threadId );

private:
  DrawSheppLoganFilter(const Self&); //purposely not implemented
  void operator=(const Self&);            //purposely not implemented

  double m_PhantomScale;
};

} // end namespace rtk

#ifndef ITK_MANUAL_INSTANTIATION
#include "rtkDrawSheppLoganFilter.txx"
#endif

#endif
<commit_msg>ITK style correction, minor issue<commit_after>/*=========================================================================
 *
 *  Copyright RTK 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 __rtkDrawSheppLoganFilter_h
#define __rtkDrawSheppLoganFilter_h

#include <itkInPlaceImageFilter.h>

#include "rtkThreeDCircularProjectionGeometry.h"
#include "rtkConvertEllipsoidToQuadricParametersFunction.h"

namespace rtk
{

/** \class DrawSheppLoganFilter
 * \brief Draws in a 3D image the Shepp-Logan phantom described in
 *  http://www.slaney.org/pct/pct-errata.html
 * Y and Z have been exchanged to follow the coordinate system of the IEC 61217
 * international standard used by RTK.
 *
 * \author <NAME>
 *
 * \ingroup InPlaceImageFilter
 */
template <class TInputImage, class TOutputImage>
class ITK_EXPORT DrawSheppLoganFilter :
  public itk::InPlaceImageFilter<TInputImage,TOutputImage>
{
public:
  /** Standard class typedefs. */
  typedef DrawSheppLoganFilter                              Self;
  typedef itk::InPlaceImageFilter<TInputImage,TOutputImage> Superclass;
  typedef itk::SmartPointer<Self>                           Pointer;
  typedef itk::SmartPointer<const Self>                     ConstPointer;
  typedef typename TOutputImage::RegionType                 OutputImageRegionType;

  typedef std::vector<double>                               VectorType;
  typedef std::string                                       StringType;

  typedef rtk::ConvertEllipsoidToQuadricParametersFunction  EQPFunctionType;
  struct figure
  {
    VectorType semiprincipalaxis;
    VectorType center;
    double     angle;
    double     attenuation;
  };
  /** Method for creation through the object factory. */
  itkNewMacro(Self);

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

  /** Multiplicative Scaling factor for the phantom parameters described in
   * http://www.slaney.org/pct/pct-errata.html. */
  itkSetMacro(PhantomScale, double);
  itkGetMacro(PhantomScale, double);

protected:
  DrawSheppLoganFilter();
  virtual ~DrawSheppLoganFilter() {};

  virtual void ThreadedGenerateData( const OutputImageRegionType& outputRegionForThread, ThreadIdType threadId );

private:
  DrawSheppLoganFilter(const Self&); //purposely not implemented
  void operator=(const Self&);            //purposely not implemented

  double m_PhantomScale;
};

} // end namespace rtk

#ifndef ITK_MANUAL_INSTANTIATION
#include "rtkDrawSheppLoganFilter.txx"
#endif

#endif

{'fraction_non_alphanumeric': 0.12146713242299143, 'fraction_numerical': 0.0031756113051762463, 'mean_word_length': 3.7042569081404033, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 6, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2243589', 'n_tokens_mistral': 1801, 'n_tokens_neox': 1726, 'n_words': 498}