ITK  4.13.0
Insight Segmentation and Registration Toolkit
itkShapePriorSegmentationLevelSetFunction.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 itkShapePriorSegmentationLevelSetFunction_h
19 #define itkShapePriorSegmentationLevelSetFunction_h
20 
23 
24 namespace itk
25 {
54 template< typename TImageType, typename TFeatureImageType = TImageType >
55 class ITK_TEMPLATE_EXPORT ShapePriorSegmentationLevelSetFunction:
56  public SegmentationLevelSetFunction< TImageType, TFeatureImageType >
57 {
58 public:
65  typedef TFeatureImageType FeatureImageType;
66 
68  itkNewMacro(Self);
69 
72 
74  typedef typename Superclass::ImageType ImageType;
75  typedef typename Superclass::NeighborhoodType NeighborhoodType;
77  typedef typename Superclass::FeatureScalarType FeatureScalarType;
78  typedef typename Superclass::RadiusType RadiusType;
79  typedef typename Superclass::FloatOffsetType FloatOffsetType;
80  typedef typename Superclass::VectorImageType VectorImageType;
81  typedef typename Superclass::PixelType PixelType;
82  typedef typename Superclass::TimeStepType TimeStepType;
83  typedef typename Superclass::IndexType IndexType;
84  typedef typename Superclass::ContinuousIndexType ContinuousIndexType;
85 
87  itkStaticConstMacro(ImageDimension, unsigned int,
88  Superclass::ImageDimension);
89 
91  typedef ShapeSignedDistanceFunction< double,
92  itkGetStaticConstMacro(ImageDimension) > ShapeFunctionType;
94 
97  { m_ShapePriorWeight = p; }
99  { return m_ShapePriorWeight; }
101 
105  { m_ShapeFunction = ptr; }
107  { return m_ShapeFunction; }
109 
111  virtual PixelType ComputeUpdate( const NeighborhoodType & neighborhood,
112  void *globalData,
113  const FloatOffsetType & = FloatOffsetType(0.0) ) ITK_OVERRIDE;
114 
116  virtual TimeStepType ComputeGlobalTimeStep(void *globalData) const ITK_OVERRIDE;
117 
121  struct ShapePriorGlobalDataStruct:public GlobalDataStruct {
123  };
124 
126  virtual void * GetGlobalDataPointer() const ITK_OVERRIDE
127  {
129 
134  return ans;
135  }
136 
138  virtual void ReleaseGlobalDataPointer(void *GlobalData) const ITK_OVERRIDE
139  { delete (ShapePriorGlobalDataStruct *)GlobalData; }
140 
141 protected:
143  virtual ~ShapePriorSegmentationLevelSetFunction() ITK_OVERRIDE {}
144 
145  ITK_DISALLOW_COPY_AND_ASSIGN(ShapePriorSegmentationLevelSetFunction);
146 
147  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
148 
149 private:
150 
153 };
154 } // end namespace itk
155 
156 #ifndef ITK_MANUAL_INSTANTIATION
157 #include "itkShapePriorSegmentationLevelSetFunction.hxx"
158 #endif
159 
160 #endif
SegmentationLevelSetFunction< TImageType, TFeatureImageType > Superclass
Light weight base class for most itk classes.
virtual void ReleaseGlobalDataPointer(void *GlobalData) const override
This function is used in ShapePriorSegmentationLevelSetFilter to segment structures in an image based...
Base class for functions which evaluates the signed distance from a shape.
Control indentation during Print() invocation.
Definition: itkIndent.h:49
ShapeSignedDistanceFunction< double, itkGetStaticConstMacro(ImageDimension) > ShapeFunctionType