ITK  4.6.0
Insight Segmentation and Registration Toolkit
itkTensorFractionalAnisotropyImageFilter.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 __itkTensorFractionalAnisotropyImageFilter_h
19 #define __itkTensorFractionalAnisotropyImageFilter_h
20 
22 #include "itkImage.h"
23 
24 namespace itk
25 {
26 // This functor class invokes the computation of fractional anisotropy from
27 // every pixel.
28 namespace Functor
29 {
30 template< typename TInput >
32 {
33 public:
34  typedef typename TInput::RealValueType RealValueType;
38  {
39  return false;
40  }
41 
43  {
44  return !( *this != other );
45  }
46 
47  inline RealValueType operator()(const TInput & x) const
48  {
49  return x.GetFractionalAnisotropy();
50  }
51 };
52 } // end namespace functor
53 
69 template< typename TInputImage,
70  typename TOutputImage = Image<
72  TInputImage::Dimension > >
74  public
75  UnaryFunctorImageFilter< TInputImage, TOutputImage,
76  Functor::TensorFractionalAnisotropyFunction<
77  typename TInputImage::PixelType > >
78 {
79 public:
83  TInputImage, TOutputImage,
85  typename TInputImage::PixelType > > Superclass;
86 
89 
91  typedef typename TOutputImage::PixelType OutputPixelType;
92  typedef typename TInputImage::PixelType InputPixelType;
93  typedef typename InputPixelType::ValueType InputValueType;
94 
97 
99  itkNewMacro(Self);
100 
102  void PrintSelf(std::ostream & os, Indent indent) const
103  { this->Superclass::PrintSelf(os, indent); }
104 
105 #ifdef ITK_USE_CONCEPT_CHECKING
106  // Begin concept checking
107  itkConceptMacro( InputHasNumericTraitsCheck,
109  // End concept checking
110 #endif
111 
112 protected:
115 
116 private:
117  TensorFractionalAnisotropyImageFilter(const Self &); //purposely not
118  // implemented
119  void operator=(const Self &); //purposely not
120 
121  // implemented
122 };
123 } // end namespace itk
124 
125 #endif
UnaryFunctorImageFilter< TInputImage, TOutputImage, Functor::TensorFractionalAnisotropyFunction< typename TInputImage::PixelType > > Superclass
virtual void PrintSelf(std::ostream &os, Indent indent) const
bool operator!=(const TensorFractionalAnisotropyFunction &) const
Base class for all process objects that output image data.
Implements pixel-wise generic operation on one image.
Control indentation during Print() invocation.
Definition: itkIndent.h:49
bool operator==(const TensorFractionalAnisotropyFunction &other) const
Computes the Fractional Anisotropy for every pixel of a input tensor image.
void PrintSelf(std::ostream &os, Indent indent) const
#define itkConceptMacro(name, concept)