ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkLevelSetFunctionWithRefitTerm.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 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:
53  public LevelSetFunction< TImageType >
54 {
55 public:
56  ITK_DISALLOW_COPY_AND_ASSIGN(LevelSetFunctionWithRefitTerm);
57 
63 
66 
68  itkNewMacro (Self);
69 
71  using ImageType = typename Superclass::ImageType;
72  using FloatOffsetType = typename Superclass::FloatOffsetType;
74  using GlobalDataStruct = typename Superclass::GlobalDataStruct;
75  using NeighborhoodType = typename Superclass::NeighborhoodType;
76  using NeighborhoodScalesType = typename Superclass::NeighborhoodScalesType;
77  using TimeStepType = typename Superclass::TimeStepType;
78 
80 
82  using IndexType = typename ImageType::IndexType;
83 
85  using SparseImageType = TSparseImageType;
86 
88  using NodeType = typename SparseImageType::NodeType;
89 
91  using NormalVectorType = typename NodeType::NodeDataType;
92 
95  {
96  m_RefitWeight = w;
97  }
98 
102  {
103  m_OtherPropagationWeight = w;
104  }
105 
109  { m_SparseTargetImage = im; }
110 
113  { return m_SparseTargetImage; }
114 
119  TimeStepType ComputeGlobalTimeStep(void *GlobalData) const override;
120 
121 protected:
124 
128 
130  void PrintSelf(std::ostream & os, Indent indent) const override;
131 
134  ScalarValueType ComputeCurvature(const NeighborhoodType &) const;
135 
139  ScalarValueType PropagationSpeed(const NeighborhoodType &,
140  const FloatOffsetType &,
141  GlobalDataStruct * = 0) const override;
142 
147  const FloatOffsetType &,
148  GlobalDataStruct * = 0) const
149  {
151  }
152 
153 private:
155  typename SparseImageType::Pointer m_SparseTargetImage;
156 
159 
163 };
164 } // end namespace itk
165 
166 #ifndef ITK_MANUAL_INSTANTIATION
167 #include "itkLevelSetFunctionWithRefitTerm.hxx"
168 #endif
169 
170 #endif
Light weight base class for most itk classes.
The LevelSetFunction class is a generic function object which can be used to create a level set metho...
Define numeric traits for std::vector.
unsigned long SizeValueType
Definition: itkIntTypes.h:83
static const NeighborhoodSizeValueType m_NumVertex
Const version of NeighborhoodIterator, defining iteration of a local N-dimensional neighborhood of pi...
typename NeighborhoodType::SizeValueType NeighborhoodSizeValueType
typename NodeType::NodeDataType NormalVectorType
void SetOtherPropagationWeight(const ScalarValueType w)
A templated class holding a n-Dimensional vector.
Definition: itkVector.h:62
typename SparseImageType::NodeType NodeType
This class extends the LevelSetFunction class by adding a grow term based on a target curvature store...
Control indentation during Print() invocation.
Definition: itkIndent.h:49
typename Superclass::GlobalDataStruct GlobalDataStruct
virtual ScalarValueType OtherPropagationSpeed(const NeighborhoodType &, const FloatOffsetType &, GlobalDataStruct *=0) const
typename Superclass::ScalarValueType ScalarValueType