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

« back to all changes in this revision

Viewing changes to Code/BasicFilters/itkVectorRescaleIntensityImageFilter.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: itkVectorRescaleIntensityImageFilter.h,v $
5
5
  Language:  C++
6
 
  Date:      $Date: 2008-01-28 17:24:05 $
7
 
  Version:   $Revision: 1.6 $
 
6
  Date:      $Date: 2008-10-17 20:50:03 $
 
7
  Version:   $Revision: 1.7 $
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.
36
36
  void SetFactor( RealType a ) { m_Factor = a; }
37
37
  itkStaticConstMacro(VectorDimension,unsigned int,TInput::Dimension);
38
38
  bool operator!=( const VectorMagnitudeLinearTransform & other ) const
39
 
  {
 
39
    {
40
40
    if( m_Factor != other.m_Factor )
41
41
      {
42
42
      return true;
43
43
      }
44
44
    return false;
45
 
   }
 
45
    }
46
46
  bool operator==( const VectorMagnitudeLinearTransform & other ) const
47
 
  {
 
47
    {
48
48
    return !(*this != other);
49
 
  }
 
49
    }
50
50
  inline TOutput operator()( const TInput & x )
51
 
  {
 
51
    {
52
52
    TOutput  result;
53
53
    for(unsigned int i=0; i<VectorDimension; i++)
54
54
      {
56
56
      result[i]= static_cast< typename TOutput::ValueType >( scaledComponent );
57
57
      }
58
58
    return result;
59
 
  }
 
59
    }
60
60
private:
61
61
  RealType m_Factor;
62
62
}; 
92
92
public:
93
93
  /** Standard class typedefs. */
94
94
  typedef VectorRescaleIntensityImageFilter  Self;
95
 
  typedef UnaryFunctorImageFilter<TInputImage,TOutputImage, 
96
 
                                  Functor::VectorMagnitudeLinearTransform< 
97
 
    typename TInputImage::PixelType, 
98
 
    typename TOutputImage::PixelType> >  Superclass;
99
 
  typedef SmartPointer<Self>   Pointer;
100
 
  typedef SmartPointer<const Self>  ConstPointer;
 
95
  typedef UnaryFunctorImageFilter<
 
96
    TInputImage,TOutputImage, 
 
97
    Functor::VectorMagnitudeLinearTransform< 
 
98
      typename TInputImage::PixelType, 
 
99
      typename TOutputImage::PixelType> >    Superclass;
 
100
  typedef SmartPointer<Self>                 Pointer;
 
101
  typedef SmartPointer<const Self>           ConstPointer;
101
102
 
102
103
  typedef typename TOutputImage::PixelType                  OutputPixelType;
103
104
  typedef typename TInputImage::PixelType                   InputPixelType;