SimpleITK  2.0.0rc2.post21
sitkDetail.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 * http://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 sitkDetail_h
19 #define sitkDetail_h
20 
22 #include "Ancillary/FunctionTraits.h"
23 
24 namespace itk {
25 namespace simple {
26 
27 // this namespace is internal classes not part of the external simple ITK interface
28 namespace detail {
29 
30 
31 template < class TMemberFunctionPointer >
33 {
34  using ObjectType = typename ::detail::FunctionTraits<TMemberFunctionPointer>::ClassType;
35 
36  template< typename TImageType >
37  TMemberFunctionPointer operator() ( ) const
38  {
39  return &ObjectType::template ExecuteInternal< TImageType >;
40  }
41 };
42 
43 template < class TMemberFunctionPointer >
45 {
46  using ObjectType = typename ::detail::FunctionTraits<TMemberFunctionPointer>::ClassType;
47 
48  template< typename TImageType1, typename TImageType2 >
49  TMemberFunctionPointer operator() ( ) const
50  {
51  return &ObjectType::template DualExecuteInternal< TImageType1, TImageType2 >;
52  }
53 };
54 
58 template < class TMemberFunctionPointer >
60 {
61  using ObjectType = typename ::detail::FunctionTraits<TMemberFunctionPointer>::ClassType;
62 
63  template< typename TImageType >
64  TMemberFunctionPointer operator() ( ) const
65  {
66  return &ObjectType::template ExecuteInternalVectorImage< TImageType >;
67  }
68 };
69 
70 
74 template < class TMemberFunctionPointer >
76 {
77  using ObjectType = typename ::detail::FunctionTraits<TMemberFunctionPointer>::ClassType;
78 
79  template< typename TImageType1, typename TImageType2 >
80  TMemberFunctionPointer operator() ( ) const
81  {
82  return &ObjectType::template DualExecuteInternalVector< TImageType1, TImageType2 >;
83  }
84 };
85 
89 template < class TMemberFunctionPointer >
91 {
92  using ObjectType = typename ::detail::FunctionTraits<TMemberFunctionPointer>::ClassType;
93 
94  template< typename TImageType >
95  TMemberFunctionPointer operator() ( ) const
96  {
97  return &ObjectType::template ExecuteInternalLabelImage< TImageType >;
98  }
99 };
100 
101 
102 }
103 }
104 }
105 #endif
itk::simple::detail::ExecuteInternalVectorImageAddressor
Definition: sitkDetail.h:59
itk::simple::detail::MemberFunctionAddressor
Definition: sitkDetail.h:32
itk::simple::detail::ExecuteInternalVectorImageAddressor::operator()
TMemberFunctionPointer operator()() const
Definition: sitkDetail.h:64
itk::simple::detail::ExecuteInternalLabelImageAddressor::ObjectType
typename ::detail::FunctionTraits< TMemberFunctionPointer >::ClassType ObjectType
Definition: sitkDetail.h:92
itk::simple::detail::DualExecuteInternalVectorAddressor::ObjectType
typename ::detail::FunctionTraits< TMemberFunctionPointer >::ClassType ObjectType
Definition: sitkDetail.h:77
itk::simple::detail::MemberFunctionAddressor::ObjectType
typename ::detail::FunctionTraits< TMemberFunctionPointer >::ClassType ObjectType
Definition: sitkDetail.h:34
itk::simple::detail::DualExecuteInternalVectorAddressor
Definition: sitkDetail.h:75
sitkMemberFunctionFactoryBase.h
itk::simple::detail::ExecuteInternalLabelImageAddressor
Definition: sitkDetail.h:90
itk::simple::detail::DualExecuteInternalAddressor::ObjectType
typename ::detail::FunctionTraits< TMemberFunctionPointer >::ClassType ObjectType
Definition: sitkDetail.h:46
itk::simple::detail::DualExecuteInternalAddressor
Definition: sitkDetail.h:44
itk
itk::simple::detail::DualExecuteInternalAddressor::operator()
TMemberFunctionPointer operator()() const
Definition: sitkDetail.h:49
itk::simple::detail::DualExecuteInternalVectorAddressor::operator()
TMemberFunctionPointer operator()() const
Definition: sitkDetail.h:80
itk::simple::detail::ExecuteInternalVectorImageAddressor::ObjectType
typename ::detail::FunctionTraits< TMemberFunctionPointer >::ClassType ObjectType
Definition: sitkDetail.h:61
itk::simple::detail::ExecuteInternalLabelImageAddressor::operator()
TMemberFunctionPointer operator()() const
Definition: sitkDetail.h:95
itk::simple::detail::MemberFunctionAddressor::operator()
TMemberFunctionPointer operator()() const
Definition: sitkDetail.h:37