ITK  6.0.0
Insight Toolkit
itkPixelAccessor.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright NumFOCUS
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * https://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 #ifndef itkPixelAccessor_h
19 #define itkPixelAccessor_h
20 
21 #include "itkMacro.h"
22 namespace itk
23 {
54 template <typename TInternalType, typename TExternalType>
56 {
57 public:
58 
61  using ExternalType = TExternalType;
62 
65  using InternalType = TInternalType;
66 
67  inline void
68  Set(TInternalType & output, const TExternalType & input) const
69  {
70  output = (TInternalType)input;
71  }
72 
73  inline TExternalType
74  Get(const TInternalType & input) const
75  {
76  return (TExternalType)input;
77  }
78 };
79 } // end namespace itk
80 
81 #endif
itk::PixelAccessor::Set
void Set(TInternalType &output, const TExternalType &input) const
Definition: itkPixelAccessor.h:68
itk::PixelAccessor::InternalType
TInternalType InternalType
Definition: itkPixelAccessor.h:65
itkMacro.h
itk::PixelAccessor::Get
TExternalType Get(const TInternalType &input) const
Definition: itkPixelAccessor.h:74
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnatomicalOrientation.h:29
itk::PixelAccessor
Give access to partial aspects of a type.
Definition: itkPixelAccessor.h:55
itk::PixelAccessor::ExternalType
TExternalType ExternalType
Definition: itkPixelAccessor.h:61