12 #ifndef __itkShortestPathImageFilter_h 13 #define __itkShortestPathImageFilter_h 15 #include "itkImageToImageFilter.h" 18 #include <itkImageRegionIteratorWithIndex.h> 51 template <
class TInputImageType,
class TOutputImageType>
57 typedef ImageToImageFilter<TInputImageType, TOutputImageType>
Superclass;
70 typedef typename TInputImageType::IndexType
IndexType;
81 itkFactorylessNewMacro(Self);
88 void PrintSelf(std::ostream &os, Indent indent)
const override;
107 itkSetMacro(FullNeighborsMode,
bool);
108 itkGetMacro(FullNeighborsMode,
bool);
112 itkSetMacro(Graph_fullNeighbors,
bool);
116 itkSetMacro(MakeOutputImage,
bool);
117 itkGetMacro(MakeOutputImage,
bool);
120 itkSetMacro(StoreVectorOrder,
bool);
121 itkGetMacro(StoreVectorOrder,
bool);
125 itkSetMacro(CalcAllDistances,
bool);
126 itkGetMacro(CalcAllDistances,
bool);
130 itkSetMacro(ActivateTimeOut,
bool);
131 itkGetMacro(ActivateTimeOut,
bool);
154 itkSetObjectMacro(CostFunction,
156 itkGetObjectMacro(CostFunction, CostFunctionType);
162 std::vector<IndexType>
233 #include "itkShortestPathImageFilter.txx" SmartPointer< Self > Pointer
std::vector< std::vector< IndexType > > GetMultipleVectorPaths()
bool CoordIsInBounds(IndexType)
ShortestPathImageFilter()
std::vector< std::vector< IndexType > > m_MultipleVectorPaths
void SetEndIndex(const IndexType &EndIndex)
SmartPointer< const Self > ConstPointer
void StartShortestPathSearch()
std::vector< IndexType > GetVectorPath()
TInputImageType::PixelType InputImagePixelType
bool m_Graph_fullNeighbors
void PrintSelf(std::ostream &os, Indent indent) const override
void MakeShortestPathVector()
CostFunctionTypePointer m_CostFunction
TInputImageType::Pointer InputImagePointer
std::vector< IndexType > m_VectorPath
std::vector< IndexType > m_endPoints
TOutputImageType OutputImageType
unsigned int CoordToNode(IndexType)
~ShortestPathImageFilter() override
NodeNumType m_Graph_NumberOfNodes
itk::ShapedNeighborhoodIterator< TInputImageType > itkShapedNeighborhoodIteratorType
void SetStartIndex(const IndexType &StartIndex)
NodeNumType m_Graph_StartNode
std::vector< ShortestPathNode * > GetNeighbors(NodeNumType nodeNum, bool FullNeighbors)
OutputImagePointer GetVectorOrderImage()
ShortestPathImageFilter Self
std::vector< NodeNumType > m_VectorOrder
void GenerateData() override
static const int BACKGROUND
TInputImageType::SizeType InputImageSizeType
TInputImageType::IndexType IndexType
void AddEndIndex(const IndexType &index)
CostFunctionType::Pointer CostFunctionTypePointer
TInputImageType InputImageType
double getEstimatedCostsToTarget(const IndexType &a)
bool operator()(ShortestPathNode *a, ShortestPathNode *b)
static const int FOREGROUND
TOutputImageType::PixelType OutputImagePixelType
ImageRegionIteratorWithIndex< OutputImageType > OutputImageIteratorType
std::vector< ShortestPathNode * > m_Graph_DiscoveredNodeList
TOutputImageType::IndexType OutputImageIndexType
ShortestPathNode * m_Nodes
std::vector< IndexType > m_endPointsClosed
ImageToImageFilter< TInputImageType, TOutputImageType > Superclass
NodeNumType m_Graph_EndNode
TInputImageType::IndexType NodeToCoord(NodeNumType)
bool GetUseCostFunction()
TOutputImageType::Pointer OutputImagePointer
void SetUseCostFunction(bool doUseCostFunction)
OutputImagePointer GetDistanceImage()
InputImageType::Pointer m_magnitudeImage
ShortestPathCostFunction< TInputImageType > CostFunctionType
void operator=(const Self &)
itk::ImageRegionIteratorWithIndex< InputImageType > InputImageIteratorType