ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkDerivativeImageFilter.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 itkDerivativeImageFilter_h
19#define itkDerivativeImageFilter_h
20
22
23namespace itk
24{
49template <typename TInputImage, typename TOutputImage>
50class ITK_TEMPLATE_EXPORT DerivativeImageFilter : public ImageToImageFilter<TInputImage, TOutputImage>
51{
52public:
53 ITK_DISALLOW_COPY_AND_MOVE(DerivativeImageFilter);
54
60
63 using OutputPixelType = typename TOutputImage::PixelType;
64 using OutputInternalPixelType = typename TOutputImage::InternalPixelType;
65 using InputPixelType = typename TInputImage::PixelType;
66 using InputInternalPixelType = typename TInputImage::InternalPixelType;
67
70 static constexpr unsigned int ImageDimension = TOutputImage::ImageDimension;
71
73 using InputImageType = TInputImage;
74 using OutputImageType = TOutputImage;
75
77 itkNewMacro(Self);
78
80 itkOverrideGetNameOfClassMacro(DerivativeImageFilter);
81
83 itkConceptMacro(SignedOutputPixelType, (Concept::Signed<OutputPixelType>));
84
86 itkSetMacro(Order, unsigned int);
87 itkGetConstMacro(Order, unsigned int);
88 itkSetMacro(Direction, unsigned int);
89 itkGetConstMacro(Direction, unsigned int);
91
96 itkSetMacro(UseImageSpacing, bool);
97 itkGetConstMacro(UseImageSpacing, bool);
98 itkBooleanMacro(UseImageSpacing);
100
101#if !defined(ITK_FUTURE_LEGACY_REMOVE)
104 void
105 SetUseImageSpacingOn()
106 {
107 this->SetUseImageSpacing(true);
108 }
109
112 void
113 SetUseImageSpacingOff()
114 {
115 this->SetUseImageSpacing(false);
116 }
117#endif
118
126 void
128
129protected:
131 {
132 m_Order = 1;
133 m_Direction = 0;
134 m_UseImageSpacing = true;
135 }
136
137 ~DerivativeImageFilter() override = default;
138 void
139 PrintSelf(std::ostream & os, Indent indent) const override;
140
146 void
147 GenerateData() override;
148
149private:
151 unsigned int m_Order{};
152
154 unsigned int m_Direction{};
155
157};
158} // end namespace itk
159
160#ifndef ITK_MANUAL_INSTANTIATION
161# include "itkDerivativeImageFilter.hxx"
162#endif
163
164#endif
virtual void SetUseImageSpacing(bool _arg)
typename TInputImage::InternalPixelType InputInternalPixelType
SmartPointer< const Self > ConstPointer
typename TOutputImage::InternalPixelType OutputInternalPixelType
void GenerateData() override
typename TInputImage::PixelType InputPixelType
void PrintSelf(std::ostream &os, Indent indent) const override
void GenerateInputRequestedRegion() override
static constexpr unsigned int ImageDimension
typename TOutputImage::PixelType OutputPixelType
~DerivativeImageFilter() override=default
ImageToImageFilter< TInputImage, TOutputImage > Superclass
Control indentation during Print() invocation.
Definition itkIndent.h:50
Implements transparent reference counting.
#define itkConceptMacro(name, concept)
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....