SimpleITK  2.1.0rc1.post33
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 
55  template< typename TImageType>
56  TMemberFunctionPointer 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 operator() ( ) const
72  {
73  return &ObjectType::template ExecuteInternalVectorImage< TImageType >;
74  }
75 };
76 
77 
81 template < class TMemberFunctionPointer >
83 {
84  using ObjectType = typename ::detail::FunctionTraits<TMemberFunctionPointer>::ClassType;
85 
86  template< typename TImageType1, typename TImageType2 >
87  TMemberFunctionPointer operator() ( ) const
88  {
89  return &ObjectType::template DualExecuteInternalVector< TImageType1, TImageType2 >;
90  }
91 };
92 
96 template < class TMemberFunctionPointer >
98 {
99  using ObjectType = typename ::detail::FunctionTraits<TMemberFunctionPointer>::ClassType;
100 
101  template< typename TImageType >
102  TMemberFunctionPointer operator() ( ) const
103  {
104  return &ObjectType::template ExecuteInternalLabelImage< TImageType >;
105  }
106 };
107 
108 
109 }
110 }
111 }
112 #endif
itk::simple::detail::ExecuteInternalVectorImageAddressor
Definition: sitkDetail.h:66
itk::simple::detail::MemberFunctionAddressor
Definition: sitkDetail.h:32
itk::simple::detail::ExecuteInternalVectorImageAddressor::operator()
TMemberFunctionPointer operator()() const
Definition: sitkDetail.h:71
itk::simple::detail::ExecuteInternalLabelImageAddressor::ObjectType
typename ::detail::FunctionTraits< TMemberFunctionPointer >::ClassType ObjectType
Definition: sitkDetail.h:99
itk::simple::detail::DualExecuteInternalVectorAddressor::ObjectType
typename ::detail::FunctionTraits< TMemberFunctionPointer >::ClassType ObjectType
Definition: sitkDetail.h:84
itk::simple::detail::MemberFunctionAddressor::ObjectType
typename ::detail::FunctionTraits< TMemberFunctionPointer >::ClassType ObjectType
Definition: sitkDetail.h:34
itk::simple::detail::DualExecuteInternalVectorAddressor
Definition: sitkDetail.h:82
sitkMemberFunctionFactoryBase.h
itk::simple::detail::ExecuteInternalLabelImageAddressor
Definition: sitkDetail.h:97
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:87
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:102
itk::simple::detail::MemberFunctionAddressor::operator()
TMemberFunctionPointer operator()() const
Definition: sitkDetail.h:37