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

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

Public Member Functions

void Clear ()
 
void FindLines ()
 
std::vector< std::vector< PlusFidLine > > & GetLinesVector ()
 
double GetMaxThetaRad ()
 
double GetMinThetaRad ()
 
std::vector< PlusNWireGetNWires ()
 
std::vector< PlusFidPattern * > & GetPatterns ()
 
 PlusFidLineFinder ()
 
PlusStatus ReadConfiguration (vtkXMLDataElement *rootConfigElement)
 
void SetApproximateSpacingMmPerPixel (double value)
 
void SetCandidateFidValues (const std::vector< PlusFidDot > &value)
 
void SetCollinearPointsMaxDistanceFromLineMm (double value)
 
void SetDotsVector (const std::vector< PlusFidDot > &value)
 
void SetFrameSize (const FrameSizeType &frameSize)
 
void SetImageToPhantomTransform (double *matrixElements)
 
void SetMaxThetaDegrees (double angleDeg)
 
void SetMinThetaDegrees (double angleDeg)
 
void SetPatterns (const std::vector< PlusFidPattern * > &value)
 
virtual ~PlusFidLineFinder ()
 

Protected Member Functions

bool AcceptAngleRad (double angleRad)
 
bool AcceptLine (PlusFidLine &line)
 
double ComputeDistancePointLine (const PlusFidDot &dot, const PlusFidLine &line)
 
void ComputeLine (PlusFidLine &line)
 
void ComputeParameters ()
 
void FindLines2Points ()
 
void FindLinesNPoints ()
 
double * GetImageNormalVectorInPhantomFrameMaximumRotationAngleDeg ()
 
double * GetImageToPhantomTransform ()
 
void SetImageNormalVectorInPhantomFrameMaximumRotationAngleDeg (double *anglesDeg)
 

Static Protected Member Functions

static double ComputeAngleRad (const PlusFidDot &dot1, const PlusFidDot &dot2)
 
static double SegmentLength (const PlusFidDot &dot1, const PlusFidDot &dot2)
 

Protected Attributes

double m_ApproximateSpacingMmPerPixel
 
std::vector< PlusFidDotm_CandidateFidValues
 
double m_CollinearPointsMaxDistanceFromLineMm
 
std::vector< PlusFidDotm_DotsVector
 
FrameSizeType m_FrameSize
 
double m_ImageNormalVectorInPhantomFrameMaximumRotationAngleDeg [6]
 
double m_ImageToPhantomTransform [16]
 
std::vector< std::vector< PlusFidLine > > m_LinesVector
 
double m_MaxLinePairDistanceErrorPercent
 
double m_MaxThetaRad
 
double m_MinThetaRad
 
std::vector< PlusFidPattern * > m_Patterns
 

Detailed Description

Definition at line 23 of file PlusFidLineFinder.h.

Constructor & Destructor Documentation

◆ PlusFidLineFinder()

PlusFidLineFinder::PlusFidLineFinder ( )

Definition at line 22 of file PlusFidLineFinder.cxx.

◆ ~PlusFidLineFinder()

PlusFidLineFinder::~PlusFidLineFinder ( )
virtual

Definition at line 49 of file PlusFidLineFinder.cxx.

Member Function Documentation

◆ AcceptAngleRad()

bool PlusFidLineFinder::AcceptAngleRad ( double  angleRad)
protected

Return true if an angle is in the allowed angle range, false otherwise

Definition at line 632 of file PlusFidLineFinder.cxx.

◆ AcceptLine()

bool PlusFidLineFinder::AcceptLine ( PlusFidLine line)
protected

Return true if a line matches the requirements, false otherwise

Definition at line 666 of file PlusFidLineFinder.cxx.

◆ Clear()

void PlusFidLineFinder::Clear ( )

Clear the member attributes when not needed anymore

Definition at line 617 of file PlusFidLineFinder.cxx.

◆ ComputeAngleRad()

double PlusFidLineFinder::ComputeAngleRad ( const PlusFidDot dot1,
const PlusFidDot dot2 
)
staticprotected

Compute the angle between the line formed by 2 dots and the x-axis, in radian

Definition at line 255 of file PlusFidLineFinder.cxx.

◆ ComputeDistancePointLine()

double PlusFidLineFinder::ComputeDistancePointLine ( const PlusFidDot dot,
const PlusFidLine line 
)
protected

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

Definition at line 412 of file PlusFidLineFinder.cxx.

◆ ComputeLine()

void PlusFidLineFinder::ComputeLine ( PlusFidLine line)
protected

Compute a line, all that is required is a set origin and the dots part of the line. It computes then the line length, the direction vector, the endpoint

Definition at line 275 of file PlusFidLineFinder.cxx.

◆ ComputeParameters()

void PlusFidLineFinder::ComputeParameters ( )
protected

Compute parameters such as the minimum and the maximum angle allowed for one line in the case where the segmentation parameters are to be computed. This allows a better precision and possibly an increase of computation speed.

Definition at line 56 of file PlusFidLineFinder.cxx.

◆ FindLines()

void PlusFidLineFinder::FindLines ( )

Find lines, runs the FindLines2Points and FindLinesNPoints and then sort the lines by intensity

Definition at line 675 of file PlusFidLineFinder.cxx.

◆ FindLines2Points()

void PlusFidLineFinder::FindLines2Points ( )
protected

Find 2-points lines from a list of Dots

Definition at line 433 of file PlusFidLineFinder.cxx.

◆ FindLinesNPoints()

void PlusFidLineFinder::FindLinesNPoints ( )
protected

Find the n-points lines from a list of 2-points lines

Definition at line 489 of file PlusFidLineFinder.cxx.

◆ GetImageNormalVectorInPhantomFrameMaximumRotationAngleDeg()

double* PlusFidLineFinder::GetImageNormalVectorInPhantomFrameMaximumRotationAngleDeg ( )
inlineprotected

Get the maximum rotation vector, this maximum rotation represents the physical limitation of the probe, used for automatic parameters computation

Definition at line 113 of file PlusFidLineFinder.h.

◆ GetImageToPhantomTransform()

double* PlusFidLineFinder::GetImageToPhantomTransform ( )
inlineprotected

Get the image to phantom transform matrix

Definition at line 117 of file PlusFidLineFinder.h.

◆ GetLinesVector()

std::vector< std::vector< PlusFidLine > > & PlusFidLineFinder::GetLinesVector ( )

Get the vector of lines, this vector contains all lines of different number of points that match the criteria

Definition at line 690 of file PlusFidLineFinder.cxx.

◆ GetMaxThetaRad()

double PlusFidLineFinder::GetMaxThetaRad ( )
inline

Get the maximum angle allowed for a line, in radians

Definition at line 63 of file PlusFidLineFinder.h.

◆ GetMinThetaRad()

double PlusFidLineFinder::GetMinThetaRad ( )
inline

Get the minimum angle allowed for a line, in radians

Definition at line 66 of file PlusFidLineFinder.h.

◆ GetNWires()

std::vector< PlusNWire > PlusFidLineFinder::GetNWires ( )

Get the NWires vector, these NWires are extracted from the pattern vector

Definition at line 221 of file PlusFidLineFinder.cxx.

◆ GetPatterns()

std::vector<PlusFidPattern*>& PlusFidLineFinder::GetPatterns ( )
inline

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

Definition at line 69 of file PlusFidLineFinder.h.

◆ ReadConfiguration()

PlusStatus PlusFidLineFinder::ReadConfiguration ( vtkXMLDataElement *  rootConfigElement)

Read the configuration file from a vtk XML data element

Definition at line 182 of file PlusFidLineFinder.cxx.

◆ SegmentLength()

double PlusFidLineFinder::SegmentLength ( const PlusFidDot dot1,
const PlusFidDot dot2 
)
staticprotected

Compute the length of the segment between 2 dots

Definition at line 401 of file PlusFidLineFinder.cxx.

◆ SetApproximateSpacingMmPerPixel()

void PlusFidLineFinder::SetApproximateSpacingMmPerPixel ( double  value)
inline

Set the approximate spacing in Mm per pixel

Definition at line 42 of file PlusFidLineFinder.h.

◆ SetCandidateFidValues()

void PlusFidLineFinder::SetCandidateFidValues ( const std::vector< PlusFidDot > &  value)
inline

Set the values of the candidate fiducials

Definition at line 33 of file PlusFidLineFinder.h.

◆ SetCollinearPointsMaxDistanceFromLineMm()

void PlusFidLineFinder::SetCollinearPointsMaxDistanceFromLineMm ( double  value)
inline

Set the maximum distance from a point to a line when the point is tested to be a point of the line

Definition at line 51 of file PlusFidLineFinder.h.

◆ SetDotsVector()

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

Set the vector of dots that have been found by FidSegmentation

Definition at line 36 of file PlusFidLineFinder.h.

◆ SetFrameSize()

void PlusFidLineFinder::SetFrameSize ( const FrameSizeType &  frameSize)

Set the size of the frame as an array

Definition at line 239 of file PlusFidLineFinder.cxx.

◆ SetImageNormalVectorInPhantomFrameMaximumRotationAngleDeg()

void PlusFidLineFinder::SetImageNormalVectorInPhantomFrameMaximumRotationAngleDeg ( double *  anglesDeg)
protected

Definition at line 717 of file PlusFidLineFinder.cxx.

◆ SetImageToPhantomTransform()

void PlusFidLineFinder::SetImageToPhantomTransform ( double *  matrixElements)

Definition at line 708 of file PlusFidLineFinder.cxx.

◆ SetMaxThetaDegrees()

void PlusFidLineFinder::SetMaxThetaDegrees ( double  angleDeg)

Set the maximum angle allowed for a line, in degrees

Definition at line 702 of file PlusFidLineFinder.cxx.

◆ SetMinThetaDegrees()

void PlusFidLineFinder::SetMinThetaDegrees ( double  angleDeg)

Set the minimum angle allowed for a line, in degrees

Definition at line 696 of file PlusFidLineFinder.cxx.

◆ SetPatterns()

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

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

Definition at line 39 of file PlusFidLineFinder.h.

Member Data Documentation

◆ m_ApproximateSpacingMmPerPixel

double PlusFidLineFinder::m_ApproximateSpacingMmPerPixel
protected

Definition at line 121 of file PlusFidLineFinder.h.

◆ m_CandidateFidValues

std::vector<PlusFidDot> PlusFidLineFinder::m_CandidateFidValues
protected

Definition at line 131 of file PlusFidLineFinder.h.

◆ m_CollinearPointsMaxDistanceFromLineMm

double PlusFidLineFinder::m_CollinearPointsMaxDistanceFromLineMm
protected

Definition at line 127 of file PlusFidLineFinder.h.

◆ m_DotsVector

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

Definition at line 133 of file PlusFidLineFinder.h.

◆ m_FrameSize

FrameSizeType PlusFidLineFinder::m_FrameSize
protected

Definition at line 117 of file PlusFidLineFinder.h.

◆ m_ImageNormalVectorInPhantomFrameMaximumRotationAngleDeg

double PlusFidLineFinder::m_ImageNormalVectorInPhantomFrameMaximumRotationAngleDeg[6]
protected

Definition at line 122 of file PlusFidLineFinder.h.

◆ m_ImageToPhantomTransform

double PlusFidLineFinder::m_ImageToPhantomTransform[16]
protected

Definition at line 123 of file PlusFidLineFinder.h.

◆ m_LinesVector

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

Definition at line 134 of file PlusFidLineFinder.h.

◆ m_MaxLinePairDistanceErrorPercent

double PlusFidLineFinder::m_MaxLinePairDistanceErrorPercent
protected

Definition at line 126 of file PlusFidLineFinder.h.

◆ m_MaxThetaRad

double PlusFidLineFinder::m_MaxThetaRad
protected

Definition at line 129 of file PlusFidLineFinder.h.

◆ m_MinThetaRad

double PlusFidLineFinder::m_MinThetaRad
protected

Definition at line 128 of file PlusFidLineFinder.h.

◆ m_Patterns

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

Definition at line 136 of file PlusFidLineFinder.h.


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