ITK  4.3.0
Insight Segmentation and Registration Toolkit
itkShapePriorSegmentationLevelSetImageFilter.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 __itkShapePriorSegmentationLevelSetImageFilter_h
19 #define __itkShapePriorSegmentationLevelSetImageFilter_h
20 
25 
26 namespace itk
27 {
71 template< class TInputImage,
72  class TFeatureImage,
73  class TOutputPixelType = float >
75  public SegmentationLevelSetImageFilter< TInputImage, TFeatureImage,
76  TOutputPixelType >
77 {
78 public:
79 
81  itkStaticConstMacro(ImageDimension, unsigned int,
82  TInputImage::ImageDimension);
83 
90 
93 
95  typedef typename Superclass::ValueType ValueType;
96  typedef typename Superclass::OutputImageType OutputImageType;
97  typedef typename Superclass::FeatureImageType FeatureImageType;
98 
100  typedef TOutputPixelType OutputPixelType;
101 
105 
109 
114 
119 
124 
126  virtual void SetShapeFunction(ShapeFunctionType *s);
127 
128  itkGetObjectMacro(ShapeFunction, ShapeFunctionType);
129 
131  itkSetObjectMacro(CostFunction, CostFunctionType);
132  itkGetObjectMacro(CostFunction, CostFunctionType);
134 
136  itkSetObjectMacro(Optimizer, OptimizerType);
137  itkGetObjectMacro(Optimizer, OptimizerType);
139 
144  itkSetMacro(InitialParameters, ParametersType);
145  itkGetConstMacro(InitialParameters, ParametersType);
147 
149  void SetShapePriorScaling(ValueType v)
150  {
151  if ( v != m_ShapePriorSegmentationFunction->GetShapePriorWeight() )
152  {
153  m_ShapePriorSegmentationFunction->SetShapePriorWeight(v);
154  this->Modified();
155  }
156  }
158 
159  ValueType GetShapePriorScaling() const
160  {
161  return m_ShapePriorSegmentationFunction->GetShapePriorWeight();
162  }
163 
166  virtual void SetShapePriorSegmentationFunction(ShapePriorSegmentationFunctionType *s);
167 
168  virtual ShapePriorSegmentationFunctionType * GetShapePriorSegmentationFunction()
169  { return m_ShapePriorSegmentationFunction; }
170 
172  itkGetConstReferenceMacro(CurrentParameters, ParametersType);
173 
174 protected:
177 
178  virtual void PrintSelf(std::ostream & os, Indent indent) const;
179 
182  virtual void InitializeIteration();
183 
186  void GenerateData();
187 
189  void ExtractActiveRegion(NodeContainerType *ptr);
190 
191 private:
192  ShapePriorSegmentationLevelSetImageFilter(const Self &); //purposely not
193  // implemented
194  void operator=(const Self &); //purposely not
195 
196  // implemented
197 
203 
205 };
206 } // end namespace itk
207 
208 #ifndef ITK_MANUAL_INSTANTIATION
209 #include "itkShapePriorSegmentationLevelSetImageFilter.hxx"
210 #endif
211 
212 #endif
213