ITK  5.2.0
Insight Toolkit
itkTensorRelativeAnisotropyImageFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright NumFOCUS
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;
37  bool
39  {
40  return false;
41  }
42 
43  bool
45  {
46  return !(*this != other);
47  }
48 
49  inline RealValueType
50  operator()(const TInput & x) const
51  {
52  return x.GetRelativeAnisotropy();
53  }
54 };
55 } // end namespace Functor
56 
72 template <typename TInputImage,
73  typename TOutputImage =
74  Image<typename NumericTraits<typename TInputImage::PixelType::ValueType>::RealType, TInputImage::Dimension>>
76  : public UnaryFunctorImageFilter<TInputImage,
77  TOutputImage,
78  Functor::TensorRelativeAnisotropyFunction<typename TInputImage::PixelType>>
79 {
80 public:
81  ITK_DISALLOW_COPY_AND_MOVE(TensorRelativeAnisotropyImageFilter);
82 
85  using Superclass =
86  UnaryFunctorImageFilter<TInputImage,
87  TOutputImage,
89 
92 
94  using OutputPixelType = typename TOutputImage::PixelType;
95  using InputPixelType = typename TInputImage::PixelType;
96  using InputValueType = typename InputPixelType::ValueType;
97 
100 
102  itkNewMacro(Self);
103 
105  void
106  PrintSelf(std::ostream & os, Indent indent) const override
107  {
108  this->Superclass::PrintSelf(os, indent);
109  }
110 
111 #ifdef ITK_USE_CONCEPT_CHECKING
112  // Begin concept checking
113  itkConceptMacro(InputHasNumericTraitsCheck, (Concept::HasNumericTraits<InputValueType>));
114  // End concept checking
115 #endif
116 
117 protected:
119  ~TensorRelativeAnisotropyImageFilter() override = default;
120 };
121 } // end namespace itk
122 
123 #endif
itkUnaryFunctorImageFilter.h
itk::Concept::HasNumericTraits
Definition: itkConceptChecking.h:714
itk::Functor::TensorRelativeAnisotropyFunction::operator!=
bool operator!=(const TensorRelativeAnisotropyFunction &) const
Definition: itkTensorRelativeAnisotropyImageFilter.h:38
itk::UnaryFunctorImageFilter
Implements pixel-wise generic operation on one image.
Definition: itkUnaryFunctorImageFilter.h:50
itk::TensorRelativeAnisotropyImageFilter::InputPixelType
typename TInputImage::PixelType InputPixelType
Definition: itkTensorRelativeAnisotropyImageFilter.h:95
itkImage.h
itk::TensorRelativeAnisotropyImageFilter::~TensorRelativeAnisotropyImageFilter
~TensorRelativeAnisotropyImageFilter() override=default
itk::Functor::TensorRelativeAnisotropyFunction::operator==
bool operator==(const TensorRelativeAnisotropyFunction &other) const
Definition: itkTensorRelativeAnisotropyImageFilter.h:44
itk::SmartPointer< Self >
itk::Functor::TensorRelativeAnisotropyFunction::TensorRelativeAnisotropyFunction
TensorRelativeAnisotropyFunction()=default
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::TensorRelativeAnisotropyImageFilter
Computes the Relative Anisotropy for every pixel of a input tensor image.
Definition: itkTensorRelativeAnisotropyImageFilter.h:75
itk::ImageSource
Base class for all process objects that output image data.
Definition: itkImageSource.h:67
itk::UnaryFunctorImageFilter::OutputImageType
TOutputImage OutputImageType
Definition: itkUnaryFunctorImageFilter.h:75
itk::InPlaceImageFilter::PrintSelf
void PrintSelf(std::ostream &os, Indent indent) const override
itk::Functor::TensorRelativeAnisotropyFunction
Definition: itkTensorRelativeAnisotropyImageFilter.h:31
itk::TensorRelativeAnisotropyImageFilter::InputValueType
typename InputPixelType::ValueType InputValueType
Definition: itkTensorRelativeAnisotropyImageFilter.h:96
itk::TensorRelativeAnisotropyImageFilter::OutputPixelType
typename TOutputImage::PixelType OutputPixelType
Definition: itkTensorRelativeAnisotropyImageFilter.h:94
itk::Functor::TensorRelativeAnisotropyFunction< TInputImage::PixelType >::RealValueType
typename TInputImage::PixelType ::RealValueType RealValueType
Definition: itkTensorRelativeAnisotropyImageFilter.h:34
itk::Functor::TensorRelativeAnisotropyFunction::operator()
RealValueType operator()(const TInput &x) const
Definition: itkTensorRelativeAnisotropyImageFilter.h:50
itk::TensorRelativeAnisotropyImageFilter::TensorRelativeAnisotropyImageFilter
TensorRelativeAnisotropyImageFilter()=default
itkConceptMacro
#define itkConceptMacro(name, concept)
Definition: itkConceptChecking.h:65
itk::Functor::TensorRelativeAnisotropyFunction::~TensorRelativeAnisotropyFunction
~TensorRelativeAnisotropyFunction()=default
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::ProcessObject
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Definition: itkProcessObject.h:138
itk::TensorRelativeAnisotropyImageFilter::PrintSelf
void PrintSelf(std::ostream &os, Indent indent) const override
Definition: itkTensorRelativeAnisotropyImageFilter.h:106
itk::GTest::TypedefsAndConstructors::Dimension2::Dimension
constexpr unsigned int Dimension
Definition: itkGTestTypedefsAndConstructors.h:44
itk::ImageSource::OutputImageType
TOutputImage OutputImageType
Definition: itkImageSource.h:90