SimpleITK  1.0.1
sitkDetail.h
Go to the documentation of this file.
1 /*=========================================================================
2 *
3 * Copyright Insight Software Consortium
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  typedef typename ::detail::FunctionTraits<TMemberFunctionPointer>::ClassType ObjectType;
35 
36  template< typename TImageType >
37  TMemberFunctionPointer operator() ( void ) const
38  {
39  return &ObjectType::template ExecuteInternal< TImageType >;
40  }
41 };
42 
43 template < class TMemberFunctionPointer >
45 {
46  typedef typename ::detail::FunctionTraits<TMemberFunctionPointer>::ClassType ObjectType;
47 
48  template< typename TImageType1, typename TImageType2 >
49  TMemberFunctionPointer operator() ( void ) const
50  {
51  return &ObjectType::template DualExecuteInternal< TImageType1, TImageType2 >;
52  }
53 };
54 
58 template < class TMemberFunctionPointer >
60 {
61  typedef typename ::detail::FunctionTraits<TMemberFunctionPointer>::ClassType ObjectType;
62 
63  template< typename TImageType >
64  TMemberFunctionPointer operator() ( void ) const
65  {
66  return &ObjectType::template ExecuteInternalVectorImage< TImageType >;
67  }
68 };
69 
70 
74 template < class TMemberFunctionPointer >
76 {
77  typedef typename ::detail::FunctionTraits<TMemberFunctionPointer>::ClassType ObjectType;
78 
79  template< typename TImageType1, typename TImageType2 >
80  TMemberFunctionPointer operator() ( void ) const
81  {
82  return &ObjectType::template DualExecuteInternalVector< TImageType1, TImageType2 >;
83  }
84 };
85 
89 template < class TMemberFunctionPointer >
91 {
92  typedef typename ::detail::FunctionTraits<TMemberFunctionPointer>::ClassType ObjectType;
93 
94  template< typename TImageType >
95  TMemberFunctionPointer operator() ( void ) const
96  {
97  return &ObjectType::template ExecuteInternalLabelImage< TImageType >;
98  }
99 };
100 
101 
102 }
103 }
104 }
105 #endif
::detail::FunctionTraits< TMemberFunctionPointer >::ClassType ObjectType
Definition: sitkDetail.h:46
TMemberFunctionPointer operator()(void) const
Definition: sitkDetail.h:80
TMemberFunctionPointer operator()(void) const
Definition: sitkDetail.h:49
::detail::FunctionTraits< TMemberFunctionPointer >::ClassType ObjectType
Definition: sitkDetail.h:77
::detail::FunctionTraits< TMemberFunctionPointer >::ClassType ObjectType
Definition: sitkDetail.h:34
TMemberFunctionPointer operator()(void) const
Definition: sitkDetail.h:37
::detail::FunctionTraits< TMemberFunctionPointer >::ClassType ObjectType
Definition: sitkDetail.h:61
TMemberFunctionPointer operator()(void) const
Definition: sitkDetail.h:64
TMemberFunctionPointer operator()(void) const
Definition: sitkDetail.h:95
::detail::FunctionTraits< TMemberFunctionPointer >::ClassType ObjectType
Definition: sitkDetail.h:92