ITK  5.2.0
Insight Toolkit
itkLevelSetFunctionWithRefitTerm.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 itkLevelSetFunctionWithRefitTerm_h
19 #define itkLevelSetFunctionWithRefitTerm_h
20 
21 #include "itkLevelSetFunction.h"
22 #include "itkSparseImage.h"
23 #include "itkNumericTraits.h"
24 
25 namespace itk
26 {
51 template <typename TImageType, typename TSparseImageType>
52 class ITK_TEMPLATE_EXPORT LevelSetFunctionWithRefitTerm : public LevelSetFunction<TImageType>
53 {
54 public:
55  ITK_DISALLOW_COPY_AND_MOVE(LevelSetFunctionWithRefitTerm);
56 
62 
65 
67  itkNewMacro(Self);
68 
70  using ImageType = typename Superclass::ImageType;
71  using FloatOffsetType = typename Superclass::FloatOffsetType;
73  using GlobalDataStruct = typename Superclass::GlobalDataStruct;
74  using NeighborhoodType = typename Superclass::NeighborhoodType;
75  using NeighborhoodScalesType = typename Superclass::NeighborhoodScalesType;
76  using TimeStepType = typename Superclass::TimeStepType;
77 
79 
81  using IndexType = typename ImageType::IndexType;
82 
84  using SparseImageType = TSparseImageType;
85 
87  using NodeType = typename SparseImageType::NodeType;
88 
90  using NormalVectorType = typename NodeType::NodeDataType;
91 
93  void
95  {
96  m_RefitWeight = w;
97  }
98 
101  void
103  {
104  m_OtherPropagationWeight = w;
105  }
106 
109  void
111  {
112  m_SparseTargetImage = im;
113  }
114 
116  SparseImageType *
118  {
119  return m_SparseTargetImage;
120  }
121 
126  TimeStepType
127  ComputeGlobalTimeStep(void * GlobalData) const override;
128 
129 protected:
132 
136 
138  void
139  PrintSelf(std::ostream & os, Indent indent) const override;
140 
144  ComputeCurvature(const NeighborhoodType &) const;
145 
150  PropagationSpeed(const NeighborhoodType &, const FloatOffsetType &, GlobalDataStruct * = 0) const override;
151 
155  virtual ScalarValueType
157  {
159  }
160 
161 private:
163  typename SparseImageType::Pointer m_SparseTargetImage;
164 
167 
171 };
172 } // end namespace itk
173 
174 #ifndef ITK_MANUAL_INSTANTIATION
175 # include "itkLevelSetFunctionWithRefitTerm.hxx"
176 #endif
177 
178 #endif
itkLevelSetFunction.h
itk::LevelSetFunctionWithRefitTerm::GetSparseTargetImage
SparseImageType * GetSparseTargetImage() const
Definition: itkLevelSetFunctionWithRefitTerm.h:117
itk::LevelSetFunctionWithRefitTerm::m_RefitWeight
ScalarValueType m_RefitWeight
Definition: itkLevelSetFunctionWithRefitTerm.h:131
itk::LevelSetFunctionWithRefitTerm::m_DimConst
static const ScalarValueType m_DimConst
Definition: itkLevelSetFunctionWithRefitTerm.h:170
itk::LevelSetFunctionWithRefitTerm::NormalVectorType
typename NodeType::NodeDataType NormalVectorType
Definition: itkLevelSetFunctionWithRefitTerm.h:90
itk::LevelSetFunctionWithRefitTerm::SetOtherPropagationWeight
void SetOtherPropagationWeight(const ScalarValueType w)
Definition: itkLevelSetFunctionWithRefitTerm.h:102
itk::Vector
A templated class holding a n-Dimensional vector.
Definition: itkVector.h:62
itk::LevelSetFunctionWithRefitTerm::m_OtherPropagationWeight
ScalarValueType m_OtherPropagationWeight
Definition: itkLevelSetFunctionWithRefitTerm.h:135
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::LevelSetFunctionWithRefitTerm::m_MinVectorNorm
ScalarValueType m_MinVectorNorm
Definition: itkLevelSetFunctionWithRefitTerm.h:166
itk::FiniteDifferenceFunction::ImageType
TImageType ImageType
Definition: itkFiniteDifferenceFunction.h:82
itk::LevelSetFunctionWithRefitTerm::IndexType
typename ImageType::IndexType IndexType
Definition: itkLevelSetFunctionWithRefitTerm.h:81
itk::GTest::TypedefsAndConstructors::Dimension2::IndexType
ImageBaseType::IndexType IndexType
Definition: itkGTestTypedefsAndConstructors.h:50
itk::LevelSetFunctionWithRefitTerm
This class extends the LevelSetFunction class by adding a grow term based on a target curvature store...
Definition: itkLevelSetFunctionWithRefitTerm.h:52
itk::LevelSetFunctionWithRefitTerm::NodeType
typename SparseImageType::NodeType NodeType
Definition: itkLevelSetFunctionWithRefitTerm.h:87
itk::LevelSetFunctionWithRefitTerm::NeighborhoodSizeValueType
typename NeighborhoodType::SizeValueType NeighborhoodSizeValueType
Definition: itkLevelSetFunctionWithRefitTerm.h:78
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:59
itk::LevelSetFunctionWithRefitTerm::GlobalDataStruct
typename Superclass::GlobalDataStruct GlobalDataStruct
Definition: itkLevelSetFunctionWithRefitTerm.h:73
itk::LevelSetFunctionWithRefitTerm::SetSparseTargetImage
void SetSparseTargetImage(SparseImageType *im)
Definition: itkLevelSetFunctionWithRefitTerm.h:110
itk::LevelSetFunctionWithRefitTerm::m_SparseTargetImage
SparseImageType::Pointer m_SparseTargetImage
Definition: itkLevelSetFunctionWithRefitTerm.h:163
itk::LevelSetFunctionWithRefitTerm::SetRefitWeight
void SetRefitWeight(const ScalarValueType w)
Definition: itkLevelSetFunctionWithRefitTerm.h:94
itk::NumericTraits::ZeroValue
static T ZeroValue()
Definition: itkNumericTraits.h:148
itk::LevelSetFunction::ScalarValueType
PixelType ScalarValueType
Definition: itkLevelSetFunction.h:90
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::LevelSetFunctionWithRefitTerm::SparseImageType
TSparseImageType SparseImageType
Definition: itkLevelSetFunctionWithRefitTerm.h:84
itk::ConstNeighborhoodIterator
Const version of NeighborhoodIterator, defining iteration of a local N-dimensional neighborhood of pi...
Definition: itkConstNeighborhoodIterator.h:51
itkNumericTraits.h
itk::LevelSetFunctionWithRefitTerm::m_NumVertex
static const NeighborhoodSizeValueType m_NumVertex
Definition: itkLevelSetFunctionWithRefitTerm.h:169
itk::LevelSetFunction
The LevelSetFunction class is a generic function object which can be used to create a level set metho...
Definition: itkLevelSetFunction.h:66
itkSparseImage.h
itk::LevelSetFunctionWithRefitTerm::OtherPropagationSpeed
virtual ScalarValueType OtherPropagationSpeed(const NeighborhoodType &, const FloatOffsetType &, GlobalDataStruct *=0) const
Definition: itkLevelSetFunctionWithRefitTerm.h:156
itk::SizeValueType
unsigned long SizeValueType
Definition: itkIntTypes.h:83
itk::FiniteDifferenceFunction::TimeStepType
double TimeStepType
Definition: itkFiniteDifferenceFunction.h:90
itk::LevelSetFunctionWithRefitTerm::ScalarValueType
typename Superclass::ScalarValueType ScalarValueType
Definition: itkLevelSetFunctionWithRefitTerm.h:72