Medical Imaging Interaction Toolkit
2023.12.00
Medical Imaging Interaction Toolkit
|
Cost function for LiveWire purposes. Specific features are considered to calculate cummulative costs of a link between two pixels. These are: More...
#include <itkShortestPathCostFunctionLiveWire.h>
Public Types | |
enum | Constants { MAPSCALEFACTOR } |
typedef ShortestPathCostFunctionLiveWire | Self |
typedef ShortestPathCostFunction< TInputImageType > | Superclass |
typedef SmartPointer< Self > | Pointer |
typedef SmartPointer< const Self > | ConstPointer |
typedef itk::ImageRegionConstIterator< TInputImageType > | ConstIteratorType |
typedef itk::Image< unsigned char, 2 > | UnsignedCharImageType |
typedef itk::Image< float, 2 > | FloatImageType |
typedef float | ComponentType |
typedef itk::CovariantVector< ComponentType, 2 > | OutputPixelType |
typedef itk::Image< OutputPixelType, 2 > | VectorOutputImageType |
typedef TInputImageType::IndexType | IndexType |
typedef TInputImageType | ImageType |
typedef itk::ImageRegion< 2 > | RegionType |
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 |
calculates the costs for going from p1 to p2 More... | |
double | GetMinCost () override |
returns the minimal costs possible (needed for A*) More... | |
void | Initialize () override |
Initialize the metric. More... | |
virtual void | AddRepulsivePoint (const IndexType &index) |
Add void pixel in cost map. More... | |
virtual void | RemoveRepulsivePoint (const IndexType &index) |
Remove void pixel in cost map. More... | |
virtual void | ClearRepulsivePoints () |
Clear repulsive points in cost function. More... | |
virtual void | SetRequestedRegion (RegionType _arg) |
virtual RegionType | GetRequestedRegion () |
void | SetImage (const TInputImageType *_arg) override |
void | SetDynamicCostMap (std::map< int, int > &costMap) |
void | SetUseCostMap (bool useCostMap) |
void | SetCostMapMaximum (double max) |
Set the maximum of the dynamic cost map to save computation time. More... | |
const UnsignedCharImageType * | GetMaskImage () |
const FloatImageType * | GetGradientMagnitudeImage () |
const FloatImageType * | GetEdgeImage () |
const VectorOutputImageType * | GetGradientImage () |
Public Member Functions inherited from itk::ShortestPathCostFunction< TInputImageType > | |
void | SetStartIndex (const IndexType &index) |
void | SetEndIndex (const IndexType &index) |
Static Public Member Functions | |
static Pointer | New () |
static double | Gaussian (double x, double xOfGaussian, double yOfGaussian) |
Returns the y value of gaussian with given offset and amplitude. More... | |
Protected Member Functions | |
ShortestPathCostFunctionLiveWire () | |
~ShortestPathCostFunctionLiveWire () override | |
Protected Member Functions inherited from itk::ShortestPathCostFunction< TInputImageType > | |
ShortestPathCostFunction () | |
~ShortestPathCostFunction () override | |
void | PrintSelf (std::ostream &os, Indent indent) const override |
Protected Attributes | |
FloatImageType::Pointer | m_GradientMagnitudeImage |
FloatImageType::Pointer | m_EdgeImage |
UnsignedCharImageType::Pointer | m_MaskImage |
VectorOutputImageType::Pointer | m_GradientImage |
double | m_MinCosts |
bool | m_UseRepulsivePoints |
Superclass::PixelType | val |
Superclass::PixelType | startValue |
Superclass::PixelType | endValue |
double | m_GradientMax |
RegionType | m_RequestedRegion |
bool | m_Initialized |
std::map< int, int > | m_CostMap |
bool | m_UseCostMap |
double | m_MaxMapCosts |
Protected Attributes inherited from itk::ShortestPathCostFunction< TInputImageType > | |
ImageConstPointer | m_Image |
IndexType | m_StartIndex |
IndexType | m_EndIndex |
Cost function for LiveWire purposes. Specific features are considered to calculate cummulative costs of a link between two pixels. These are:
By default the Gradient Magnitude is mapped linearly to cost values between 0 (good) and 1 (bad). Via SetDynamicCostMap( std::map< int, int > &costMap) a cost map can be set to dynamically map Gradient Magnitude (non linear). Thus, lower values can be considered with lower costs than higher values of gradient magnitudes. To compute the costs of the gradient magnitude dynamically an iverted map of the histogram of gradient magnitude image is used.
Definition at line 40 of file itkShortestPathCostFunctionLiveWire.h.
typedef float itk::ShortestPathCostFunctionLiveWire< TInputImageType >::ComponentType |
Definition at line 60 of file itkShortestPathCostFunctionLiveWire.h.
typedef itk::ImageRegionConstIterator<TInputImageType> itk::ShortestPathCostFunctionLiveWire< TInputImageType >::ConstIteratorType |
Definition at line 48 of file itkShortestPathCostFunctionLiveWire.h.
typedef SmartPointer<const Self> itk::ShortestPathCostFunctionLiveWire< TInputImageType >::ConstPointer |
Definition at line 47 of file itkShortestPathCostFunctionLiveWire.h.
typedef itk::Image<float, 2> itk::ShortestPathCostFunctionLiveWire< TInputImageType >::FloatImageType |
Definition at line 58 of file itkShortestPathCostFunctionLiveWire.h.
typedef TInputImageType itk::ShortestPathCostFunctionLiveWire< TInputImageType >::ImageType |
Definition at line 65 of file itkShortestPathCostFunctionLiveWire.h.
typedef TInputImageType::IndexType itk::ShortestPathCostFunctionLiveWire< TInputImageType >::IndexType |
Definition at line 64 of file itkShortestPathCostFunctionLiveWire.h.
typedef itk::CovariantVector<ComponentType, 2> itk::ShortestPathCostFunctionLiveWire< TInputImageType >::OutputPixelType |
Definition at line 61 of file itkShortestPathCostFunctionLiveWire.h.
typedef SmartPointer<Self> itk::ShortestPathCostFunctionLiveWire< TInputImageType >::Pointer |
Definition at line 46 of file itkShortestPathCostFunctionLiveWire.h.
typedef itk::ImageRegion<2> itk::ShortestPathCostFunctionLiveWire< TInputImageType >::RegionType |
Definition at line 66 of file itkShortestPathCostFunctionLiveWire.h.
typedef ShortestPathCostFunctionLiveWire itk::ShortestPathCostFunctionLiveWire< TInputImageType >::Self |
Standard class typedefs.
Definition at line 44 of file itkShortestPathCostFunctionLiveWire.h.
typedef ShortestPathCostFunction<TInputImageType> itk::ShortestPathCostFunctionLiveWire< TInputImageType >::Superclass |
Definition at line 45 of file itkShortestPathCostFunctionLiveWire.h.
typedef itk::Image<unsigned char, 2> itk::ShortestPathCostFunctionLiveWire< TInputImageType >::UnsignedCharImageType |
Definition at line 55 of file itkShortestPathCostFunctionLiveWire.h.
typedef itk::Image<OutputPixelType, 2> itk::ShortestPathCostFunctionLiveWire< TInputImageType >::VectorOutputImageType |
Definition at line 62 of file itkShortestPathCostFunctionLiveWire.h.
enum itk::ShortestPathCostFunctionLiveWire::Constants |
Enumerator | |
---|---|
MAPSCALEFACTOR |
Definition at line 104 of file itkShortestPathCostFunctionLiveWire.h.
|
protected |
|
inlineoverrideprotected |
Definition at line 127 of file itkShortestPathCostFunctionLiveWire.h.
|
virtual |
Add void pixel in cost map.
|
virtual |
Clear repulsive points in cost function.
Pointer itk::ShortestPathCostFunctionLiveWire< TInputImageType >::Clone | ( | ) | const |
|
static |
Returns the y value of gaussian with given offset and amplitude.
gaussian approximation f(x) = v(bin) * e^ ( -1/2 * (|x-k(bin)| / sigma)^2 )
x | |
xOfGaussian | - offset |
yOfGaussian | - amplitude |
|
virtual |
Run-time type information (and related methods).
Reimplemented from itk::ShortestPathCostFunction< TInputImageType >.
|
overridevirtual |
calculates the costs for going from p1 to p2
Implements itk::ShortestPathCostFunction< TInputImageType >.
|
inline |
Definition at line 122 of file itkShortestPathCostFunctionLiveWire.h.
|
inline |
Definition at line 123 of file itkShortestPathCostFunctionLiveWire.h.
|
inline |
Definition at line 121 of file itkShortestPathCostFunctionLiveWire.h.
|
inline |
Definition at line 120 of file itkShortestPathCostFunctionLiveWire.h.
|
overridevirtual |
returns the minimal costs possible (needed for A*)
Implements itk::ShortestPathCostFunction< TInputImageType >.
|
virtual |
|
overridevirtual |
Initialize the metric.
Implements itk::ShortestPathCostFunction< TInputImageType >.
|
static |
Method for creation through the object factory.
|
virtual |
Remove void pixel in cost map.
|
inline |
Set the maximum of the dynamic cost map to save computation time.
Definition at line 103 of file itkShortestPathCostFunctionLiveWire.h.
|
inline |
Definition at line 91 of file itkShortestPathCostFunctionLiveWire.h.
|
overridevirtual |
Reimplemented from itk::ShortestPathCostFunction< TInputImageType >.
|
virtual |
|
inline |
Definition at line 99 of file itkShortestPathCostFunctionLiveWire.h.
|
protected |
Definition at line 141 of file itkShortestPathCostFunctionLiveWire.h.
|
protected |
Definition at line 149 of file itkShortestPathCostFunctionLiveWire.h.
|
protected |
Definition at line 130 of file itkShortestPathCostFunctionLiveWire.h.
|
protected |
Definition at line 132 of file itkShortestPathCostFunctionLiveWire.h.
|
protected |
Definition at line 127 of file itkShortestPathCostFunctionLiveWire.h.
|
protected |
Definition at line 143 of file itkShortestPathCostFunctionLiveWire.h.
|
protected |
Definition at line 147 of file itkShortestPathCostFunctionLiveWire.h.
|
protected |
Definition at line 131 of file itkShortestPathCostFunctionLiveWire.h.
|
protected |
Definition at line 153 of file itkShortestPathCostFunctionLiveWire.h.
|
protected |
Definition at line 134 of file itkShortestPathCostFunctionLiveWire.h.
|
protected |
Definition at line 145 of file itkShortestPathCostFunctionLiveWire.h.
|
protected |
Definition at line 151 of file itkShortestPathCostFunctionLiveWire.h.
|
protected |
Definition at line 136 of file itkShortestPathCostFunctionLiveWire.h.
|
protected |
Definition at line 140 of file itkShortestPathCostFunctionLiveWire.h.
|
protected |
Definition at line 138 of file itkShortestPathCostFunctionLiveWire.h.