KWStyle - itkAsinImageAdaptor.h
 
Matrix View
Description

1 /*=========================================================================
2
3   Program:   Insight Segmentation & Registration Toolkit
4   Module:    $RCSfile: itkAsinImageAdaptor.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 __itkAsinImageAdaptor_h
18 #define __itkAsinImageAdaptor_h
19
20 #include <itkImageAdaptor.h>
21 #include "vnl/vnl_math.h"
22
23 namespace itk
24 {
25  
26 namespace Accessor {
27 /**
28  * \class AsinPixelAccessor
29  * \brief Give access to the asin() function of a value
30  *
31  * AsinPixelAccessor is templated over an internal type and an
32  * external type representation. This class cast the input
33  * applies the funtion to it and cast the result according 
34  * to the types defined as template parameters
35  * 
36  * \ingroup ImageAdaptors */
37
38 template <class TInternalType, class TExternalType >
39 class ITK_EXPORT AsinPixelAccessor  
40 {
41 public:
42
43 IND */** External typedef. It defines the external aspect
44    * that this class will exhibit. */
45   typedef TExternalType ExternalType;
46
47   /** Internal typedef. It defines the internal real
48    * representation of data. */
49   typedef TInternalType InternalType;
50
51   static inline void Set(TInternalType & output, const TExternalType & input) 
52     {output = (TInternalType)asin((double)input);}
53
54   static inline TExternalType Get( const TInternalType & input ) 
55     {return (TExternalType)asin((double)input);}
56 };
57
58   
59 // end namespace Accessor
60
61 /**
62  * \class AsinImageAdaptor
63  * \brief Presents an image as being composed of the asin() of its pixels
64  *
65  * Additional casting is performed according to the input and output image
66  * types following C++ default casting rules.
67  *
68  * \ingroup ImageAdaptors */
69 template <class TImage, class TOutputPixelType>
70 class ITK_EXPORT AsinImageAdaptor : public
71 IND ******ImageAdaptor<TImage,
72                    Accessor::AsinPixelAccessor<
73                                       typename TImage::PixelType,
74                                       TOutputPixelType>   >
75 {
76 public:
77   /** Standard class typedefs. */
78   typedef AsinImageAdaptor  Self;
79   typedef ImageAdaptor<TImage,Accessor::AsinPixelAccessor<
80                                        typename TImage::PixelType,
81                                        TOutputPixelType> >
82 TDA,IND ************************************************************Superclass;
83 TDA   typedef SmartPointer<Self>  Pointer;
84 TDA   typedef SmartPointer<const Self>  ConstPointer;
85   
86   /** Run-time type information (and related methods). */
87   itkTypeMacro( AsinImageAdaptor, ImageAdaptor );
88
89   /** Method for creation through the object factory. */
90   itkNewMacro(Self);  
91
92 protected:
93   AsinImageAdaptor() {}
94   virtual ~AsinImageAdaptor() {}
95   
96 private:
97   AsinImageAdaptor(const Self&); //purposely not implemented
98   void operator=(const Self&); //purposely not implemented
99 };
100
101 // end namespace itk
102
103 #endif
104

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