ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkTensorRelativeAnisotropyImageFilter.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 itkTensorRelativeAnisotropyImageFilter_h
19 #define itkTensorRelativeAnisotropyImageFilter_h
20 
22 #include "itkImage.h"
23 
24 namespace itk
25 {
26 // This functor class invokes the computation of relative anisotropy from
27 // every pixel.
28 namespace Functor
29 {
30 template< typename TInput >
32 {
33 public:
34  using RealValueType = typename TInput::RealValueType;
38  {
39  return false;
40  }
41 
42  bool operator==(const TensorRelativeAnisotropyFunction & other) const
43  {
44  return !( *this != other );
45  }
46 
47  inline RealValueType operator()(const TInput & x) const
48  {
49  return x.GetRelativeAnisotropy();
50  }
51 };
52 } // end namespace Functor
53 
69 template< typename TInputImage, typename TOutputImage = Image<
73  public
74  UnaryFunctorImageFilter< TInputImage, TOutputImage,
75  Functor::TensorRelativeAnisotropyFunction<
76  typename TInputImage::PixelType > >
77 {
78 public:
79  ITK_DISALLOW_COPY_AND_ASSIGN(TensorRelativeAnisotropyImageFilter);
80 
84  TInputImage, TOutputImage,
86  typename TInputImage::PixelType > >;
87 
90 
92  using OutputPixelType = typename TOutputImage::PixelType;
93  using InputPixelType = typename TInputImage::PixelType;
94  using InputValueType = typename InputPixelType::ValueType;
95 
98 
100  itkNewMacro(Self);
101 
103  void PrintSelf(std::ostream & os, Indent indent) const override
104  { this->Superclass::PrintSelf(os, indent); }
105 
106 #ifdef ITK_USE_CONCEPT_CHECKING
107  // Begin concept checking
108  itkConceptMacro( InputHasNumericTraitsCheck,
110  // End concept checking
111 #endif
112 
113 protected:
115  ~TensorRelativeAnisotropyImageFilter() override = default;
116 };
117 } // end namespace itk
118 
119 #endif
void PrintSelf(std::ostream &os, Indent indent) const override
Computes the Relative Anisotropy for every pixel of a input tensor image.
Define numeric traits for std::vector.
bool operator==(const TensorRelativeAnisotropyFunction &other) const
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Base class for all process objects that output image data.
~TensorRelativeAnisotropyImageFilter() override=default
bool operator!=(const TensorRelativeAnisotropyFunction &) const
TOutputImage OutputImageType
void PrintSelf(std::ostream &os, Indent indent) const override
Implements pixel-wise generic operation on one image.
Control indentation during Print() invocation.
Definition: itkIndent.h:49
#define itkConceptMacro(name, concept)