KWStyle - itkAddImageAdaptor.h
 
Matrix View
Description

1 /*=========================================================================
2
3   Program:   Insight Segmentation & Registration Toolkit
4   Module:    $RCSfile: itkAddImageAdaptor.h.html,v $
5   Language:  C++
6   Date:      $Date: 2006/01/17 19:15:32 $
7   Version:   $Revision: 1.4 $
8
9   Copyright (c) Insight Software Consortium. All rights reserved.
10   See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
11
12      This software is distributed WITHOUT ANY WARRANTY; without even 
13      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
14      PURPOSE.  See the above copyright notices for more information.
15
16 =========================================================================*/
17 #ifndef __itkAddImageAdaptor_h
18 #define __itkAddImageAdaptor_h
19
20 #include "itkImageAdaptor.h"
21 #include "itkAddPixelAccessor.h"
22
23 namespace itk
24 {
25  
26 /** \class AddImageAdaptor
27  * \brief Presents an image as being composed of the log() of its pixels
28  *
29  * Additional casting is performed according to the input and output image
30  * types following C++ default casting rules.
31  *
32  * \ingroup ImageAdaptors
33  */
34 template <class TImage>
35 class ITK_EXPORT AddImageAdaptor : public
36 IND ******ImageAdaptor<TImage,
37                    Accessor::AddPixelAccessor< typename TImage::PixelType >   >
38 {
39 public:
40   /** Standard class typedefs. */
41   typedef AddImageAdaptor  Self;
42   typedef ImageAdaptor<TImage,
43                        Accessor::AddPixelAccessor<
44 TDA                                  typename TImage::PixelType > >  Superclass;
45 TDA   typedef SmartPointer<Self>  Pointer;
46 TDA   typedef SmartPointer<const Self>  ConstPointer;
47   
48   typedef typename TImage::PixelType      PixelType;
49
50   /** Run-time type information (and related methods). */
51   itkTypeMacro( AddImageAdaptor, ImageAdaptor );
52
53   /** Method for creation through the object factory. */
54   itkNewMacro(Self);  
55
56   /** Set the value to be added to image pixels */
57   void SetValue( const PixelType newvalue )
58     { this->GetPixelAccessor().SetValue( newvalue ); }
59   
60   /** Get the value to be added to image pixels */
61   PixelType GetValue() const 
62     { return this->GetPixelAccessor().GetValue(); }
63   
64 protected:
65   AddImageAdaptor() {}
66   virtual ~AddImageAdaptor() {}
67   
68 private:
69   AddImageAdaptor(const Self&); //purposely not implemented
70   void operator=(const Self&); //purposely not implemented
71 };
72
73 // end namespace itk
74
75 #endif
76

Generated by KWStyle 1.0b on Tuesday January,17 at 02:13:58PM
© Kitware Inc.