ITK  4.2.0
Insight Segmentation and Registration Toolkit
itkCompose3DCovariantVectorImageFilter.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 __itkCompose3DCovariantVectorImageFilter_h
19 #define __itkCompose3DCovariantVectorImageFilter_h
20 
22 #include "itkCovariantVector.h"
23 
24 namespace itk
25 {
26 namespace Functor
27 {
28 template< class TInput >
30 {
31 public:
36  {
37  return false;
38  }
39 
40  bool operator==(const Compose3DCovariantVector & other) const
41  {
42  return !( *this != other );
43  }
44 
45  inline OutputType operator()(const TInput & s1,
46  const TInput & s2,
47  const TInput & s3) const
48  {
49  OutputType v;
50 
51  v[0] = s1;
52  v[1] = s2;
53  v[2] = s3;
54  return v;
55  }
56 };
57 }
58 
76 template< typename TInputImage,
77  typename TOutputImage =
78  Image< CovariantVector< typename TInputImage::PixelType, 3 >,
81  public
82  TernaryFunctorImageFilter< TInputImage, TInputImage,
83  TInputImage, TOutputImage,
84  Functor::Compose3DCovariantVector< typename TInputImage::PixelType > >
85 {
86 public:
90  TInputImage, TInputImage, TInputImage,
91  TOutputImage,
93  typename TInputImage::PixelType > > Superclass;
94 
97 
98  typedef typename Superclass::OutputImageType OutputImageType;
99 
101  itkNewMacro(Self);
102 
106 
107 #ifdef ITK_USE_CONCEPT_CHECKING
108 
109  itkConceptMacro( InputHasNumericTraitsCheck,
111 
113 #endif
114 protected:
117 private:
118  Compose3DCovariantVectorImageFilter(const Self &); //purposely not implemented
119  void operator=(const Self &); //purposely not implemented
120 };
121 } // end namespace itk
123 
124 #endif
125