~ubuntu-branches/ubuntu/precise/insighttoolkit/precise

« back to all changes in this revision

Viewing changes to Code/BasicFilters/itkTernaryMagnitudeImageFilter.h

  • Committer: Bazaar Package Importer
  • Author(s): Steve M. Robbins
  • Date: 2008-12-19 20:16:49 UTC
  • mfrom: (1.2.1 upstream) (4.1.1 sid)
  • Revision ID: james.westby@ubuntu.com-20081219201649-drt97guwl2ryt0cn

* New upstream version.
  - patches/nifti-versioning.patch: Remove.  Applied upstream.
  - control:
  - rules: Update version numbers, package names.

* control: Build-depend on uuid-dev (gdcm uses it).

* copyright: Update download URL.

* rules: Adhere to parallel=N in DEB_BUILD_OPTIONS by setting MAKEFLAGS.

* compat: Set to 7.
* control: Update build-dep on debhelper to version >= 7.

* CMakeCache.txt.debian: Set CMAKE_BUILD_TYPE to "RELEASE" so that we
  build with -O3 (not -O2), necessary to optimize the templated code.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
  Program:   Insight Segmentation & Registration Toolkit
4
4
  Module:    $RCSfile: itkTernaryMagnitudeImageFilter.h,v $
5
5
  Language:  C++
6
 
  Date:      $Date: 2007-09-27 11:36:41 $
7
 
  Version:   $Revision: 1.26 $
 
6
  Date:      $Date: 2008-10-18 16:11:14 $
 
7
  Version:   $Revision: 1.27 $
8
8
 
9
9
  Copyright (c) Insight Software Consortium. All rights reserved.
10
10
  See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
40
40
  Modulus3() {}
41
41
  ~Modulus3() {}
42
42
  bool operator!=( const Modulus3 & ) const
43
 
  {
 
43
    {
44
44
    return false;
45
 
  }
 
45
    }
46
46
  bool operator==( const Modulus3 & other ) const
47
 
  {
 
47
    {
48
48
    return !(*this != other);
49
 
  }
 
49
    }
50
50
  inline TOutput operator()( const TInput1 & A, 
51
51
                             const TInput2 & B,
52
52
                             const TInput3 & C)
53
 
  { return (TOutput) vcl_sqrt((double)(A*A + B*B + C*C) ); }
 
53
    { return (TOutput) vcl_sqrt((double)(A*A + B*B + C*C) ); }
54
54
}; 
55
55
}
56
56
 
68
68
{
69
69
public:
70
70
  /** Standard class typedefs. */
71
 
  typedef TernaryMagnitudeImageFilter  Self;
72
 
  typedef TernaryFunctorImageFilter<TInputImage1,TInputImage2,
73
 
                                    TInputImage3,TOutputImage, 
74
 
                                    Function::Modulus3< 
75
 
    typename TInputImage1::PixelType, 
76
 
    typename TInputImage2::PixelType,
77
 
    typename TInputImage3::PixelType,
78
 
    typename TOutputImage::PixelType>   
79
 
  >  Superclass;
80
 
  typedef SmartPointer<Self>   Pointer;
81
 
  typedef SmartPointer<const Self>  ConstPointer;
 
71
  typedef TernaryMagnitudeImageFilter   Self;
 
72
  typedef TernaryFunctorImageFilter<
 
73
    TInputImage1,TInputImage2,
 
74
    TInputImage3,TOutputImage, 
 
75
    Function::Modulus3< 
 
76
      typename TInputImage1::PixelType, 
 
77
      typename TInputImage2::PixelType,
 
78
      typename TInputImage3::PixelType,
 
79
      typename TOutputImage::PixelType>   
 
80
    >                                   Superclass;
 
81
  typedef SmartPointer<Self>            Pointer;
 
82
  typedef SmartPointer<const Self>      ConstPointer;
82
83
 
83
84
  /** Method for creation through the object factory. */
84
85
  itkNewMacro(Self);