ITK  6.0.0
Insight Toolkit
itkConicShellInteriorExteriorSpatialFunction.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 itkConicShellInteriorExteriorSpatialFunction_h
19 #define itkConicShellInteriorExteriorSpatialFunction_h
20 
21 #include "vnl/vnl_vector.h"
23 #include "itkCovariantVector.h"
24 
25 namespace itk
26 {
59 template <unsigned int VDimension = 3, typename TInput = Point<double, VDimension>>
61  : public InteriorExteriorSpatialFunction<VDimension, TInput>
62 {
63 public:
64  ITK_DISALLOW_COPY_AND_MOVE(ConicShellInteriorExteriorSpatialFunction);
65 
71 
73  itkOverrideGetNameOfClassMacro(ConicShellInteriorExteriorSpatialFunction);
74 
76  itkNewMacro(Self);
77 
79  using typename Superclass::InputType;
80 
82  using typename Superclass::OutputType;
83 
86 
89  Evaluate(const InputType & position) const override;
90 
92  itkGetConstMacro(Origin, InputType);
93  itkSetMacro(Origin, InputType);
99  {
100  return m_OriginGradient;
101  }
102  void
103  SetOriginGradient(GradientType grad);
107  itkGetConstMacro(DistanceMin, double);
108  itkSetMacro(DistanceMin, double);
112  itkGetConstMacro(DistanceMax, double);
113  itkSetMacro(DistanceMax, double);
117  itkGetConstMacro(Epsilon, double);
118  itkSetMacro(Epsilon, double);
124  itkGetConstMacro(Polarity, bool);
125  itkSetMacro(Polarity, bool);
126  itkBooleanMacro(Polarity);
129 protected:
131  ~ConicShellInteriorExteriorSpatialFunction() override = default;
132  void
133  PrintSelf(std::ostream & os, Indent indent) const override;
134 
135 private:
136  InputType m_Origin{};
137  GradientType m_OriginGradient{};
138  double m_DistanceMin{ 0.0 };
139  double m_DistanceMax{ 0.0 };
140  double m_Epsilon{ 0.0 };
141  bool m_Polarity{ false };
142 };
143 } // end namespace itk
144 
145 #ifndef ITK_MANUAL_INSTANTIATION
146 # include "itkConicShellInteriorExteriorSpatialFunction.hxx"
147 #endif
148 
149 #endif
itkCovariantVector.h
itk::InteriorExteriorSpatialFunction
Returns whether or not a location is "inside" or "outside" a function.
Definition: itkInteriorExteriorSpatialFunction.h:49
itk::ConicShellInteriorExteriorSpatialFunction::GetOriginGradient
GradientType GetOriginGradient()
Definition: itkConicShellInteriorExteriorSpatialFunction.h:98
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::FunctionBase< TInput, bool >::OutputType
bool OutputType
Definition: itkFunctionBase.h:62
itk::ConicShellInteriorExteriorSpatialFunction
Spatial function implementation of a conic shell.
Definition: itkConicShellInteriorExteriorSpatialFunction.h:60
itk::CovariantVector< double, VDimension >
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnatomicalOrientation.h:29
itkInteriorExteriorSpatialFunction.h
itk::FunctionBase< TInput, bool >::InputType
TInput InputType
Definition: itkFunctionBase.h:59