ITK  4.10.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 >
53  public LevelSetFunction< TImageType >
54 {
55 public:
56 
62 
65 
67  itkNewMacro (Self);
68 
70  typedef typename Superclass::ImageType ImageType;
73  typedef typename Superclass::GlobalDataStruct GlobalDataStruct;
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 
93  void SetRefitWeight(const ScalarValueType w)
94  {
95  m_RefitWeight = w;
96  }
97 
100  void SetOtherPropagationWeight(const ScalarValueType w)
101  {
103  }
104 
107  void SetSparseTargetImage(SparseImageType *im)
108  { m_SparseTargetImage = im; }
109 
111  SparseImageType * GetSparseTargetImage() const
112  { return m_SparseTargetImage; }
113 
118  virtual TimeStepType ComputeGlobalTimeStep(void *GlobalData) const ITK_OVERRIDE;
119 
120 protected:
122  ScalarValueType m_RefitWeight;
123 
126  ScalarValueType m_OtherPropagationWeight;
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  LevelSetFunctionWithRefitTerm(const Self &) ITK_DELETE_FUNCTION;
154  void operator=(const Self &) ITK_DELETE_FUNCTION;
155 
157  typename SparseImageType::Pointer m_SparseTargetImage;
158 
160  ScalarValueType m_MinVectorNorm;
161 
163  static const NeighborhoodSizeValueType m_NumVertex;
164  static const ScalarValueType m_DimConst;
165 };
166 } // end namespace itk
167 
168 #ifndef ITK_MANUAL_INSTANTIATION
169 #include "itkLevelSetFunctionWithRefitTerm.hxx"
170 #endif
171 
172 #endif
ScalarValueType ComputeCurvature(const NeighborhoodType &) const
void PrintSelf(std::ostream &os, Indent indent) const override
The LevelSetFunction class is a generic function object which can be used to create a level set metho...
Superclass::NeighborhoodType NeighborhoodType
static const NeighborhoodSizeValueType m_NumVertex
Superclass::FloatOffsetType FloatOffsetType
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes...
Definition: itkArray.h:30
Superclass::ImageType ImageType
virtual TimeStepType ComputeGlobalTimeStep(void *GlobalData) const override
unsigned long SizeValueType
Definition: itkIntTypes.h:143
Superclass::NeighborhoodScalesType NeighborhoodScalesType
Superclass::NeighborhoodScalesType NeighborhoodScalesType
void SetOtherPropagationWeight(const ScalarValueType w)
virtual ScalarValueType PropagationSpeed(const NeighborhoodType &, const FloatOffsetType &, GlobalDataStruct *=0) const override
NeighborhoodType::SizeValueType NeighborhoodSizeValueType
This class extends the LevelSetFunction class by adding a grow term based on a target curvature store...
void operator=(const Self &) ITK_DELETE_FUNCTION
Control indentation during Print() invocation.
Definition: itkIndent.h:49
virtual ScalarValueType OtherPropagationSpeed(const NeighborhoodType &, const FloatOffsetType &, GlobalDataStruct *=0) const