PlusLib  2.9.0
Software library for tracked ultrasound image acquisition, calibration, and processing.
List of all members | Public Member Functions | Static Public Member Functions | Protected Attributes
PlusFidLabeling Class Reference

#include <src/PlusCalibration/PatternLocAlgo/PlusFidLabeling.h>

Public Member Functions

void Clear ()
 
double ComputeDistancePointLine (PlusFidDot &dot, PlusFidLine &line)
 
double ComputeShift (PlusFidLine &line1, PlusFidLine &line2)
 
double ComputeSlope (PlusFidLine &line)
 
void FindPattern ()
 
bool GetDotsFound ()
 
std::vector< PlusFidDot > & GetDotsVector ()
 
std::vector< std::vector< double > > GetFoundDotsCoordinateValue ()
 
std::vector< PlusFidLine > & GetFoundLinesVector ()
 
std::vector< std::vector< PlusFidLine > > GetLinesVector ()
 
double GetMaxLineShiftMm ()
 
double GetPatternIntensity ()
 
std::vector< PlusFidPattern * > & GetPatterns ()
 
 PlusFidLabeling ()
 
PlusStatus ReadConfiguration (vtkXMLDataElement *rootConfigElement, double minThetaRad, double maxThetaRad)
 
void SetAngleToleranceDeg (double value)
 
void SetAngleToleranceDegrees (double angleToleranceDegrees)
 
void SetApproximateSpacingMmPerPixel (double value)
 
void SetDotsFound (bool value)
 
void SetDotsVector (std::vector< PlusFidDot > &value)
 
void SetFrameSize (const FrameSizeType &frameSize)
 
void SetInclinedLineAngleDegrees (double inclinedLineAngleDegrees)
 
void SetLinesVector (std::vector< std::vector< PlusFidLine > > &value)
 
void SetMaxAngleDifferenceDegrees (double value)
 
void SetMaxLinePairDistanceErrorPercent (double value)
 
void SetMaxLineShiftMm (double aValue)
 
void SetMaxThetaDeg (double value)
 
void SetMinThetaDeg (double value)
 
void SetPatterns (const std::vector< PlusFidPattern * > &value)
 
PlusFidLine SortPointsByDistanceFromStartPoint (PlusFidLine &fiducials)
 
void SortRightToLeft (PlusFidLine &line)
 
void UpdateCirsResults (const PlusFidLine &resultLine1, const PlusFidLine &resultLine2, const PlusFidLine &resultLine3)
 
void UpdateNWiresResults (std::vector< PlusFidLine * > &resultLines)
 
void UpdateParameters ()
 
virtual ~PlusFidLabeling ()
 

Static Public Member Functions

static bool SortCompare (const std::vector< double > &temporaryLine1, const std::vector< double > &temporaryLine2)
 

Protected Attributes

double m_AngleToleranceRad
 
double m_ApproximateSpacingMmPerPixel
 
bool m_DotsFound
 
std::vector< PlusFidDotm_DotsVector
 
std::vector< std::vector< double > > m_FoundDotsCoordinateValue
 
std::vector< PlusFidLinem_FoundLines
 
std::array< unsigned int, 3 > m_FrameSize
 
double m_InclinedLineAngleRad
 
std::vector< std::vector< PlusFidLine > > m_LinesVector
 
double m_MaxAngleDiff
 
double m_MaxLinePairAngleRad
 
double m_MaxLinePairDistanceErrorPercent
 
double m_MaxLinePairDistMm
 
double m_MaxLineShiftMm
 
double m_MaxThetaRad
 
double m_MinLinePairAngleRad
 
double m_MinLinePairDistMm
 
double m_MinThetaRad
 
double m_PatternIntensity
 
std::vector< PlusFidPattern * > m_Patterns
 
std::vector< PlusLabelingResultsm_Results
 

Detailed Description

Definition at line 36 of file PlusFidLabeling.h.

Constructor & Destructor Documentation

◆ PlusFidLabeling()

PlusFidLabeling::PlusFidLabeling ( )

Definition at line 21 of file PlusFidLabeling.cxx.

◆ ~PlusFidLabeling()

PlusFidLabeling::~PlusFidLabeling ( )
virtual

Definition at line 43 of file PlusFidLabeling.cxx.

Member Function Documentation

◆ Clear()

void PlusFidLabeling::Clear ( )

Clear the member attributes when not needed anymore

Definition at line 172 of file PlusFidLabeling.cxx.

◆ ComputeDistancePointLine()

double PlusFidLabeling::ComputeDistancePointLine ( PlusFidDot dot,
PlusFidLine line 
)

Compute the shortest distance from a point: dot, to a line: line

Definition at line 293 of file PlusFidLabeling.cxx.

◆ ComputeShift()

double PlusFidLabeling::ComputeShift ( PlusFidLine line1,
PlusFidLine line2 
)

Compute the shift between the middle of line1 and line2

Definition at line 313 of file PlusFidLabeling.cxx.

◆ ComputeSlope()

double PlusFidLabeling::ComputeSlope ( PlusFidLine line)

Compute the slope of the line relative to the x-axis

Definition at line 255 of file PlusFidLabeling.cxx.

◆ FindPattern()

void PlusFidLabeling::FindPattern ( )

Find the patterns defined by the configuration file

Definition at line 450 of file PlusFidLabeling.cxx.

◆ GetDotsFound()

bool PlusFidLabeling::GetDotsFound ( )
inline

Get a boolean value that is true if the algorithm is successful and the correct dots are found, false otherwise

Definition at line 110 of file PlusFidLabeling.h.

◆ GetDotsVector()

std::vector<PlusFidDot>& PlusFidLabeling::GetDotsVector ( )
inline

Get the vector of dots found by FidSegmentation

Definition at line 86 of file PlusFidLabeling.h.

◆ GetFoundDotsCoordinateValue()

std::vector<std::vector<double> > PlusFidLabeling::GetFoundDotsCoordinateValue ( )
inline

Get the coordinates of the found dots

Definition at line 113 of file PlusFidLabeling.h.

◆ GetFoundLinesVector()

std::vector<PlusFidLine>& PlusFidLabeling::GetFoundLinesVector ( )
inline

Get the vector of the identified lines

Definition at line 92 of file PlusFidLabeling.h.

◆ GetLinesVector()

std::vector<std::vector<PlusFidLine> > PlusFidLabeling::GetLinesVector ( )
inline

Get the vector of lines found by FidLineFinder

Definition at line 116 of file PlusFidLabeling.h.

◆ GetMaxLineShiftMm()

double PlusFidLabeling::GetMaxLineShiftMm ( )

Get the maximum line shift, in mm

Definition at line 691 of file PlusFidLabeling.cxx.

◆ GetPatternIntensity()

double PlusFidLabeling::GetPatternIntensity ( )
inline

Get the intensity of a pair of lines

Definition at line 104 of file PlusFidLabeling.h.

◆ GetPatterns()

std::vector< PlusFidPattern * > & PlusFidLabeling::GetPatterns ( )

Get the pattern structure vector, this defines the patterns that the algorithm finds

Definition at line 249 of file PlusFidLabeling.cxx.

◆ ReadConfiguration()

PlusStatus PlusFidLabeling::ReadConfiguration ( vtkXMLDataElement *  rootConfigElement,
double  minThetaRad,
double  maxThetaRad 
)

Read the configuration file from a vtk XML data element

Definition at line 134 of file PlusFidLabeling.cxx.

◆ SetAngleToleranceDeg()

void PlusFidLabeling::SetAngleToleranceDeg ( double  value)

Set the angle tolerance on the angle between two lines, in degrees

Definition at line 208 of file PlusFidLabeling.cxx.

◆ SetAngleToleranceDegrees()

void PlusFidLabeling::SetAngleToleranceDegrees ( double  angleToleranceDegrees)

Definition at line 697 of file PlusFidLabeling.cxx.

◆ SetApproximateSpacingMmPerPixel()

void PlusFidLabeling::SetApproximateSpacingMmPerPixel ( double  value)
inline

Set the approximate spacing in Mm per pixel

Definition at line 119 of file PlusFidLabeling.h.

◆ SetDotsFound()

void PlusFidLabeling::SetDotsFound ( bool  value)
inline

Set to true if the algorithm is successful and the correct dots are found, false otherwise

Definition at line 107 of file PlusFidLabeling.h.

◆ SetDotsVector()

void PlusFidLabeling::SetDotsVector ( std::vector< PlusFidDot > &  value)
inline

Set the vector of dots found by FidSegmentation

Definition at line 89 of file PlusFidLabeling.h.

◆ SetFrameSize()

void PlusFidLabeling::SetFrameSize ( const FrameSizeType &  frameSize)

Set the size of the frame as an array

Definition at line 187 of file PlusFidLabeling.cxx.

◆ SetInclinedLineAngleDegrees()

void PlusFidLabeling::SetInclinedLineAngleDegrees ( double  inclinedLineAngleDegrees)

Definition at line 703 of file PlusFidLabeling.cxx.

◆ SetLinesVector()

void PlusFidLabeling::SetLinesVector ( std::vector< std::vector< PlusFidLine > > &  value)
inline

Set the vector of lines found by FidLineFinder

Definition at line 95 of file PlusFidLabeling.h.

◆ SetMaxAngleDifferenceDegrees()

void PlusFidLabeling::SetMaxAngleDifferenceDegrees ( double  value)
inline

Set the maximum angle allowed between two lines, in degree

Definition at line 125 of file PlusFidLabeling.h.

◆ SetMaxLinePairDistanceErrorPercent()

void PlusFidLabeling::SetMaxLinePairDistanceErrorPercent ( double  value)
inline

Set the tolerance on the maximum distance between 2 lines, in percent

Definition at line 122 of file PlusFidLabeling.h.

◆ SetMaxLineShiftMm()

void PlusFidLabeling::SetMaxLineShiftMm ( double  aValue)

Set the maximum line shift, in mm

Definition at line 685 of file PlusFidLabeling.cxx.

◆ SetMaxThetaDeg()

void PlusFidLabeling::SetMaxThetaDeg ( double  value)

Set the maximum angle allowed for a line, in degrees

Definition at line 679 of file PlusFidLabeling.cxx.

◆ SetMinThetaDeg()

void PlusFidLabeling::SetMinThetaDeg ( double  value)

Set the minimum angle allowed for a line, in degrees

Definition at line 673 of file PlusFidLabeling.cxx.

◆ SetPatterns()

void PlusFidLabeling::SetPatterns ( const std::vector< PlusFidPattern * > &  value)
inline

Set the pattern structure vector, this defines the patterns that the algorithm finds

Definition at line 101 of file PlusFidLabeling.h.

◆ SortCompare()

bool PlusFidLabeling::SortCompare ( const std::vector< double > &  temporaryLine1,
const std::vector< double > &  temporaryLine2 
)
static

Sort the points of a line, used for sorting the points by distance from StartPoint

Definition at line 214 of file PlusFidLabeling.cxx.

◆ SortPointsByDistanceFromStartPoint()

PlusFidLine PlusFidLabeling::SortPointsByDistanceFromStartPoint ( PlusFidLine fiducials)

Sort points of a line by their distance from the start point of the line

Definition at line 221 of file PlusFidLabeling.cxx.

◆ SortRightToLeft()

void PlusFidLabeling::SortRightToLeft ( PlusFidLine line)

Sort the points of a line from right to left

Definition at line 653 of file PlusFidLabeling.cxx.

◆ UpdateCirsResults()

void PlusFidLabeling::UpdateCirsResults ( const PlusFidLine resultLine1,
const PlusFidLine resultLine2,
const PlusFidLine resultLine3 
)

Update the CIRS phantom model 45 results once the pattern has been found, the order of the lines is: resultLine1: left-most, resultLine2: diagonal, resultLine3: right-most

Definition at line 388 of file PlusFidLabeling.cxx.

◆ UpdateNWiresResults()

void PlusFidLabeling::UpdateNWiresResults ( std::vector< PlusFidLine * > &  resultLines)

Update the NWires results once the pattern has been found

Parameters
resultLinesFound lines in ascending order of their StartPoint's Y coordinate (top line is first, bottom line is last)

Definition at line 349 of file PlusFidLabeling.cxx.

◆ UpdateParameters()

void PlusFidLabeling::UpdateParameters ( )

Update the parameters and computes the distance between 2 lines from the phantom definition file

Definition at line 48 of file PlusFidLabeling.cxx.

Member Data Documentation

◆ m_AngleToleranceRad

double PlusFidLabeling::m_AngleToleranceRad
protected

Definition at line 162 of file PlusFidLabeling.h.

◆ m_ApproximateSpacingMmPerPixel

double PlusFidLabeling::m_ApproximateSpacingMmPerPixel
protected

Definition at line 149 of file PlusFidLabeling.h.

◆ m_DotsFound

bool PlusFidLabeling::m_DotsFound
protected

Definition at line 160 of file PlusFidLabeling.h.

◆ m_DotsVector

std::vector<PlusFidDot> PlusFidLabeling::m_DotsVector
protected

Definition at line 166 of file PlusFidLabeling.h.

◆ m_FoundDotsCoordinateValue

std::vector< std::vector<double> > PlusFidLabeling::m_FoundDotsCoordinateValue
protected

Definition at line 171 of file PlusFidLabeling.h.

◆ m_FoundLines

std::vector<PlusFidLine> PlusFidLabeling::m_FoundLines
protected

Definition at line 167 of file PlusFidLabeling.h.

◆ m_FrameSize

std::array<unsigned int, 3> PlusFidLabeling::m_FrameSize
protected

Definition at line 147 of file PlusFidLabeling.h.

◆ m_InclinedLineAngleRad

double PlusFidLabeling::m_InclinedLineAngleRad
protected

Definition at line 163 of file PlusFidLabeling.h.

◆ m_LinesVector

std::vector< std::vector<PlusFidLine> > PlusFidLabeling::m_LinesVector
protected

Definition at line 170 of file PlusFidLabeling.h.

◆ m_MaxAngleDiff

double PlusFidLabeling::m_MaxAngleDiff
protected

Definition at line 150 of file PlusFidLabeling.h.

◆ m_MaxLinePairAngleRad

double PlusFidLabeling::m_MaxLinePairAngleRad
protected

Definition at line 154 of file PlusFidLabeling.h.

◆ m_MaxLinePairDistanceErrorPercent

double PlusFidLabeling::m_MaxLinePairDistanceErrorPercent
protected

Definition at line 156 of file PlusFidLabeling.h.

◆ m_MaxLinePairDistMm

double PlusFidLabeling::m_MaxLinePairDistMm
protected

Definition at line 152 of file PlusFidLabeling.h.

◆ m_MaxLineShiftMm

double PlusFidLabeling::m_MaxLineShiftMm
protected

Definition at line 155 of file PlusFidLabeling.h.

◆ m_MaxThetaRad

double PlusFidLabeling::m_MaxThetaRad
protected

Definition at line 158 of file PlusFidLabeling.h.

◆ m_MinLinePairAngleRad

double PlusFidLabeling::m_MinLinePairAngleRad
protected

Definition at line 153 of file PlusFidLabeling.h.

◆ m_MinLinePairDistMm

double PlusFidLabeling::m_MinLinePairDistMm
protected

Definition at line 151 of file PlusFidLabeling.h.

◆ m_MinThetaRad

double PlusFidLabeling::m_MinThetaRad
protected

Definition at line 157 of file PlusFidLabeling.h.

◆ m_PatternIntensity

double PlusFidLabeling::m_PatternIntensity
protected

Definition at line 164 of file PlusFidLabeling.h.

◆ m_Patterns

std::vector<PlusFidPattern*> PlusFidLabeling::m_Patterns
protected

Definition at line 168 of file PlusFidLabeling.h.

◆ m_Results

std::vector<PlusLabelingResults> PlusFidLabeling::m_Results
protected

Definition at line 169 of file PlusFidLabeling.h.


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