ITK  5.1.0
Insight Toolkit
itkNeighborhoodOperatorImageFunction.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 itkNeighborhoodOperatorImageFunction_h
19 #define itkNeighborhoodOperatorImageFunction_h
20 
21 #include "itkImageFunction.h"
22 #include "itkNeighborhood.h"
23 
24 namespace itk
25 {
40 template <typename TInputImage, typename TOutput>
41 class ITK_TEMPLATE_EXPORT NeighborhoodOperatorImageFunction : public ImageFunction<TInputImage, TOutput>
42 {
43 public:
44 
47 
50 
54 
56  itkNewMacro(Self);
57 
59  using InputImageType = TInputImage;
60  using InputPixelType = typename InputImageType::PixelType;
61  using IndexType = typename Superclass::IndexType;
62  using ContinuousIndexType = typename Superclass::ContinuousIndexType;
63 
66 
68  static constexpr unsigned int ImageDimension = InputImageType::ImageDimension;
69 
71 
73  using PointType = typename Superclass::PointType;
74 
76  // virtual void SetInputImage( InputImageType * ptr );
77 
81  void
82  SetOperator(const NeighborhoodType & p) const
83  {
84  m_Operator = p;
85  this->Modified();
86  }
88 
91  TOutput
92  Evaluate(const PointType &) const override
93  {
94  std::cout << "NeighborhoodOperatorImageFunction::Evaluate(): Not implemented!" << std::endl;
95  TOutput out;
96  out = 0;
97  return out;
98  }
100 
102  TOutput
103  EvaluateAtIndex(const IndexType & index) const override;
104 
107  TOutput
109  {
110  std::cout << "NeighborhoodOperatorImageFunction::EvaluateAtContinuousIndex():Not implemented!" << std::endl;
111  TOutput out;
112  out = 0;
113  return out;
114  }
116 
117 protected:
120 
121  ~NeighborhoodOperatorImageFunction() override = default;
122 
123  void
124  operator=(const Self &)
125  {}
126  void
127  PrintSelf(std::ostream & os, Indent indent) const override;
128 
129 private:
131 };
132 } // end namespace itk
133 
134 #ifndef ITK_MANUAL_INSTANTIATION
135 # include "itkNeighborhoodOperatorImageFunction.hxx"
136 #endif
137 
138 /*
139 #ifndef ITK_MANUAL_INSTANTIATION
140 #include "itkNeighborhoodOperatorImageFunction.hxx"
141 #endif
142 */
143 
144 #endif
itk::NeighborhoodOperatorImageFunction::Evaluate
TOutput Evaluate(const PointType &) const override
Definition: itkNeighborhoodOperatorImageFunction.h:92
itkImageFunction.h
itk::NeighborhoodOperatorImageFunction::ContinuousIndexType
typename Superclass::ContinuousIndexType ContinuousIndexType
Definition: itkNeighborhoodOperatorImageFunction.h:62
itk::GTest::TypedefsAndConstructors::Dimension2::PointType
ImageBaseType::PointType PointType
Definition: itkGTestTypedefsAndConstructors.h:51
itk::Neighborhood< TOutput, Self::ImageDimension >
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::NeighborhoodOperatorImageFunction::EvaluateAtContinuousIndex
TOutput EvaluateAtContinuousIndex(const ContinuousIndexType &) const override
Definition: itkNeighborhoodOperatorImageFunction.h:108
itkNeighborhood.h
itk::NeighborhoodOperatorImageFunction::InputImageType
TInputImage InputImageType
Definition: itkNeighborhoodOperatorImageFunction.h:59
itk::NeighborhoodOperatorImageFunction::SetOperator
void SetOperator(const NeighborhoodType &p) const
Definition: itkNeighborhoodOperatorImageFunction.h:82
itk::GTest::TypedefsAndConstructors::Dimension2::IndexType
ImageBaseType::IndexType IndexType
Definition: itkGTestTypedefsAndConstructors.h:50
itk::ImageFunction
Evaluates a function of an image at specified position.
Definition: itkImageFunction.h:54
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:59
itk::NeighborhoodOperatorImageFunction
Compute the convolution of a neighborhood operator with the image at a specific location in space,...
Definition: itkNeighborhoodOperatorImageFunction.h:41
itk::NeighborhoodOperatorImageFunction::m_Operator
NeighborhoodType m_Operator
Definition: itkNeighborhoodOperatorImageFunction.h:130
itk::NeighborhoodOperatorImageFunction::PointType
typename Superclass::PointType PointType
Definition: itkNeighborhoodOperatorImageFunction.h:73
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkArray.h:26
itk::NeighborhoodOperatorImageFunction::InputPixelType
typename InputImageType::PixelType InputPixelType
Definition: itkNeighborhoodOperatorImageFunction.h:60
itk::NeighborhoodOperatorImageFunction::operator=
void operator=(const Self &)
Definition: itkNeighborhoodOperatorImageFunction.h:124
itk::NeighborhoodOperatorImageFunction::NeighborhoodOperatorImageFunction
NeighborhoodOperatorImageFunction(const Self &)
Definition: itkNeighborhoodOperatorImageFunction.h:119
itk::NeighborhoodOperatorImageFunction::IndexType
typename Superclass::IndexType IndexType
Definition: itkNeighborhoodOperatorImageFunction.h:61