ITK  6.0.0
Insight Toolkit
itkNeighborhoodOperatorImageFunction.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 itkNeighborhoodOperatorImageFunction_h
19#define itkNeighborhoodOperatorImageFunction_h
20
21#include "itkImageFunction.h"
22#include "itkNeighborhood.h"
23
24namespace itk
25{
40template <typename TInputImage, typename TOutput>
41class ITK_TEMPLATE_EXPORT NeighborhoodOperatorImageFunction : public ImageFunction<TInputImage, TOutput>
42{
43public:
44
47
50
54
56 itkNewMacro(Self);
57
59 using InputImageType = TInputImage;
60 using InputPixelType = typename InputImageType::PixelType;
61 using typename Superclass::IndexType;
62 using typename Superclass::ContinuousIndexType;
63
65 itkOverrideGetNameOfClassMacro(NeighborhoodOperatorImageFunction);
66
68 static constexpr unsigned int ImageDimension = InputImageType::ImageDimension;
69
71
73 using typename Superclass::PointType;
74
76 // virtual void SetInputImage( InputImageType * ptr );
77
81 void
83 {
84 m_Operator = p;
85 this->Modified();
86 }
91 TOutput
92 Evaluate(const PointType &) const override
93 {
94 std::cout << "NeighborhoodOperatorImageFunction::Evaluate(): Not implemented!" << std::endl;
95 TOutput out;
96 out = 0;
97 return out;
98 }
102 TOutput
103 EvaluateAtIndex(const IndexType & index) const override;
104
107 TOutput
109 {
110 std::cout << "NeighborhoodOperatorImageFunction::EvaluateAtContinuousIndex():Not implemented!" << std::endl;
111 TOutput out;
112 out = 0;
113 return out;
114 }
117protected:
120
122
123 void
125 {}
126 void
127 PrintSelf(std::ostream & os, Indent indent) const override;
128
129private:
130 mutable NeighborhoodType m_Operator{};
131};
132} // end namespace itk
133
134#ifndef ITK_MANUAL_INSTANTIATION
135# include "itkNeighborhoodOperatorImageFunction.hxx"
136#endif
137
138/*
139#ifndef ITK_MANUAL_INSTANTIATION
140#include "itkNeighborhoodOperatorImageFunction.hxx"
141#endif
142*/
143
144#endif
A templated class holding a point in n-Dimensional image space.
Evaluates a function of an image at specified position.
TInputImage InputImageType
typename InputImageType::PixelType InputPixelType
typename InputImageType::IndexType IndexType
Control indentation during Print() invocation.
Definition: itkIndent.h:50
Light weight base class for most itk classes.
Compute the convolution of a neighborhood operator with the image at a specific location in space,...
TOutput EvaluateAtContinuousIndex(const ContinuousIndexType &) const override
~NeighborhoodOperatorImageFunction() override=default
TOutput EvaluateAtIndex(const IndexType &index) const override
TOutput Evaluate(const PointType &) const override
void PrintSelf(std::ostream &os, Indent indent) const override
A templated class holding a geometric point in n-Dimensional space.
Definition: itkPoint.h:54
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....