ITK  5.2.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  * http://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 
23 namespace itk
24 {
46 template <typename TSparseImageType>
47 class ITK_TEMPLATE_EXPORT FiniteDifferenceSparseImageFunction : public FiniteDifferenceFunction<TSparseImageType>
48 {
49 public:
50  ITK_DISALLOW_COPY_AND_MOVE(FiniteDifferenceSparseImageFunction);
51 
57 
60 
62  static constexpr unsigned int ImageDimension = Superclass::ImageDimension;
63 
65  using PixelType = typename Superclass::PixelType;
71 
74 
76  using NodeType = typename SparseImageType::NodeType;
77 
79  using NodeDataType = typename NodeType::NodeDataType;
80 
85  PixelType
86  ComputeUpdate(const NeighborhoodType &, void *, const FloatOffsetType &) override
87  {
88  return static_cast<PixelType>(nullptr);
89  }
90 
93  virtual NodeDataType
94  ComputeSparseUpdate(NeighborhoodType & neighborhood,
95  void * globalData,
96  const FloatOffsetType & offset = FloatOffsetType(0.0)) const = 0;
97 
107  virtual void
109  {}
110 
111 protected:
113  ~FiniteDifferenceSparseImageFunction() override = default;
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
itk::FiniteDifferenceFunction< TSparseImageType >::RadiusType
typename ConstNeighborhoodIterator< TSparseImageType >::RadiusType RadiusType
Definition: itkFiniteDifferenceFunction.h:97
itk::FiniteDifferenceSparseImageFunction::FloatOffsetType
typename Superclass::FloatOffsetType FloatOffsetType
Definition: itkFiniteDifferenceSparseImageFunction.h:69
itk::FiniteDifferenceSparseImageFunction
This is the base class for function classes that can be used with filters derived from FiniteDifferen...
Definition: itkFiniteDifferenceSparseImageFunction.h:47
itk::FiniteDifferenceSparseImageFunction::NeighborhoodType
typename Superclass::NeighborhoodType NeighborhoodType
Definition: itkFiniteDifferenceSparseImageFunction.h:68
itk::FiniteDifferenceSparseImageFunction::PrecomputeSparseUpdate
virtual void PrecomputeSparseUpdate(NeighborhoodType &) const
Definition: itkFiniteDifferenceSparseImageFunction.h:108
itk::FiniteDifferenceSparseImageFunction::ComputeUpdate
PixelType ComputeUpdate(const NeighborhoodType &, void *, const FloatOffsetType &) override
Definition: itkFiniteDifferenceSparseImageFunction.h:86
itk::Vector
A templated class holding a n-Dimensional vector.
Definition: itkVector.h:62
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::FiniteDifferenceFunction< TSparseImageType >::ImageType
TSparseImageType ImageType
Definition: itkFiniteDifferenceFunction.h:82
itk::GTest::TypedefsAndConstructors::Dimension2::IndexType
ImageBaseType::IndexType IndexType
Definition: itkGTestTypedefsAndConstructors.h:50
itkFiniteDifferenceFunction.h
itk::FiniteDifferenceSparseImageFunction::IndexType
typename SparseImageType::IndexType IndexType
Definition: itkFiniteDifferenceSparseImageFunction.h:73
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:59
itk::FiniteDifferenceSparseImageFunction::TimeStepType
typename Superclass::TimeStepType TimeStepType
Definition: itkFiniteDifferenceSparseImageFunction.h:66
itk::FiniteDifferenceFunction< TSparseImageType >::PixelType
typename ImageType::PixelType PixelType
Definition: itkFiniteDifferenceFunction.h:83
itk::FiniteDifferenceSparseImageFunction::PixelType
typename Superclass::PixelType PixelType
Definition: itkFiniteDifferenceSparseImageFunction.h:65
itk::FiniteDifferenceSparseImageFunction::NodeDataType
typename NodeType::NodeDataType NodeDataType
Definition: itkFiniteDifferenceSparseImageFunction.h:79
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::ConstNeighborhoodIterator
Const version of NeighborhoodIterator, defining iteration of a local N-dimensional neighborhood of pi...
Definition: itkConstNeighborhoodIterator.h:51
itk::FiniteDifferenceSparseImageFunction::NodeType
typename SparseImageType::NodeType NodeType
Definition: itkFiniteDifferenceSparseImageFunction.h:76
itk::FiniteDifferenceSparseImageFunction::RadiusType
typename Superclass::RadiusType RadiusType
Definition: itkFiniteDifferenceSparseImageFunction.h:67
itk::FiniteDifferenceFunction
Definition: itkFiniteDifferenceFunction.h:66
itk::FiniteDifferenceSparseImageFunction::SparseImageType
typename Superclass::ImageType SparseImageType
Definition: itkFiniteDifferenceSparseImageFunction.h:70
itk::FiniteDifferenceFunction< TSparseImageType >::TimeStepType
double TimeStepType
Definition: itkFiniteDifferenceFunction.h:90