ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkFiniteDifferenceSparseImageFunction.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
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:
48  public FiniteDifferenceFunction< TSparseImageType >
49 {
50 public:
51  ITK_DISALLOW_COPY_AND_ASSIGN(FiniteDifferenceSparseImageFunction);
52 
58 
61 
63  static constexpr unsigned int ImageDimension = Superclass::ImageDimension;
64 
66  using PixelType = typename Superclass::PixelType;
72 
75 
77  using NodeType = typename SparseImageType::NodeType;
78 
80  using NodeDataType = typename NodeType::NodeDataType;
81 
87  void *,
88  const FloatOffsetType &) override
89  {
90  return static_cast< PixelType >( nullptr );
91  }
92 
95  virtual NodeDataType
96  ComputeSparseUpdate( NeighborhoodType & neighborhood,
97  void *globalData,
98  const FloatOffsetType & offset = FloatOffsetType(0.0) ) const = 0;
99 
109  virtual void PrecomputeSparseUpdate(NeighborhoodType &) const {}
110 
111 protected:
113  ~FiniteDifferenceSparseImageFunction() override = default;
114  void PrintSelf(std::ostream & os, Indent indent) const override;
115 };
116 } // end namespace itk
117 
118 #ifndef ITK_MANUAL_INSTANTIATION
119 #include "itkFiniteDifferenceSparseImageFunction.hxx"
120 #endif
121 
122 #endif
Light weight base class for most itk classes.
Const version of NeighborhoodIterator, defining iteration of a local N-dimensional neighborhood of pi...
virtual void PrecomputeSparseUpdate(NeighborhoodType &) const
typename ConstNeighborhoodIterator< TSparseImageType >::RadiusType RadiusType
A templated class holding a n-Dimensional vector.
Definition: itkVector.h:62
This is the base class for function classes that can be used with filters derived from FiniteDifferen...
Control indentation during Print() invocation.
Definition: itkIndent.h:49
PixelType ComputeUpdate(const NeighborhoodType &, void *, const FloatOffsetType &) override