00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
#ifndef __itkCurvesLevelSetFunction_h_
00019
#define __itkCurvesLevelSetFunction_h_
00020
00021
#include "itkSegmentationLevelSetFunction.h"
00022
00023
namespace itk {
00024
00060
template <
class TImageType,
class TFeatureImageType = TImageType>
00061 class ITK_EXPORT CurvesLevelSetFunction
00062 :
public SegmentationLevelSetFunction<TImageType, TFeatureImageType>
00063 {
00064
public:
00066 typedef CurvesLevelSetFunction
Self;
00067 typedef SegmentationLevelSetFunction<TImageType> Superclass;
00068 typedef LevelSetFunction<TImageType> SuperSuperclass;
00069 typedef SmartPointer<Self> Pointer;
00070 typedef SmartPointer<const Self> ConstPointer;
00071 typedef TFeatureImageType
FeatureImageType;
00072
00074
itkNewMacro(
Self);
00075
00077
itkTypeMacro( CurvesLevelSetFunction,
SegmentationLevelSetFunction );
00078
00080 typedef typename SuperSuperclass::PixelType
PixelType;
00081 typedef typename Superclass::ImageType
ImageType;
00082 typedef typename Superclass::NeighborhoodType
NeighborhoodType;
00083 typedef typename Superclass::ScalarValueType
ScalarValueType;
00084 typedef typename Superclass::FeatureScalarType
FeatureScalarType;
00085 typedef typename Superclass::RadiusType
RadiusType;
00086 typedef typename SuperSuperclass::FloatOffsetType
FloatOffsetType;
00087 typedef typename SuperSuperclass::GlobalDataStruct
GlobalDataStruct;
00088 typedef typename Superclass::VectorImageType
VectorImageType;
00089
00091
itkStaticConstMacro(ImageDimension,
unsigned int,
00092 Superclass::ImageDimension);
00093
00095
virtual void CalculateSpeedImage();
00096
00098
virtual void CalculateAdvectionImage();
00099
00101 virtual ScalarValueType CurvatureSpeed(
const NeighborhoodType & neighborhood,
00102
const FloatOffsetType & offset,
GlobalDataStruct *gd )
const
00103
{
return PropagationSpeed( neighborhood, offset, gd ); }
00104
00107 void SetDerivativeSigma(
const double v )
00108 { m_DerivativeSigma = v; }
00109 double GetDerivativeSigma()
00110 {
return m_DerivativeSigma; };
00111
00112
virtual void Initialize(
const RadiusType &r);
00113
00114
protected:
00115 CurvesLevelSetFunction()
00116 {
00117
00118 this->UseMinimalCurvatureOn();
00119 this->SetAdvectionWeight(
NumericTraits<ScalarValueType>::One );
00120 this->SetPropagationWeight(
NumericTraits<ScalarValueType>::One );
00121 this->SetCurvatureWeight(
NumericTraits<ScalarValueType>::One );
00122
00123
00124 m_DerivativeSigma = 1.0;
00125 }
00126
virtual ~CurvesLevelSetFunction() {}
00127
00128 CurvesLevelSetFunction(
const Self&);
00129
void operator=(
const Self&);
00130
00131
void PrintSelf(std::ostream& os,
Indent indent)
const
00132 {
00133
Superclass::PrintSelf(os, indent );
00134 os << indent <<
"DerivativeSigma: " << m_DerivativeSigma << std::endl;
00135 }
00136
00137
private:
00138
00140 std::slice x_slice[ImageDimension];
00141
00143 ::size_t m_Center;
00144
00146 ::size_t m_xStride[ImageDimension];
00147
00148
00149
double m_DerivativeSigma;
00150
00151 };
00152
00153 }
00154
00155
#ifndef ITK_MANUAL_INSTANTIATION
00156
#include "itkCurvesLevelSetFunction.txx"
00157
#endif
00158
00159
#endif