Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
itk::ShortestPathCostFunctionTbss< TInputImageType > Class Template Reference

Cost function for Tract-Based Spatial Statistics (TBSS) path finding. More...

#include <itkShortestPathCostFunctionTbss.h>

Inheritance diagram for itk::ShortestPathCostFunctionTbss< TInputImageType >:
Collaboration diagram for itk::ShortestPathCostFunctionTbss< TInputImageType >:

Public Types

typedef ShortestPathCostFunctionTbss Self
 
typedef ShortestPathCostFunction< TInputImageType > Superclass
 
typedef SmartPointer< Self > Pointer
 
typedef SmartPointer< const Self > ConstPointer
 
typedef itk::ImageRegionConstIterator< TInputImageType > ConstIteratorType
 
typedef TInputImageType::IndexType IndexType
 
typedef itk::Image< float, 3 > FloatImageType
 
- Public Types inherited from itk::ShortestPathCostFunction< TInputImageType >
typedef ShortestPathCostFunction Self
 
typedef Object Superclass
 
typedef SmartPointer< Self > Pointer
 
typedef SmartPointer< const Self > ConstPointer
 
typedef ShapedNeighborhoodIterator< TInputImageType > ShapedNeighborhoodIteratorType
 
typedef TInputImageType ImageType
 
typedef TInputImageType::Pointer ImagePointer
 
typedef TInputImageType::ConstPointer ImageConstPointer
 
typedef TInputImageType::PixelType PixelType
 
typedef TInputImageType::IndexType IndexType
 

Public Member Functions

Pointer Clone () const
 
virtual const char * GetClassName () const
 
double GetCost (IndexType p1, IndexType p2) override
 Calculate the cost of transitioning from pixel p1 to pixel p2. More...
 
void Initialize () override
 Initialize the cost function. More...
 
double GetMinCost () override
 Return the minimal possible cost (needed for A*). More...
 
void SetThreshold (double t)
 Set the intensity threshold below which pixels are impassable. More...
 
- Public Member Functions inherited from itk::ShortestPathCostFunction< TInputImageType >
virtual void SetImage (const TInputImageType *_arg)
 Set the input image on which costs are computed. More...
 
void SetStartIndex (const IndexType &index)
 Set the starting index of the path. More...
 
void SetEndIndex (const IndexType &index)
 Set the ending index of the path. More...
 

Static Public Member Functions

static Pointer New ()
 

Protected Member Functions

 ShortestPathCostFunctionTbss ()
 
 ~ShortestPathCostFunctionTbss () override
 
- Protected Member Functions inherited from itk::ShortestPathCostFunction< TInputImageType >
 ShortestPathCostFunction ()
 
 ~ShortestPathCostFunction () override
 
void PrintSelf (std::ostream &os, Indent indent) const override
 

Protected Attributes

double m_Threshold
 Intensity threshold below which pixels are impassable. More...
 
- Protected Attributes inherited from itk::ShortestPathCostFunction< TInputImageType >
ImageConstPointer m_Image
 The input image used for cost computation. More...
 
IndexType m_StartIndex
 
IndexType m_EndIndex
 Start and end indices defining the path endpoints. More...
 

Detailed Description

template<class TInputImageType>
class itk::ShortestPathCostFunctionTbss< TInputImageType >

Cost function for Tract-Based Spatial Statistics (TBSS) path finding.

This cost function is designed for finding shortest paths along white matter tracts in TBSS analysis. The cost of transitioning between two pixels combines the Euclidean distance with a penalty inversely proportional to the pixel intensity (tract weight).

Pixels with intensity below the configured threshold are considered impassable (infinite cost), preventing the path from leaving the tract skeleton.

The cost formula is:

cost = sqrt(dx^2 + dy^2 + dz^2) + 1000 * (1 - weight)

where weight is the pixel intensity at the destination pixel.

Template Parameters
TInputImageTypeThe ITK image type (typically 3D float image).
See also
ShortestPathCostFunction
ShortestPathImageFilter

Definition at line 48 of file itkShortestPathCostFunctionTbss.h.

Member Typedef Documentation

◆ ConstIteratorType

template<class TInputImageType >
typedef itk::ImageRegionConstIterator<TInputImageType> itk::ShortestPathCostFunctionTbss< TInputImageType >::ConstIteratorType

Definition at line 56 of file itkShortestPathCostFunctionTbss.h.

◆ ConstPointer

template<class TInputImageType >
typedef SmartPointer<const Self> itk::ShortestPathCostFunctionTbss< TInputImageType >::ConstPointer

Definition at line 55 of file itkShortestPathCostFunctionTbss.h.

◆ FloatImageType

template<class TInputImageType >
typedef itk::Image<float, 3> itk::ShortestPathCostFunctionTbss< TInputImageType >::FloatImageType

Definition at line 59 of file itkShortestPathCostFunctionTbss.h.

◆ IndexType

template<class TInputImageType >
typedef TInputImageType::IndexType itk::ShortestPathCostFunctionTbss< TInputImageType >::IndexType

Definition at line 57 of file itkShortestPathCostFunctionTbss.h.

◆ Pointer

template<class TInputImageType >
typedef SmartPointer<Self> itk::ShortestPathCostFunctionTbss< TInputImageType >::Pointer

Definition at line 54 of file itkShortestPathCostFunctionTbss.h.

◆ Self

template<class TInputImageType >
typedef ShortestPathCostFunctionTbss itk::ShortestPathCostFunctionTbss< TInputImageType >::Self

Standard class typedefs.

Definition at line 52 of file itkShortestPathCostFunctionTbss.h.

◆ Superclass

template<class TInputImageType >
typedef ShortestPathCostFunction<TInputImageType> itk::ShortestPathCostFunctionTbss< TInputImageType >::Superclass

Definition at line 53 of file itkShortestPathCostFunctionTbss.h.

Constructor & Destructor Documentation

◆ ShortestPathCostFunctionTbss()

template<class TInputImageType >
itk::ShortestPathCostFunctionTbss< TInputImageType >::ShortestPathCostFunctionTbss ( )
protected

◆ ~ShortestPathCostFunctionTbss()

template<class TInputImageType >
itk::ShortestPathCostFunctionTbss< TInputImageType >::~ShortestPathCostFunctionTbss ( )
inlineoverrideprotected

Definition at line 107 of file itkShortestPathCostFunctionTbss.h.

Member Function Documentation

◆ Clone()

template<class TInputImageType >
Pointer itk::ShortestPathCostFunctionTbss< TInputImageType >::Clone ( ) const

◆ GetClassName()

template<class TInputImageType >
virtual const char* itk::ShortestPathCostFunctionTbss< TInputImageType >::GetClassName ( ) const
virtual

Run-time type information (and related methods).

Reimplemented from itk::ShortestPathCostFunction< TInputImageType >.

◆ GetCost()

template<class TInputImageType >
double itk::ShortestPathCostFunctionTbss< TInputImageType >::GetCost ( IndexType  p1,
IndexType  p2 
)
overridevirtual

Calculate the cost of transitioning from pixel p1 to pixel p2.

If the intensity at p2 is below the threshold, returns std::numeric_limits<double>::max() (impassable). Otherwise, returns the Euclidean distance plus a penalty of 1000 * (1 - weight).

Parameters
[in]p1The source pixel index.
[in]p2The destination pixel index.
Returns
The transition cost, or numeric max if below threshold.

Implements itk::ShortestPathCostFunction< TInputImageType >.

◆ GetMinCost()

template<class TInputImageType >
double itk::ShortestPathCostFunctionTbss< TInputImageType >::GetMinCost ( )
overridevirtual

Return the minimal possible cost (needed for A*).

Returns
Always returns 1.0.

Implements itk::ShortestPathCostFunction< TInputImageType >.

◆ Initialize()

template<class TInputImageType >
void itk::ShortestPathCostFunctionTbss< TInputImageType >::Initialize ( )
overridevirtual

Initialize the cost function.

Currently a no-op for the TBSS cost function.

Implements itk::ShortestPathCostFunction< TInputImageType >.

◆ New()

template<class TInputImageType >
static Pointer itk::ShortestPathCostFunctionTbss< TInputImageType >::New ( )
static

Method for creation through the object factory.

◆ SetThreshold()

template<class TInputImageType >
void itk::ShortestPathCostFunctionTbss< TInputImageType >::SetThreshold ( double  t)
inline

Set the intensity threshold below which pixels are impassable.

Pixels with intensity below this value receive infinite cost, effectively restricting paths to the tract skeleton.

Parameters
[in]tThe threshold value.

Definition at line 102 of file itkShortestPathCostFunctionTbss.h.

References itk::ShortestPathCostFunctionTbss< TInputImageType >::m_Threshold.

Member Data Documentation

◆ m_Threshold

template<class TInputImageType >
double itk::ShortestPathCostFunctionTbss< TInputImageType >::m_Threshold
protected

Intensity threshold below which pixels are impassable.

Definition at line 109 of file itkShortestPathCostFunctionTbss.h.

Referenced by itk::ShortestPathCostFunctionTbss< TInputImageType >::SetThreshold().


The documentation for this class was generated from the following file: