ITK
4.2.0
Insight Segmentation and Registration Toolkit
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
ITK
Modules
Compatibility
Deprecated
include
itkCompose2DCovariantVectorImageFilter.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 __itkCompose2DCovariantVectorImageFilter_h
19
#define __itkCompose2DCovariantVectorImageFilter_h
20
21
#include "
itkBinaryFunctorImageFilter.h
"
22
#include "
itkCovariantVector.h
"
23
24
namespace
itk
25
{
26
namespace
Functor
27
{
28
template
<
class
TInput >
29
class
Compose2DCovariantVector
30
{
31
public
:
32
typedef
CovariantVector< TInput, 2 >
OutputType
;
33
Compose2DCovariantVector
() {}
34
~Compose2DCovariantVector
() {}
35
bool
operator!=
(
const
Compose2DCovariantVector
&)
const
36
{
37
return
false
;
38
}
39
40
bool
operator==
(
const
Compose2DCovariantVector
& other)
const
41
{
42
return
!( *
this
!= other );
43
}
44
45
inline
OutputType
operator()
(
const
TInput & s1,
46
const
TInput & s2)
const
47
{
48
OutputType
v;
49
50
v[0] = s1;
51
v[1] = s2;
52
return
v;
53
}
54
};
55
}
56
69
template
<
typename
TInputImage,
70
typename
TOutputImage =
71
Image< CovariantVector< typename TInputImage::PixelType, 2 >,
72
::itk::GetImageDimension< TInputImage >::ImageDimension
> >
73
class
ITK_EXPORT
Compose2DCovariantVectorImageFilter
:
74
public
75
BinaryFunctorImageFilter
< TInputImage, TInputImage,
76
TOutputImage,
77
Functor::Compose2DCovariantVector< typename TInputImage::PixelType > >
78
{
79
public
:
81
typedef
Compose2DCovariantVectorImageFilter
Self
;
82
typedef
BinaryFunctorImageFilter
<
83
TInputImage, TInputImage,
84
TOutputImage,
85
Functor::Compose2DCovariantVector< typename TInputImage::PixelType >
>
Superclass
;
86
87
typedef
SmartPointer< Self >
Pointer
;
88
typedef
SmartPointer< const Self >
ConstPointer
;
89
90
typedef
typename
Superclass::OutputImageType
OutputImageType
;
91
93
itkNewMacro(
Self
);
94
96
itkTypeMacro(
Compose2DCovariantVectorImageFilter
,
97
BinaryFunctorImageFilter
);
98
99
#ifdef ITK_USE_CONCEPT_CHECKING
100
101
itkConceptMacro
( InputHasNumericTraitsCheck,
102
(
Concept::HasNumericTraits< typename TInputImage::PixelType >
) );
103
105
#endif
106
protected
:
107
Compose2DCovariantVectorImageFilter
() {}
108
virtual
~Compose2DCovariantVectorImageFilter
() {}
109
private
:
110
Compose2DCovariantVectorImageFilter
(
const
Self &);
//purposely not implemented
111
void
operator=(
const
Self &);
//purposely not implemented
112
};
113
}
// end namespace itk
115
116
#endif
117
Generated on Tue Jul 10 2012 23:21:47 for ITK by
1.8.1