<commit_before><commit_msg>itkFilterImageTernaryModuleSquare computes pixel-wise the sum of squares of the three input images. This class is parametrized over the type of the three input images and over the type of the output image.<commit_after>/*=========================================================================

  Program:   Insight Segmentation & Registration Toolkit
  Module:    itkFilterImageTernaryModuleSquare.h
  Language:  C++
  Date:      $Date$
  Version:   $Revision$


  Copyright (c) 2000 National Library of Medicine
  All rights reserved.

  See COPYRIGHT.txt for copyright details.

=========================================================================*/
#ifndef __itkFilterImageTernaryModuleSquare_h
#define __itkFilterImageTernaryModuleSquare_h

#include "itkFilterImageTernary.h"

namespace itk
{
  
/** \class FilterTernaryModuleSquare
 * \brief Implements pixel-wise addition of three images.
 *
 * This class is parametrized over the types of the three 
 * input images and the type of the output image. 
 * Numeric conversions (castings) are done by the C++ defaults.
 *
 */

namespace function {  
  
  template< class TInput1, class TInput2, class TInput3, class TOutput>
  class ModuleSquare3
  {
  public:
    ModuleSquare3() {};
    ~ModuleSquare3() {};
    inline TOutput operator()( const TInput1 & A, 
                               const TInput2 & B,
                               const TInput3 & C)
    {
      return (TOutput)(A*A + B*B + C*C);
    }
  }; 

}



template <class TInputImage1, class TInputImage2, 
          class TInputImage3, class TOutputImage>
class ITK_EXPORT FilterImageTernaryModuleSquare :
    public
    FilterImageTernary<TInputImage1,TInputImage2,
                      TInputImage3,TOutputImage, 
            function::ModuleSquare3< 
                      typename TInputImage1::PixelType, 
                      typename TInputImage2::PixelType,
                      typename TInputImage3::PixelType,
                      typename TOutputImage::PixelType >   >


{
public:
  /**
   * Standard "Self" typedef.
   */
  typedef FilterImageTernaryModuleSquare  Self;

  /** 
   * Smart pointer typedef support 
   */
  typedef SmartPointer<Self>   Pointer;


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

  FilterImageTernaryModuleSquare() {}
  virtual ~FilterImageTernaryModuleSquare() {}
  FilterImageTernaryModuleSquare(const Self&) {}
  void operator=(const Self&) {}


};

} // end namespace itk


#endif
{'fraction_non_alphanumeric': 0.13099921321793864, 'fraction_numerical': 0.00904799370574351, 'mean_word_length': 3.042925278219396, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '817344', 'n_tokens_mistral': 747, 'n_tokens_neox': 692, 'n_words': 196}