ITK  4.13.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 
62 
65 
67  itkNewMacro (Self);
68 
70  typedef typename Superclass::ImageType ImageType;
71  typedef typename Superclass::FloatOffsetType FloatOffsetType;
73  typedef typename Superclass::GlobalDataStruct GlobalDataStruct;
74  typedef typename Superclass::NeighborhoodType NeighborhoodType;
75  typedef typename Superclass::NeighborhoodScalesType NeighborhoodScalesType;
76  typedef typename Superclass::TimeStepType TimeStepType;
77 
79 
81  typedef typename ImageType::IndexType IndexType;
82 
84  typedef TSparseImageType SparseImageType;
85 
87  typedef typename SparseImageType::NodeType NodeType;
88 
90  typedef typename NodeType::NodeDataType NormalVectorType;
91 
94  {
95  m_RefitWeight = w;
96  }
97 
101  {
102  m_OtherPropagationWeight = w;
103  }
104 
108  { m_SparseTargetImage = im; }
109 
112  { return m_SparseTargetImage; }
113 
118  virtual TimeStepType ComputeGlobalTimeStep(void *GlobalData) const ITK_OVERRIDE;
119 
120 protected:
123 
127 
129  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
130 
133  ScalarValueType ComputeCurvature(const NeighborhoodType &) const;
134 
138  virtual ScalarValueType PropagationSpeed(const NeighborhoodType &,
139  const FloatOffsetType &,
140  GlobalDataStruct * = 0) const ITK_OVERRIDE;
141 
145  virtual ScalarValueType OtherPropagationSpeed(const NeighborhoodType &,
146  const FloatOffsetType &,
147  GlobalDataStruct * = 0) const
148  {
150  }
151 
152 private:
153  ITK_DISALLOW_COPY_AND_ASSIGN(LevelSetFunctionWithRefitTerm);
154 
156  typename SparseImageType::Pointer m_SparseTargetImage;
157 
160 
164 };
165 } // end namespace itk
166 
167 #ifndef ITK_MANUAL_INSTANTIATION
168 #include "itkLevelSetFunctionWithRefitTerm.hxx"
169 #endif
170 
171 #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...
static const NeighborhoodSizeValueType m_NumVertex
Const version of NeighborhoodIterator, defining iteration of a local N-dimensional neighborhood of pi...
unsigned long SizeValueType
Definition: itkIntTypes.h:143
Superclass::NeighborhoodScalesType NeighborhoodScalesType
void SetOtherPropagationWeight(const ScalarValueType w)
A templated class holding a n-Dimensional vector.
Definition: itkVector.h:62
NeighborhoodType::SizeValueType NeighborhoodSizeValueType
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