SimpleITK  
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 
25 {
26 
27 
28 template <class TMemberFunctionPointer>
30 {
31  using ObjectType = typename ::detail::FunctionTraits<TMemberFunctionPointer>::ClassType;
32 
33  template <typename TImageType>
34  TMemberFunctionPointer
35  operator()() const
36  {
37  return &ObjectType::template ExecuteInternal<TImageType>;
38  }
39 };
40 
41 template <class TMemberFunctionPointer>
43 {
44  using ObjectType = typename ::detail::FunctionTraits<TMemberFunctionPointer>::ClassType;
45 
46  template <typename TImageType1, typename TImageType2>
47  TMemberFunctionPointer
48  operator()() const
49  {
50  return &ObjectType::template DualExecuteInternal<TImageType1, TImageType2>;
51  }
52 
53 
54  template <typename TImageType>
55  TMemberFunctionPointer
56  operator()() const
57  {
58  return &ObjectType::template DualExecuteInternal<TImageType, TImageType>;
59  }
60 };
61 
65 template <class TMemberFunctionPointer>
67 {
68  using ObjectType = typename ::detail::FunctionTraits<TMemberFunctionPointer>::ClassType;
69 
70  template <typename TImageType>
71  TMemberFunctionPointer
72  operator()() const
73  {
74  return &ObjectType::template ExecuteInternalVectorImage<TImageType>;
75  }
76 };
77 
78 
82 template <class TMemberFunctionPointer>
84 {
85  using ObjectType = typename ::detail::FunctionTraits<TMemberFunctionPointer>::ClassType;
86 
87  template <typename TImageType1, typename TImageType2>
88  TMemberFunctionPointer
89  operator()() const
90  {
91  return &ObjectType::template DualExecuteInternalVector<TImageType1, TImageType2>;
92  }
93 };
94 
98 template <class TMemberFunctionPointer>
100 {
101  using ObjectType = typename ::detail::FunctionTraits<TMemberFunctionPointer>::ClassType;
102 
103  template <typename TImageType>
104  TMemberFunctionPointer
105  operator()() const
106  {
107  return &ObjectType::template ExecuteInternalLabelImage<TImageType>;
108  }
109 };
110 
111 
112 } // namespace itk::simple::detail
113 #endif
itk::simple::detail::ExecuteInternalVectorImageAddressor
Definition: sitkDetail.h:66
itk::simple::detail::MemberFunctionAddressor
Definition: sitkDetail.h:29
itk::simple::detail::ExecuteInternalVectorImageAddressor::operator()
TMemberFunctionPointer operator()() const
Definition: sitkDetail.h:72
itk::simple::detail::DualExecuteInternalAddressor::operator()
TMemberFunctionPointer operator()() const
Definition: sitkDetail.h:56
itk::simple::detail::ExecuteInternalLabelImageAddressor::ObjectType
typename ::detail::FunctionTraits< TMemberFunctionPointer >::ClassType ObjectType
Definition: sitkDetail.h:101
itk::simple::detail::DualExecuteInternalVectorAddressor::ObjectType
typename ::detail::FunctionTraits< TMemberFunctionPointer >::ClassType ObjectType
Definition: sitkDetail.h:85
itk::simple::detail
Definition: sitkDetail.h:24
itk::simple::detail::MemberFunctionAddressor::ObjectType
typename ::detail::FunctionTraits< TMemberFunctionPointer >::ClassType ObjectType
Definition: sitkDetail.h:31
itk::simple::detail::DualExecuteInternalVectorAddressor
Definition: sitkDetail.h:83
sitkMemberFunctionFactoryBase.h
itk::simple::detail::ExecuteInternalLabelImageAddressor
Definition: sitkDetail.h:99
itk::simple::detail::DualExecuteInternalAddressor::ObjectType
typename ::detail::FunctionTraits< TMemberFunctionPointer >::ClassType ObjectType
Definition: sitkDetail.h:44
itk::simple::detail::DualExecuteInternalAddressor
Definition: sitkDetail.h:42
itk::simple::detail::DualExecuteInternalAddressor::operator()
TMemberFunctionPointer operator()() const
Definition: sitkDetail.h:48
itk::simple::detail::DualExecuteInternalVectorAddressor::operator()
TMemberFunctionPointer operator()() const
Definition: sitkDetail.h:89
itk::simple::detail::ExecuteInternalVectorImageAddressor::ObjectType
typename ::detail::FunctionTraits< TMemberFunctionPointer >::ClassType ObjectType
Definition: sitkDetail.h:68
itk::simple::detail::ExecuteInternalLabelImageAddressor::operator()
TMemberFunctionPointer operator()() const
Definition: sitkDetail.h:105
itk::simple::detail::MemberFunctionAddressor::operator()
TMemberFunctionPointer operator()() const
Definition: sitkDetail.h:35