ITK  4.6.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 >
56  public SegmentationLevelSetFunction< TImageType, TFeatureImageType >
57 {
58 public:
65  typedef TFeatureImageType FeatureImageType;
66 
68  itkNewMacro(Self);
69 
72 
74  typedef typename Superclass::ImageType ImageType;
81  typedef typename Superclass::PixelType PixelType;
83  typedef typename Superclass::IndexType IndexType;
85 
87  itkStaticConstMacro(ImageDimension, unsigned int,
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) );
114 
116  virtual TimeStepType ComputeGlobalTimeStep(void *globalData) const;
117 
123  };
124 
126  virtual void * GetGlobalDataPointer() const
127  {
129 
134  return ans;
135  }
136 
138  virtual void ReleaseGlobalDataPointer(void *GlobalData) const
139  { delete (ShapePriorGlobalDataStruct *)GlobalData; }
140 
141 protected:
144 
145  ShapePriorSegmentationLevelSetFunction(const Self &); //purposely not
146  // implemented
147  void operator=(const Self &); //purposely not
148  // implemented
149 
150  void PrintSelf(std::ostream & os, Indent indent) const;
151 
152 private:
153 
156 };
157 } // end namespace itk
158 
159 #ifndef ITK_MANUAL_INSTANTIATION
160 #include "itkShapePriorSegmentationLevelSetFunction.hxx"
161 #endif
162 
163 #endif
virtual PixelType ComputeUpdate(const NeighborhoodType &neighborhood, void *globalData, const FloatOffsetType &=FloatOffsetType(0.0))
SegmentationLevelSetFunction< TImageType, TFeatureImageType > Superclass
Light weight base class for most itk classes.
Superclass::PixelType PixelType
virtual TimeStepType ComputeGlobalTimeStep(void *globalData) const
InterpolatorType::ContinuousIndexType ContinuousIndexType
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.
void PrintSelf(std::ostream &os, Indent indent) const
Control indentation during Print() invocation.
Definition: itkIndent.h:49
ShapeSignedDistanceFunction< double, itkGetStaticConstMacro(ImageDimension) > ShapeFunctionType
Define additional traits for native types such as int or float.
Image< VectorType, itkGetStaticConstMacro(ImageDimension) > VectorImageType