KWStyle - itkDefaultPixelAccessor.h
 
Matrix View
Description

1 /*=========================================================================
2
3   Program:   Insight Segmentation & Registration Toolkit
4   Module:    $RCSfile: itkDefaultPixelAccessor.h.html,v $
5   Language:  C++
6   Date:      $Date: 2006/01/17 19:15:34 $
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 __itkDefaultPixelAccessor_h
18 #define __itkDefaultPixelAccessor_h
19
20 #include "itkMacro.h"
21
22 namespace itk
23 {
24
25 /**
26  * \class DefaultPixelAccessor
27  * \brief Give access to partial aspects a type
28  *
29  * DefaultPixelAccessor is templated over an internal type and an
30  * external type representation. This class encapsulates a
31  * customized convertion between the internal and external
32  * type representations.
33  *
34  * PixelAccessor is the class responsible for pixel-to-pixel
35  * transformation during image data access. The DefaultPixelAccessor
36  * is an identity operation on the pixel value. It only exist in
37  * order to standarize the way in which pixels are accessed.
38  *
39  * PixelAccessor are used by ImageAdaptors in order to present
40  * an Image as being of a different type. The usual application
41  * of ImageAccessors is Image casting, by avoiding the overhead
42  * of an ImageFilter that performs the complete transformation
43  *
44  * \sa ImageAdaptor
45  * \sa PixelAccessor
46  * \sa Image
47  *
48  * \ingroup ImageAdaptors
49  *
50  */
51
52 template <class TType>
53 class ITK_EXPORT DefaultPixelAccessor  
54 {
55 public:
56
57 IND */** External typedef. It defines the external aspect
58    * that this class will exhibit. */
59 SEM   typedef TType ExternalType ;
60
61   /** Internal typedef. It defines the internal real
62    * representation of data. */
63 SEM   typedef TType InternalType ;
64
65   /** Set the pixel. */
66   inline void Set(TType & output, const TType & input) const
67     {output = input;}
68
69   /** Get the pixel. */
70   inline TType & Get( TType & input ) const
71     {return input;}
72
73   /** Get a const reference to the pixel. */
74   inline const TType & Get( const TType & input ) const
75     {return input;}
76   
77 };
78
79   
80 // end namespace itk
81   
82
83 #endif
84
85 EOF

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