ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkSpatialFunctionImageEvaluatorFilter.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 itkSpatialFunctionImageEvaluatorFilter_h
19 #define itkSpatialFunctionImageEvaluatorFilter_h
20 
21 #include "itkImageFunction.h"
22 #include "itkImageRegionIterator.h"
23 #include "itkImageToImageFilter.h"
24 #include "itkSize.h"
25 #include "itkSpatialFunction.h"
26 
27 namespace itk
28 {
42 template< typename TSpatialFunction, typename TInputImage, typename TOutputImage >
43 class ITK_TEMPLATE_EXPORT SpatialFunctionImageEvaluatorFilter:
44  public ImageToImageFilter< TInputImage, TOutputImage >
45 {
46 public:
47  ITK_DISALLOW_COPY_AND_ASSIGN(SpatialFunctionImageEvaluatorFilter);
48 
54 
56  itkNewMacro(Self);
57 
60 
62  static constexpr unsigned int NDimensions = TInputImage::ImageDimension;
63 
65  using SizeType = typename TInputImage::SizeType;
66 
69 
71  using PixelType = typename TOutputImage::PixelType;
72 
75 
77  using FunctionType = TSpatialFunction;
78 
80  using FunctionValueType = typename FunctionType::OutputType;
81 
83  using PositionType = typename FunctionType::InputType;
84 
86  void SetFunction(FunctionType *PixelFunction)
87  { m_PixelFunction = PixelFunction; }
88 
89 protected:
91  ~SpatialFunctionImageEvaluatorFilter() override = default;
92 
94  void GenerateData() override;
95 
96 private:
99 };
100 } // end namespace itk
101 
102 #ifndef ITK_MANUAL_INSTANTIATION
103 #include "itkSpatialFunctionImageEvaluatorFilter.hxx"
104 #endif
105 
106 #endif
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Base class for all process objects that output image data.
typename OutputImageType::RegionType OutputImageRegionType
Evaluates a SpatialFunction onto a source image.
Base class for filters that take an image as input and produce an image as output.