ITK  6.0.0
Insight Toolkit
itkFiniteDifferenceSparseImageFunction.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 itkFiniteDifferenceSparseImageFunction_h
19#define itkFiniteDifferenceSparseImageFunction_h
20
22
23namespace itk
24{
46template <typename TSparseImageType>
47class ITK_TEMPLATE_EXPORT FiniteDifferenceSparseImageFunction : public FiniteDifferenceFunction<TSparseImageType>
48{
49public:
50 ITK_DISALLOW_COPY_AND_MOVE(FiniteDifferenceSparseImageFunction);
51
57
59 itkOverrideGetNameOfClassMacro(FiniteDifferenceSparseImageFunction);
60
62 static constexpr unsigned int ImageDimension = Superclass::ImageDimension;
63
65 using typename Superclass::PixelType;
66 using typename Superclass::TimeStepType;
67 using typename Superclass::RadiusType;
68 using typename Superclass::NeighborhoodType;
69 using typename Superclass::FloatOffsetType;
71
74
76 using NodeType = typename SparseImageType::NodeType;
77
79 using NodeDataType = typename NodeType::NodeDataType;
80
86 ComputeUpdate(const NeighborhoodType &, void *, const FloatOffsetType &) override
87 {
88 return static_cast<PixelType>(nullptr);
89 }
90
93 virtual NodeDataType
95 void * globalData,
96 const FloatOffsetType & offset = FloatOffsetType(0.0)) const = 0;
97
107 virtual void
109 {}
110
111protected:
114 void
115 PrintSelf(std::ostream & os, Indent indent) const override;
116};
117} // end namespace itk
118
119#ifndef ITK_MANUAL_INSTANTIATION
120# include "itkFiniteDifferenceSparseImageFunction.hxx"
121#endif
122
123#endif
Const version of NeighborhoodIterator, defining iteration of a local N-dimensional neighborhood of pi...
typename ConstNeighborhoodIterator< TSparseImageType >::RadiusType RadiusType
This is the base class for function classes that can be used with filters derived from FiniteDifferen...
~FiniteDifferenceSparseImageFunction() override=default
virtual void PrecomputeSparseUpdate(NeighborhoodType &) const
void PrintSelf(std::ostream &os, Indent indent) const override
virtual NodeDataType ComputeSparseUpdate(NeighborhoodType &neighborhood, void *globalData, const FloatOffsetType &offset=FloatOffsetType(0.0)) const =0
PixelType ComputeUpdate(const NeighborhoodType &, void *, const FloatOffsetType &) override
Control indentation during Print() invocation.
Definition: itkIndent.h:50
Light weight base class for most itk classes.
A templated class holding a n-Dimensional vector.
Definition: itkVector.h:63
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....