17 #ifndef __itkShortestPathCostFunctionLiveWire_h
18 #define __itkShortestPathCostFunctionLiveWire_h
22 #include "itkImageRegionConstIterator.h"
43 template <
class TInputImageType>
55 itkFactorylessNewMacro(Self) itkCloneMacro(Self)
72 virtual
double GetCost(IndexType p1, IndexType p2);
75 virtual
double GetMinCost();
78 virtual
void Initialize();
81 virtual
void AddRepulsivePoint(const IndexType &index);
84 virtual
void RemoveRepulsivePoint(const IndexType &index);
87 virtual
void ClearRepulsivePoints();
89 itkSetMacro(RequestedRegion, RegionType);
90 itkGetMacro(RequestedRegion, RegionType);
93 itkSetMacro(UseApproximateGradient,
bool);
94 itkGetMacro(UseApproximateGradient,
bool);
96 virtual
void SetImage(const TInputImageType *_arg);
98 void SetDynamicCostMap(
std::
map<
int,
int> &costMap)
100 this->m_CostMap = costMap;
101 this->m_UseCostMap =
true;
102 this->m_MaxMapCosts = -1;
125 static double Gaussian(
double x,
double xOfGaussian,
double yOfGaussian);
165 double SigmoidFunction(
double I,
double max,
double min,
double alpha,
double beta);
170 #ifndef ITK_MANUAL_INSTANTIATION
Superclass::PixelType endValue
const FloatImageType * GetEdgeImage()
itk::SmartPointer< Self > Pointer
itk::ImageRegion< 2 > RegionType
itk::Image< float, 2 > FloatImageType
virtual ~ShortestPathCostFunctionLiveWire()
TInputImageType ImageType
const UnsignedCharImageType * GetMaskImage()
itk::Image< unsigned char, 2 > UnsignedCharImageType
itk::Image< OutputPixelType, 2 > VectorOutputImageType
TInputImageType::IndexType IndexType
FloatImageType::Pointer m_EdgeImage
Superclass::PixelType val
SmartPointer< const Self > ConstPointer
void SetUseCostMap(bool useCostMap)
const FloatImageType * GetGradientMagnitudeImage()
Superclass::PixelType startValue
RegionType m_RequestedRegion
itk::ImageRegionConstIterator< TInputImageType > ConstIteratorType
SmartPointer< Self > Pointer
ShortestPathCostFunctionLiveWire Self
const VectorOutputImageType * GetGradientImage()
bool m_UseRepulsivePoints
Cost function for LiveWire purposes. Specific features are considered to calculate cummulative costs ...
bool m_UseApproximateGradient
std::map< int, int > m_CostMap
itk::CovariantVector< ComponentType, 2 > OutputPixelType
TInputImageType::PixelType PixelType
UnsignedCharImageType::Pointer m_MaskImage
VectorOutputImageType::Pointer m_GradientImage
ShortestPathCostFunction< TInputImageType > Superclass
void SetCostMapMaximum(double max)
Set the maximum of the dynamic cost map to save computation time.