7 #include "PlusConfigure.h" 23 double angleRad = atan2(
line.GetDirectionVector()[1],
line.GetDirectionVector()[0]);
33 double angleBetweenLines = acos(a[0] *
b[0] + a[1] *
b[1] / sqrt(a[0] * a[0] + a[1] * a[1]) / sqrt(
b[0] *
b[0] +
b[1] *
b[1]));
35 if (angleBetweenLines > vtkMath::Pi() / 2)
37 angleBetweenLines -= vtkMath::Pi();
39 else if (angleBetweenLines < -vtkMath::Pi() / 2)
41 angleBetweenLines += vtkMath::Pi();
44 return fabs(angleBetweenLines);
143 return b1->GetX() > b2->GetX();
292 this->
Wires.push_back(wire);
std::vector< std::vector< double > > FoundDotsCoordinateValue
virtual ~PlusCoplanarParallelWires()
double GetDistanceFrom(PlusFidDot &d)
static bool lessThan(const PlusFidLine &line1, const PlusFidLine &line2)
std::vector< double > DistanceToOriginToleranceMm
These tolerances are in mm.
void SetDotsFound(bool value)
unsigned int GetNumberOfPoints() const
void ResizePoints(int aNewSize)
std::vector< PlusFidWire > Wires
PlusPatternRecognitionResult()
const std::vector< PlusFidDot > & GetCandidateFidValues() const
void AddDistanceToOriginToleranceElementMm(double aElement)
void SetName(const std::string &aName)
int GetEndPointIndex() const
void SetDistanceToOriginElementMm(int index, double aElement)
void SetIntensity(double value)
std::vector< double > DistanceToOriginMm
These distances are in mm.
int GetStartPointIndex() const
Initial rotation matrix b
void SetPoint(int aIndex, int aValue)
std::vector< int > Points
static bool compareLines(const PlusFidLine &line1, const PlusFidLine &line2)
void SetLength(double value)
std::string GetName() const
void SetCandidateFidValues(std::vector< PlusFidDot > value)
std::vector< std::vector< double > > & GetFoundDotsCoordinateValue()
int StartPointIndex
index of start point of the line, all the other line points are towards the positive m_DirectionVecto...
void AddPoint(int aPoint)
double DirectionVector[2]
void AddDistanceToOriginElementMm(double aElement)
int EndPointIndex
Index of the endpoint of the line.
void SetEndPointIndex(int index)
void SetStartPointIndex(int index)
std::vector< PlusFidDot > CandidateFidValues
const std::vector< PlusFidWire > & GetWires() const
const double * GetDirectionVector() const
const char const char * value
void SetFoundDotsCoordinateValue(std::vector< std::vector< double > > value)
double GetDotIntensity() const
void AddWire(const PlusFidWire &wire)
int GetPoint(int aIndex) const
static double ComputeAngleRad(const PlusFidLine &line1)
static bool IntensityLessThan(const PlusFidDot &dot1, const PlusFidDot &dot2)
const std::vector< double > & GetDistanceToOriginMm() const
const std::vector< double > & GetDistanceToOriginToleranceMm() const
void SetDirectionVector(int aIndex, double aValue)
bool operator==(const PlusFidDot &data) const
void SetDistanceToOriginToleranceElementMm(int index, double aElement)
void SetDotIntensity(double value)
static bool PositionLessThan(std::vector< PlusFidDot >::iterator b1, std::vector< PlusFidDot >::iterator b2)
virtual ~PlusFidPattern()
double GetIntensity() const