ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkHigherOrderAccurateGradientImageFilter.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 * https://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 itkHigherOrderAccurateGradientImageFilter_h
19#define itkHigherOrderAccurateGradientImageFilter_h
20
22#include "itkCovariantVector.h"
23
24namespace itk
25{
26
53template <typename TInputImage, typename TOperatorValueType = float, class TOutputValueType = float>
55 : public ImageToImageFilter<
56 TInputImage,
57 Image<CovariantVector<TOutputValueType, TInputImage::ImageDimension>, TInputImage::ImageDimension>>
58{
59public:
60 ITK_DISALLOW_COPY_AND_MOVE(HigherOrderAccurateGradientImageFilter);
61
63 static constexpr unsigned int ImageDimension = TInputImage::ImageDimension;
64
67
69 using InputImageType = TInputImage;
70 using InputImagePointer = typename InputImageType::Pointer;
74
79
81 itkNewMacro(Self);
82
84 itkOverrideGetNameOfClassMacro(HigherOrderAccurateGradientImageFilter);
85
87 using InputPixelType = typename InputImageType::PixelType;
88 using OperatorValueType = TOperatorValueType;
89 using OutputValueType = TOutputValueType;
92
95 itkSetMacro(UseImageSpacing, bool);
96 itkGetConstMacro(UseImageSpacing, bool);
97 itkBooleanMacro(UseImageSpacing);
98
100 itkConceptMacro(OutputHasNumericTraitsCheck, (Concept::HasNumericTraits<OutputValueType>));
101
112 itkSetMacro(UseImageDirection, bool);
113 itkGetConstMacro(UseImageDirection, bool);
114 itkBooleanMacro(UseImageDirection);
115
118 itkSetMacro(OrderOfAccuracy, unsigned int);
119 itkGetConstMacro(OrderOfAccuracy, unsigned int);
120
121protected:
124 void
125 PrintSelf(std::ostream & os, Indent indent) const override;
126
133 void
135
146 void
147 DynamicThreadedGenerateData(const OutputImageRegionType & outputRegionForThread) override;
148
149private:
150 bool m_UseImageSpacing{ true };
151
152 // flag to take or not the image direction into account
153 // when computing the derivatives.
155
156 unsigned int m_OrderOfAccuracy{ 2 };
157};
158
159} // end namespace itk
160
161#ifndef ITK_MANUAL_INSTANTIATION
162# include "itkHigherOrderAccurateGradientImageFilter.hxx"
163#endif
164
165#endif
A templated class holding a n-Dimensional covariant vector.
Image< CovariantVector< TOutputValueType, Self::OutputImageDimension >, Self::OutputImageDimension > OutputImageType
CovariantVector< OutputValueType, Self::OutputImageDimension > OutputPixelType
ImageToImageFilter< InputImageType, OutputImageType > Superclass
void DynamicThreadedGenerateData(const OutputImageRegionType &outputRegionForThread) override
void PrintSelf(std::ostream &os, Indent indent) const override
~HigherOrderAccurateGradientImageFilter() override=default
Templated n-dimensional image class.
Definition itkImage.h:89
Control indentation during Print() invocation.
Definition itkIndent.h:53
Implements transparent reference counting.
#define itkConceptMacro(name, conceptType)
Compile-time check that a template argument satisfies an itk::Concept.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
#define itkSetMacro(name, type)