ITK  4.4.0
Insight Segmentation and Registration Toolkit
itkLaplacianSegmentationLevelSetFunction.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 __itkLaplacianSegmentationLevelSetFunction_h
19 #define __itkLaplacianSegmentationLevelSetFunction_h
20 
22 
23 namespace itk
24 {
33 template< class TImageType, class TFeatureImageType = TImageType >
35  public SegmentationLevelSetFunction< TImageType, TFeatureImageType >
36 {
37 public:
44  typedef TFeatureImageType FeatureImageType;
45 
47  itkNewMacro(Self);
48 
51 
53  typedef typename Superclass::ImageType ImageType;
54  typedef typename Superclass::ScalarValueType ScalarValueType;
55  typedef typename Superclass::FeatureScalarType FeatureScalarType;
56  typedef typename Superclass::RadiusType RadiusType;
57 
59  itkStaticConstMacro(ImageDimension, unsigned int,
60  Superclass::ImageDimension);
61 
62  virtual void CalculateSpeedImage();
63 
64  virtual void Initialize(const RadiusType & r)
65  {
66  Superclass::Initialize(r);
67 
68  this->SetAdvectionWeight(NumericTraits< ScalarValueType >::Zero);
69  this->SetPropagationWeight(-1.0 * NumericTraits< ScalarValueType >::One);
70  this->SetCurvatureWeight(NumericTraits< ScalarValueType >::One);
71  }
72 
79  void SetAdvectionWeight(const ScalarValueType value)
80  {
82  {
83  Superclass::SetAdvectionWeight(value);
84  }
85  }
87 
88 protected:
89 
91  {
92  this->SetAdvectionWeight(0.0);
93  this->SetPropagationWeight(1.0);
94  this->SetCurvatureWeight(1.0);
95  }
96 
98 
99  LaplacianSegmentationLevelSetFunction(const Self &); //purposely not
100  // implemented
101  void operator=(const Self &); //purposely not
102  // implemented
103 };
104 } // end namespace itk
105 
106 #ifndef ITK_MANUAL_INSTANTIATION
107 #include "itkLaplacianSegmentationLevelSetFunction.hxx"
108 #endif
109 
110 #endif
111