00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
#ifndef __itkShapeDetectionLevelSetFunction_h_
00018
#define __itkShapeDetectionLevelSetFunction_h_
00019
00020
#include "itkSegmentationLevelSetFunction.h"
00021
00022
namespace itk {
00023
00069
template <
class TImageType,
class TFeatureImageType = TImageType>
00070 class ITK_EXPORT ShapeDetectionLevelSetFunction
00071 :
public SegmentationLevelSetFunction<TImageType, TFeatureImageType>
00072 {
00073
public:
00075 typedef ShapeDetectionLevelSetFunction
Self;
00076 typedef SegmentationLevelSetFunction<TImageType, TFeatureImageType> Superclass;
00077 typedef SmartPointer<Self> Pointer;
00078 typedef SmartPointer<const Self> ConstPointer;
00079 typedef TFeatureImageType
FeatureImageType;
00080
00082
itkNewMacro(
Self);
00083
00085
itkTypeMacro( ShapeDetectionLevelSetFunction,
SegmentationLevelSetFunction );
00086
00088 typedef typename Superclass::ImageType
ImageType;
00089 typedef typename Superclass::NeighborhoodType
NeighborhoodType;
00090 typedef typename Superclass::ScalarValueType
ScalarValueType;
00091 typedef typename Superclass::FeatureScalarType
FeatureScalarType;
00092 typedef typename Superclass::RadiusType
RadiusType;
00093 typedef typename Superclass::FloatOffsetType
FloatOffsetType;
00094 typedef typename Superclass::GlobalDataStruct
GlobalDataStruct;
00095
00097
itkStaticConstMacro(ImageDimension,
unsigned int,
00098 Superclass::ImageDimension);
00099
00100
virtual void CalculateSpeedImage();
00101
00103 virtual ScalarValueType CurvatureSpeed(
const NeighborhoodType & neighborhood,
00104
const FloatOffsetType & offset,
GlobalDataStruct *gd )
const
00105
{
return PropagationSpeed( neighborhood, offset, gd ); }
00106
00107 virtual void Initialize(
const RadiusType &r)
00108 {
00109 Superclass::Initialize(r);
00110
00111 this->SetAdvectionWeight(
NumericTraits<ScalarValueType>::Zero );
00112 this->SetPropagationWeight(
NumericTraits<ScalarValueType>::One );
00113 this->SetCurvatureWeight(
NumericTraits<ScalarValueType>::One );
00114 }
00115
00116
protected:
00117 ShapeDetectionLevelSetFunction()
00118 {
00119 this->SetAdvectionWeight(
NumericTraits<ScalarValueType>::Zero );
00120 this->SetPropagationWeight(
NumericTraits<ScalarValueType>::One );
00121 this->SetCurvatureWeight(
NumericTraits<ScalarValueType>::One );
00122 }
00123 virtual ~ShapeDetectionLevelSetFunction() {}
00124
00125 ShapeDetectionLevelSetFunction(
const Self&);
00126
void operator=(
const Self&);
00127
00128 void PrintSelf(std::ostream& os,
Indent indent)
const
00129
{
00130
Superclass::PrintSelf(os, indent );
00131 }
00132
00133 };
00134
00135 }
00136
00137
#ifndef ITK_MANUAL_INSTANTIATION
00138
#include "itkShapeDetectionLevelSetFunction.txx"
00139
#endif
00140
00141
#endif