KWStyle - itkBluePixelAccessor.h
 
Matrix View
Description

1 /*=========================================================================
2
3   Program:   Insight Segmentation & Registration Toolkit
4   Module:    $RCSfile: itkBluePixelAccessor.h.html,v $
5   Language:  C++
6   Date:      $Date: 2006/01/17 19:15:33 $
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 __itkBluePixelAccessor_h
18 #define __itkBluePixelAccessor_h
19
20
21 #include "itkRGBPixel.h"
22
23
24 namespace itk
25 {
26
27 /**
28  * \class BluePixelAccessor
29  * \brief Give access to the Blue component of a RGBPixel type 
30  *
31  * This class is intended to be used as parameter of 
32  * an ImageAdaptor to make an RGBPixel image appear as being
33  * of scalar type T, showing only the Blue component.
34  *
35  * \sa ImageAdaptor
36  * \ingroup ImageAdaptors
37  *
38  */
39
40 template <class T>
41 class ITK_EXPORT BluePixelAccessor
42 {
43 public:
44   /** Standard class typedefs. */
45   typedef   BluePixelAccessor        Self;
46
47 IND */** External typedef. It defines the external aspect
48    * that this class will exhibit */
49   typedef T ExternalType;
50
51   /** Internal typedef. It defines the internal real
52    * representation of data */
53   typedef   RGBPixel<T>    InternalType;
54
55   /** Write access to the Blue component */
56   inline void Set( InternalType & output, const ExternalType & input ) const
57     { output.SetBlue( input ); }
58
59   /** Read access to the Blue component */
60   inline const ExternalType & Get( const InternalType & input ) const
61     { return input.GetBlue(); }
62 };
63   
64 }  // end namespace itk
65
66 #endif
67
68 EOF

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