Medical Imaging Interaction Toolkit
2016.11.0
Medical Imaging Interaction Toolkit
|
Descibes a line. More...
#include <mitkLine.h>
Public Member Functions | |
Line () | |
Line (const itk::Point< TCoordRep, NPointDimension > &point, const itk::Vector< TCoordRep, NPointDimension > &direction) | |
Define line by point and direction. More... | |
const itk::Point< TCoordRep, NPointDimension > & | GetPoint () const |
Get start point of the line. More... | |
itk::Point< TCoordRep, NPointDimension > & | GetPoint () |
Get start point of the line. More... | |
const itk::Point< TCoordRep, NPointDimension > | GetPoint (TCoordRep t) const |
Get point on the line with parameter t. More... | |
void | SetPoint (const itk::Point< TCoordRep, NPointDimension > &point1) |
Set/change start point of the line. More... | |
const itk::Vector< TCoordRep, NPointDimension > & | GetDirection () const |
Get the direction vector of the line. More... | |
itk::Vector< TCoordRep, NPointDimension > & | GetDirection () |
Get the direction vector of the line. More... | |
void | SetDirection (const itk::Vector< TCoordRep, NPointDimension > &direction) |
Set the direction vector of the line. More... | |
void | Set (const itk::Point< TCoordRep, NPointDimension > &point, const itk::Vector< TCoordRep, NPointDimension > &direction) |
Define line by point and direction. More... | |
void | SetPoints (const itk::Point< TCoordRep, NPointDimension > &point1, const itk::Point< TCoordRep, NPointDimension > &point2) |
Define line by two points. More... | |
void | SetPoint1 (const itk::Point< TCoordRep, NPointDimension > &point1) |
Set/change start point of the line. More... | |
const itk::Point< TCoordRep, NPointDimension > & | GetPoint1 () const |
Get start point of the line. More... | |
void | SetPoint2 (const itk::Point< TCoordRep, NPointDimension > &point2) |
Set/change end point of the line. More... | |
itk::Point< TCoordRep, NPointDimension > | GetPoint2 () const |
Get end point of the line. More... | |
void | Transform (itk::Transform< TCoordRep, NPointDimension, NPointDimension > &transform) |
Transform the line with a Transform. More... | |
void | Transform (const itk::Matrix< TCoordRep, NPointDimension, NPointDimension > &matrix) |
Transform the line with a matrix. More... | |
double | Distance (const itk::Point< TCoordRep, NPointDimension > &point) const |
Distance of a point from the line. More... | |
itk::Point< TCoordRep, NPointDimension > | Project (const itk::Point< TCoordRep, NPointDimension > &point) const |
Project a point on the line. More... | |
bool | IsPartOfStraightLine (const itk::Point< TCoordRep, NPointDimension > &point) const |
Test if a point is part of the line. More... | |
bool | IsPartOfLine (const itk::Point< TCoordRep, NPointDimension > &point) const |
Test if a point is part of the line (line having infinite length) More... | |
bool | IsParallel (const Line< TCoordRep, NPointDimension > &line) const |
Test if a lines is parallel to this line. More... | |
bool | IsPartOfLine (const Line< TCoordRep, NPointDimension > &line) const |
Test if a line is part of the line (line having infinite length) More... | |
bool | operator== (const Line< TCoordRep, NPointDimension > &line) const |
Test if the two lines are identical. More... | |
const Line< TCoordRep, NPointDimension > & | operator= (const Line< TCoordRep, NPointDimension > &line) |
Set the line by another line. More... | |
bool | operator!= (const Line< TCoordRep, NPointDimension > &line) const |
Test if two lines are not identical. More... | |
Static Public Member Functions | |
static int | RectangleLineIntersection (TCoordRep x1, TCoordRep y1, TCoordRep x2, TCoordRep y2, itk::Point< TCoordRep, 2 > p, itk::Vector< TCoordRep, 2 > d, itk::Point< TCoordRep, 2 > &s1, itk::Point< TCoordRep, 2 > &s2) |
Calculates the intersection points of a straight line in 2D with a rectangle. More... | |
static int | BoxLineIntersection (TCoordRep x1, TCoordRep y1, TCoordRep z1, TCoordRep x2, TCoordRep y2, TCoordRep z2, itk::Point< TCoordRep, 3 > p, itk::Vector< TCoordRep, 3 > d, itk::Point< TCoordRep, 3 > &s1, itk::Point< TCoordRep, 3 > &s2) |
Calculates the intersection points of a straight line in 3D with a box. More... | |
Protected Attributes | |
itk::Point< TCoordRep, NPointDimension > | m_Point |
itk::Vector< TCoordRep, NPointDimension > | m_Direction |
Descibes a line.
Definition at line 32 of file mitkLine.h.
|
inline |
Definition at line 35 of file mitkLine.h.
|
inline |
Define line by point and direction.
Length of direction defines the the length of the line
Definition at line 45 of file mitkLine.h.
|
inlinestatic |
Calculates the intersection points of a straight line in 3D with a box.
x1,y1,z1 | first corner of the box |
x2,y2,z2 | second corner of the box |
p,d | straight line: p point on it, d direction of line |
s1 | first intersection point (valid only if s_num>0) |
s2 | second intersection point (valid only if s_num==2) |
Definition at line 350 of file mitkLine.h.
Referenced by mitk::PlaneGeometryDataMapper2D::CutCrossLineWithReferenceGeometry().
|
inline |
Distance of a point from the line.
Definition at line 147 of file mitkLine.h.
Referenced by mitk::DisplayInteractor::CheckRotationPossible(), mitk::Line< double, 2 >::IsPartOfLine(), and mitk::Line< double, 2 >::IsPartOfStraightLine().
|
inline |
Get the direction vector of the line.
Definition at line 74 of file mitkLine.h.
Referenced by mitk::PlaneGeometry::Angle(), mitk::ClippedSurfaceBoundsCalculator::CalculateIntersectionPoints(), mitk::PlaneGeometryDataMapper2D::CreateVtkCrosshair(), mitk::PlaneGeometryDataMapper2D::CutCrossLineWithPlaneGeometry(), mitk::PlaneGeometryDataMapper2D::CutCrossLineWithReferenceGeometry(), mitk::PlaneGeometry::IntersectionPoint(), mitk::PlaneGeometry::IntersectionPointParam(), mitk::PlaneGeometry::IntersectWithPlane2D(), mitk::Line< double, 2 >::IsParallel(), and mitk::Line< double, 2 >::operator=().
|
inline |
Get the direction vector of the line.
Definition at line 77 of file mitkLine.h.
|
inline |
Get start point of the line.
Definition at line 53 of file mitkLine.h.
Referenced by mitk::PlaneGeometryDataMapper2D::CreateVtkCrosshair(), mitk::PlaneGeometryDataMapper2D::CutCrossLineWithPlaneGeometry(), mitk::PlaneGeometryDataMapper2D::CutCrossLineWithReferenceGeometry(), mitk::PlaneGeometry::IntersectionLine(), mitk::PlaneGeometry::IntersectionPoint(), mitk::PlaneGeometry::IntersectionPointParam(), mitk::PlaneGeometry::IntersectWithPlane2D(), mitk::PlaneGeometry::IsOnPlane(), mitk::Line< double, 2 >::IsPartOfLine(), mitk::Line< double, 2 >::operator=(), and mitk::MeshMapper2D::Paint().
|
inline |
Get start point of the line.
Definition at line 56 of file mitkLine.h.
|
inline |
Get point on the line with parameter t.
Definition at line 61 of file mitkLine.h.
|
inline |
Get start point of the line.
Definition at line 115 of file mitkLine.h.
Referenced by mitk::ClippedSurfaceBoundsCalculator::CalculateIntersectionPoints(), mitk::DisplayInteractor::CheckRotationPossible(), mitk::PlaneGeometryDataMapper2D::CreateVtkCrosshair(), and mitk::Line< double, 2 >::operator==().
|
inline |
Get end point of the line.
Definition at line 121 of file mitkLine.h.
Referenced by mitk::PlaneGeometryDataMapper2D::CreateVtkCrosshair(), mitk::PlaneGeometry::IsOnPlane(), and mitk::Line< double, 2 >::operator==().
|
inline |
Test if a lines is parallel to this line.
Definition at line 205 of file mitkLine.h.
Referenced by mitk::DisplayInteractor::CheckRotationPossible(), and mitk::Line< double, 2 >::IsPartOfLine().
|
inline |
Test if a point is part of the line (line having infinite length)
Definition at line 195 of file mitkLine.h.
|
inline |
Test if a line is part of the line (line having infinite length)
Definition at line 219 of file mitkLine.h.
|
inline |
Test if a point is part of the line.
Length of the direction vector defines the length of the line
Definition at line 176 of file mitkLine.h.
|
inline |
|
inline |
Set the line by another line.
Definition at line 243 of file mitkLine.h.
|
inline |
Test if the two lines are identical.
Start point and direction and length of direction vector must be equal for identical lines.
Definition at line 229 of file mitkLine.h.
|
inline |
Project a point on the line.
Definition at line 156 of file mitkLine.h.
Referenced by mitk::DisplayInteractor::CheckRotationPossible(), and mitk::Line< double, 2 >::Distance().
|
inlinestatic |
Calculates the intersection points of a straight line in 2D with a rectangle.
x1,y1,x2,y2 | rectangle |
p,d | straight line: p point on it, d direction of line |
s1 | first intersection point (valid only if s_num>0) |
s2 | second intersection point (valid only if s_num==2) |
Definition at line 264 of file mitkLine.h.
Referenced by mitk::PlaneGeometryDataMapper2D::CutCrossLineWithPlaneGeometry(), and mitk::PlaneGeometry::IntersectWithPlane2D().
|
inline |
Define line by point and direction.
Length of direction defines the the length of the line
Definition at line 85 of file mitkLine.h.
|
inline |
Set the direction vector of the line.
Definition at line 80 of file mitkLine.h.
Referenced by mitk::PlaneGeometry::IntersectionLine().
|
inline |
Set/change start point of the line.
Definition at line 64 of file mitkLine.h.
|
inline |
Set/change start point of the line.
Definition at line 104 of file mitkLine.h.
|
inline |
Set/change end point of the line.
Definition at line 118 of file mitkLine.h.
|
inline |
Define line by two points.
Definition at line 94 of file mitkLine.h.
Referenced by mitk::PlaneGeometryDataMapper2D::CutCrossLineWithPlaneGeometry(), mitk::PlaneGeometryDataMapper2D::CutCrossLineWithReferenceGeometry(), and mitk::MeshMapper2D::Paint().
|
inline |
Transform the line with a Transform.
Definition at line 130 of file mitkLine.h.
|
inline |
Transform the line with a matrix.
Only the direction will be changed, not the start point.
Definition at line 140 of file mitkLine.h.
|
protected |
Definition at line 410 of file mitkLine.h.
Referenced by mitk::Line< double, 2 >::GetDirection(), mitk::Line< double, 2 >::GetPoint(), mitk::Line< double, 2 >::GetPoint2(), mitk::Line< double, 2 >::IsParallel(), mitk::Line< double, 2 >::IsPartOfStraightLine(), mitk::Line< double, 2 >::Line(), mitk::Line< double, 2 >::operator=(), mitk::Line< double, 2 >::Project(), mitk::Line< double, 2 >::Set(), mitk::Line< double, 2 >::SetDirection(), mitk::Line< double, 2 >::SetPoint(), mitk::Line< double, 2 >::SetPoint1(), mitk::Line< double, 2 >::SetPoint2(), mitk::Line< double, 2 >::SetPoints(), and mitk::Line< double, 2 >::Transform().
|
protected |
Definition at line 409 of file mitkLine.h.
Referenced by mitk::Line< double, 2 >::GetPoint(), mitk::Line< double, 2 >::GetPoint1(), mitk::Line< double, 2 >::GetPoint2(), mitk::Line< double, 2 >::IsPartOfStraightLine(), mitk::Line< double, 2 >::Line(), mitk::Line< double, 2 >::operator=(), mitk::Line< double, 2 >::Project(), mitk::Line< double, 2 >::Set(), mitk::Line< double, 2 >::SetPoint(), mitk::Line< double, 2 >::SetPoint1(), mitk::Line< double, 2 >::SetPoint2(), mitk::Line< double, 2 >::SetPoints(), and mitk::Line< double, 2 >::Transform().