12 #ifndef itkShortestPathCostFunction_h
13 #define itkShortestPathCostFunction_h
15 #include <itkObject.h>
16 #include <itkObjectFactory.h>
17 #include <itkShapedNeighborhoodIterator.h>
41 template <
class TInputImageType>
61 typedef typename TInputImageType::PixelType
PixelType;
62 typedef typename TInputImageType::IndexType
IndexType;
65 itkSetConstObjectMacro(
Image, TInputImageType);
113 void PrintSelf(std::ostream &os, Indent indent)
const override;
119 void operator=(
const Self &);
124 #include <itkShortestPathCostFunction.tpp>
Abstract base class for cost functions used by ShortestPathImageFilter.
virtual void Initialize()=0
Initialize the cost function.
ShapedNeighborhoodIterator< TInputImageType > ShapedNeighborhoodIteratorType
TInputImageType::ConstPointer ImageConstPointer
TInputImageType ImageType
TInputImageType::IndexType IndexType
void SetStartIndex(const IndexType &index)
Set the starting index of the path.
virtual double GetMinCost()=0
Return the minimal possible cost for any transition.
void SetEndIndex(const IndexType &index)
Set the ending index of the path.
TInputImageType::Pointer ImagePointer
SmartPointer< const Self > ConstPointer
SmartPointer< Self > Pointer
IndexType m_EndIndex
Start and end indices defining the path endpoints.
ShortestPathCostFunction()
TInputImageType::PixelType PixelType
virtual double GetCost(IndexType p1, IndexType p2)=0
Calculate the cost of transitioning from pixel p1 to pixel p2.
ShortestPathCostFunction Self
void PrintSelf(std::ostream &os, Indent indent) const override
~ShortestPathCostFunction() override
ImageConstPointer m_Image
The input image used for cost computation.