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 = 0;
96 return out;
97 }
101 TOutput
102 EvaluateAtIndex(const IndexType & index) const override;
103
106 TOutput
108 {
109 std::cout << "NeighborhoodOperatorImageFunction::EvaluateAtContinuousIndex():Not implemented!" << std::endl;
110 TOutput out = 0;
111 return out;
112 }
115protected:
118
120
121 void
123 {}
124 void
125 PrintSelf(std::ostream & os, Indent indent) const override;
126
127private:
128 mutable NeighborhoodType m_Operator{};
129};
130} // end namespace itk
131
132#ifndef ITK_MANUAL_INSTANTIATION
133# include "itkNeighborhoodOperatorImageFunction.hxx"
134#endif
135
136/*
137#ifndef ITK_MANUAL_INSTANTIATION
138#include "itkNeighborhoodOperatorImageFunction.hxx"
139#endif
140*/
141
142#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....