Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
itkShortestPathCostFunctionTbss.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 #ifndef itkShortestPathCostFunctionTbss_h
13 #define itkShortestPathCostFunctionTbss_h
14 
15 #include <itkObject.h>
16 #include <itkObjectFactory.h>
17 #include <itkShapedNeighborhoodIterator.h>
18 #include <itkShortestPathCostFunction.h> // Superclass of Metrics
19 #include <itkImageRegionConstIterator.h>
20 #include <itkMacro.h>
21 
22 namespace itk
23 {
47  template <class TInputImageType>
49  {
50  public:
56  typedef itk::ImageRegionConstIterator<TInputImageType> ConstIteratorType;
57  typedef typename TInputImageType::IndexType IndexType;
58 
59  typedef itk::Image<float, 3> FloatImageType;
60 
62  itkFactorylessNewMacro(Self);
63  itkCloneMacro(Self);
64 
66  itkTypeMacro(Self, Superclass);
67 
79  double GetCost(IndexType p1, IndexType p2) override;
80 
86  void Initialize() override;
87 
92  double GetMinCost() override;
93 
102  void SetThreshold(double t) { m_Threshold = t; }
103 
104  protected:
106 
108 
109  double m_Threshold;
110 
111  private:
112  };
113 
114 } // end namespace itk
115 
116 #include <itkShortestPathCostFunctionTbss.tpp>
117 
118 #endif /* itkShortestPathCostFunctionTbss_h */
Cost function for Tract-Based Spatial Statistics (TBSS) path finding.
itk::ImageRegionConstIterator< TInputImageType > ConstIteratorType
double m_Threshold
Intensity threshold below which pixels are impassable.
double GetCost(IndexType p1, IndexType p2) override
Calculate the cost of transitioning from pixel p1 to pixel p2.
ShortestPathCostFunction< TInputImageType > Superclass
void SetThreshold(double t)
Set the intensity threshold below which pixels are impassable.
void Initialize() override
Initialize the cost function.
double GetMinCost() override
Return the minimal possible cost (needed for A*).
Abstract base class for cost functions used by ShortestPathImageFilter.
TInputImageType::IndexType IndexType