ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkNeighborhoodOperatorImageFilter.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 itkNeighborhoodOperatorImageFilter_h
19#define itkNeighborhoodOperatorImageFilter_h
20
23#include "itkImage.h"
25
26namespace itk
27{
50template <typename TInputImage, typename TOutputImage, typename TOperatorValueType = typename TOutputImage::PixelType>
51class ITK_TEMPLATE_EXPORT NeighborhoodOperatorImageFilter : public ImageToImageFilter<TInputImage, TOutputImage>
52{
53public:
54 ITK_DISALLOW_COPY_AND_MOVE(NeighborhoodOperatorImageFilter);
55
61
63 itkNewMacro(Self);
64
66 itkOverrideGetNameOfClassMacro(NeighborhoodOperatorImageFilter);
67
70 using OutputPixelType = typename TOutputImage::PixelType;
71 using OutputInternalPixelType = typename TOutputImage::InternalPixelType;
72 using InputPixelType = typename TInputImage::PixelType;
73 using InputInternalPixelType = typename TInputImage::InternalPixelType;
74 using OperatorValueType = TOperatorValueType;
75
78
81 static constexpr unsigned int ImageDimension = TOutputImage::ImageDimension;
82 static constexpr unsigned int InputImageDimension = TInputImage::ImageDimension;
83
85 using InputImageType = TInputImage;
86 using OutputImageType = TOutputImage;
87 using InputImagePointer = typename InputImageType::Pointer;
88
91
94
97
100
104 void
106 {
107 m_Operator = p;
108 this->Modified();
109 }
110
111
113 const OutputNeighborhoodType &
115 {
116 return m_Operator;
117 }
118
124 void
129
131 ImageBoundaryConditionPointerType
133 {
134 return m_BoundsCondition;
135 }
136
144 void
146
150 itkConceptMacro(OperatorMultiplyOperatorCheck, (Concept::MultiplyOperator<OperatorValueType>));
151 itkConceptMacro(OperatorAdditiveOperatorsCheck, (Concept::AdditiveOperators<OperatorValueType>));
152
153protected:
161
173 void
174 DynamicThreadedGenerateData(const OutputImageRegionType & outputRegionForThread) override;
175
176
177 void
178 PrintSelf(std::ostream & os, Indent indent) const override
179 {
180 Superclass::PrintSelf(os, indent);
181 }
182
183private:
186
190
193};
194} // end namespace itk
195
196#ifndef ITK_MANUAL_INSTANTIATION
197# include "itkNeighborhoodOperatorImageFilter.hxx"
198#endif
199
200#endif
A virtual base object that defines an interface to a class of boundary condition objects for use by n...
virtual void DynamicMultiThreadingOn()
typename OutputImageType::RegionType OutputImageRegionType
void PrintSelf(std::ostream &os, Indent indent) const override
Control indentation during Print() invocation.
Definition itkIndent.h:50
ImageBoundaryConditionPointerType GetBoundaryCondition()
void PrintSelf(std::ostream &os, Indent indent) const override
~NeighborhoodOperatorImageFilter() override=default
void GenerateInputRequestedRegion() override
void OverrideBoundaryCondition(const ImageBoundaryConditionPointerType i)
void DynamicThreadedGenerateData(const OutputImageRegionType &outputRegionForThread) override
void SetOperator(const OutputNeighborhoodType &p)
const OutputNeighborhoodType & GetOperator() const
A light-weight container object for storing an N-dimensional neighborhood of values.
virtual void Modified() const
virtual void ThreaderUpdateProgressOff()
Implements transparent reference counting.
A function object that determines a neighborhood of values at an image boundary according to a Neuman...
#define itkConceptMacro(name, concept)
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....