Medical Imaging Interaction Toolkit
2016.11.0
Medical Imaging Interaction Toolkit
|
Describes a two-dimensional, rectangular plane. More...
#include <mitkPlaneGeometry.h>
Public Types | |
enum | PlaneOrientation { Axial, Sagittal, Frontal, None } |
typedef PlaneGeometry | Self |
typedef BaseGeometry | Superclass |
typedef itk::SmartPointer< Self > | Pointer |
typedef itk::SmartPointer< const Self > | ConstPointer |
Public Types inherited from mitk::BaseGeometry | |
typedef BaseGeometry | Self |
typedef itk::Object | Superclass |
typedef itk::SmartPointer< Self > | Pointer |
typedef itk::SmartPointer< const Self > | ConstPointer |
typedef GeometryTransformHolder::TransformType | TransformType |
typedef itk::BoundingBox< unsigned long, 3, ScalarType > | BoundingBoxType |
typedef BoundingBoxType::BoundsArrayType | BoundsArrayType |
typedef BoundingBoxType::Pointer | BoundingBoxPointer |
Public Member Functions | |
virtual std::vector< std::string > | GetClassHierarchy () const override |
virtual const char * | GetClassName () const |
Pointer | Clone () const |
virtual void | IndexToWorld (const Point2D &pt_units, Point2D &pt_mm) const |
virtual void | WorldToIndex (const Point2D &pt_mm, Point2D &pt_units) const |
virtual void | IndexToWorld (const mitk::Point2D &atPt2d_untis, const mitk::Vector2D &vec_units, mitk::Vector2D &vec_mm) const |
Convert (continuous or discrete) index coordinates of a vector vec_units to world coordinates (in mm) More... | |
virtual void | IndexToWorld (const mitk::Vector2D &vec_units, mitk::Vector2D &vec_mm) const |
Convert (continuous or discrete) index coordinates of a vector vec_units to world coordinates (in mm) For further information about coordinates types, please see the Geometry documentation. More... | |
virtual void | WorldToIndex (const mitk::Point2D &atPt2d_mm, const mitk::Vector2D &vec_mm, mitk::Vector2D &vec_units) const |
Convert world coordinates (in mm) of a vector vec_mm to (continuous!) index coordinates. More... | |
virtual void | WorldToIndex (const mitk::Vector2D &vec_mm, mitk::Vector2D &vec_units) const |
Convert world coordinates (in mm) of a vector vec_mm to (continuous!) index coordinates. For further information about coordinates types, please see the Geometry documentation. More... | |
virtual void | InitializeStandardPlane (const BaseGeometry *geometry3D, PlaneOrientation planeorientation=Axial, ScalarType zPosition=0, bool frontside=true, bool rotated=false, bool top=true) |
Initialize a plane with orientation planeorientation (default: axial) with respect to BaseGeometry (default: identity). Spacing also taken from BaseGeometry. More... | |
virtual void | InitializeStandardPlane (const BaseGeometry *geometry3D, bool top, PlaneOrientation planeorientation=Axial, bool frontside=true, bool rotated=false) |
Initialize a plane with orientation planeorientation (default: axial) with respect to BaseGeometry (default: identity). Spacing also taken from BaseGeometry. More... | |
virtual void | InitializeStandardPlane (ScalarType width, ScalarType height, const AffineTransform3D *transform=nullptr, PlaneOrientation planeorientation=Axial, ScalarType zPosition=0, bool frontside=true, bool rotated=false, bool top=true) |
Initialize a plane with orientation planeorientation (default: axial) with respect to transform (default: identity) given width and height in units. More... | |
virtual void | InitializeStandardPlane (ScalarType width, ScalarType height, const Vector3D &spacing, PlaneOrientation planeorientation=Axial, ScalarType zPosition=0, bool frontside=true, bool rotated=false, bool top=true) |
Initialize plane with orientation planeorientation (default: axial) given width, height and spacing. More... | |
virtual void | InitializeStandardPlane (ScalarType width, ScalarType height, const Vector3D &rightVector, const Vector3D &downVector, const Vector3D *spacing=nullptr) |
Initialize plane by width and height in pixels, right-/down-vector (itk) to describe orientation in world-space (vectors will be normalized) and spacing (default: 1.0 mm in all directions). More... | |
virtual void | InitializeStandardPlane (ScalarType width, ScalarType height, const VnlVector &rightVector, const VnlVector &downVector, const Vector3D *spacing=nullptr) |
Initialize plane by width and height in pixels, right-/down-vector (vnl) to describe orientation in world-space (vectors will be normalized) and spacing (default: 1.0 mm in all directions). More... | |
virtual void | InitializeStandardPlane (const Vector3D &rightVector, const Vector3D &downVector, const Vector3D *spacing=nullptr) |
Initialize plane by right-/down-vector (itk) and spacing (default: 1.0 mm in all directions). More... | |
virtual void | InitializeStandardPlane (const VnlVector &rightVector, const VnlVector &downVector, const Vector3D *spacing=nullptr) |
Initialize plane by right-/down-vector (vnl) and spacing (default: 1.0 mm in all directions). More... | |
virtual void | InitializePlane (const Point3D &origin, const Vector3D &normal) |
Initialize plane by origin and normal (size is 1.0 mm in all directions, direction of right-/down-vector valid but undefined). More... | |
void | SetMatrixByVectors (const VnlVector &rightVector, const VnlVector &downVector, ScalarType thickness=1.0) |
Initialize plane by right-/down-vector. More... | |
Vector3D | GetNormal () const |
Normal of the plane. More... | |
VnlVector | GetNormalVnl () const |
Normal of the plane as VnlVector. More... | |
virtual ScalarType | SignedDistance (const Point3D &pt3d_mm) const |
virtual bool | IsAbove (const Point3D &pt3d_mm, bool considerBoundingBox=false) const |
Calculates, whether a point is below or above the plane. There are two different calculation methods, with or without consideration of the bounding box. More... | |
ScalarType | DistanceFromPlane (const Point3D &pt3d_mm) const |
Distance of the point from the plane (bounding-box not considered) More... | |
ScalarType | SignedDistanceFromPlane (const Point3D &pt3d_mm) const |
Signed distance of the point from the plane (bounding-box not considered) More... | |
ScalarType | DistanceFromPlane (const PlaneGeometry *plane) const |
Distance of the plane from another plane (bounding-box not considered) More... | |
ScalarType | SignedDistanceFromPlane (const PlaneGeometry *plane) const |
Signed distance of the plane from another plane (bounding-box not considered) More... | |
bool | IntersectionLine (const PlaneGeometry *plane, Line3D &crossline) const |
Calculate the intersecting line of two planes. More... | |
unsigned int | IntersectWithPlane2D (const PlaneGeometry *plane, Point2D &lineFrom, Point2D &lineTo) const |
Calculate two points where another plane intersects the border of this plane. More... | |
double | Angle (const PlaneGeometry *plane) const |
Calculate the angle between two planes. More... | |
double | Angle (const Line3D &line) const |
Calculate the angle between the plane and a line. More... | |
bool | IntersectionPoint (const Line3D &line, Point3D &intersectionPoint) const |
Calculate intersection point between the plane and a line. More... | |
bool | IntersectionPointParam (const Line3D &line, double &t) const |
Calculate line parameter of intersection point between the plane and a line. More... | |
bool | IsParallel (const PlaneGeometry *plane) const |
Returns whether the plane is parallel to another plane. More... | |
bool | IsOnPlane (const Point3D &point) const |
Returns whether the point is on the plane (bounding-box not considered) More... | |
bool | IsOnPlane (const Line3D &line) const |
Returns whether the line is on the plane (bounding-box not considered) More... | |
bool | IsOnPlane (const PlaneGeometry *plane) const |
Returns whether the plane is on the plane (bounding-box not considered) More... | |
Point3D | ProjectPointOntoPlane (const Point3D &pt) const |
Returns the lot from the point to the plane. More... | |
virtual itk::LightObject::Pointer | InternalClone () const override |
clones the geometry More... | |
virtual void | ExecuteOperation (Operation *operation) override |
virtual bool | Map (const mitk::Point3D &pt3d_mm, mitk::Point2D &pt2d_mm) const |
Project a 3D point given in mm (pt3d_mm) onto the 2D geometry. The result is a 2D point in mm (pt2d_mm). More... | |
virtual void | Map (const mitk::Point2D &pt2d_mm, mitk::Point3D &pt3d_mm) const |
Converts a 2D point given in mm (pt2d_mm) relative to the upper-left corner of the geometry into the corresponding world-coordinate (a 3D point in mm, pt3d_mm). More... | |
virtual void | SetSizeInUnits (mitk::ScalarType width, mitk::ScalarType height) |
Set the width and height of this 2D-geometry in units by calling SetBounds. This does not change the extent in mm! More... | |
virtual bool | Project (const mitk::Point3D &pt3d_mm, mitk::Point3D &projectedPt3d_mm) const |
Project a 3D point given in mm (pt3d_mm) onto the 2D geometry. The result is a 3D point in mm (projectedPt3d_mm). More... | |
virtual bool | Map (const mitk::Point3D &atPt3d_mm, const mitk::Vector3D &vec3d_mm, mitk::Vector2D &vec2d_mm) const |
Project a 3D vector given in mm (vec3d_mm) onto the 2D geometry. The result is a 2D vector in mm (vec2d_mm). More... | |
virtual void | Map (const mitk::Point2D &atPt2d_mm, const mitk::Vector2D &vec2d_mm, mitk::Vector3D &vec3d_mm) const |
Converts a 2D vector given in mm (vec2d_mm) relative to the upper-left corner of the geometry into the corresponding world-coordinate (a 3D vector in mm, vec3d_mm). More... | |
virtual bool | Project (const mitk::Point3D &atPt3d_mm, const mitk::Vector3D &vec3d_mm, mitk::Vector3D &projectedVec3d_mm) const |
Project a 3D vector given in mm (vec3d_mm) onto the 2D geometry. The result is a 3D vector in mm (projectedVec3d_mm). More... | |
virtual bool | Project (const mitk::Vector3D &vec3d_mm, mitk::Vector3D &projectedVec3d_mm) const |
Project a 3D vector given in mm (vec3d_mm) onto the 2D geometry. The result is a 3D vector in mm (projectedVec3d_mm). More... | |
ScalarType | Distance (const Point3D &pt3d_mm) const |
Distance of the point from the geometry (bounding-box not considered) More... | |
void | SetReferenceGeometry (const mitk::BaseGeometry *geometry) |
Set the geometrical frame of reference in which this PlaneGeometry is placed. More... | |
const BaseGeometry * | GetReferenceGeometry () const |
Get the geometrical frame of reference for this PlaneGeometry. More... | |
bool | HasReferenceGeometry () const |
Public Member Functions inherited from mitk::BaseGeometry | |
Pointer | Clone () const |
const Point3D | GetOrigin () const |
Get the origin, e.g. the upper-left corner of the plane. More... | |
void | SetOrigin (const Point3D &origin) |
Set the origin, i.e. the upper-left corner of the plane. More... | |
const mitk::Vector3D | GetSpacing () const |
Get the spacing (size of a pixel). More... | |
void | SetSpacing (const mitk::Vector3D &aSpacing, bool enforceSetSpacing=false) |
Set the spacing (m_Spacing). More... | |
VnlVector | GetOriginVnl () const |
Get the origin as VnlVector. More... | |
virtual unsigned int | GetFrameOfReferenceID () const |
Get the DICOM FrameOfReferenceID referring to the used world coordinate system. More... | |
virtual void | SetFrameOfReferenceID (unsigned int _arg) |
Set the DICOM FrameOfReferenceID referring to the used world coordinate system. More... | |
virtual unsigned long | GetIndexToWorldTransformLastModified () const |
void | Modified () const override |
Overload of function Modified() to prohibit several calls of Modified() using the ModifiedLock class. More... | |
virtual bool | IsValid () const |
Is this BaseGeometry in a state that is valid? More... | |
void | Initialize () |
Initialize the BaseGeometry. More... | |
void | InitializeGeometry (Self *newGeometry) const |
mitk::AffineTransform3D * | GetIndexToWorldTransform () |
Get the transformation used to convert from index to world coordinates. More... | |
const mitk::AffineTransform3D * | GetIndexToWorldTransform () const |
Get the transformation used to convert from index to world coordinates. More... | |
void | SetIndexToWorldTransform (mitk::AffineTransform3D *transform) |
void | SetIndexToWorldTransformByVtkMatrix (vtkMatrix4x4 *vtkmatrix) |
Convenience method for setting the ITK transform (m_IndexToWorldTransform) via an vtkMatrix4x4.The spacing of the new transform is copied to m_spacing. More... | |
void | SetIndexToWorldTransformWithoutChangingSpacing (mitk::AffineTransform3D *transform) |
void | SetIndexToWorldTransformByVtkMatrixWithoutChangingSpacing (vtkMatrix4x4 *vtkmatrix) |
Convenience method for setting the ITK transform (m_IndexToWorldTransform) via an vtkMatrix4x4. This function keeps the original spacing. More... | |
vtkMatrix4x4 * | GetVtkMatrix () |
vtkLinearTransform * | GetVtkTransform () const |
Get the m_IndexToWorldTransform as a vtkLinearTransform. More... | |
void | SetIdentity () |
Set the transform to identity, the spacing to 1 and origin to 0. More... | |
void | Compose (const TransformType *other, bool pre=0) |
Compose new IndexToWorldTransform with a given transform. More... | |
void | Compose (const vtkMatrix4x4 *vtkmatrix, bool pre=0) |
Compose new IndexToWorldTransform with a given vtkMatrix4x4. More... | |
void | Translate (const Vector3D &vector) |
Translate the origin by a vector. More... | |
void | WorldToIndex (const mitk::Point3D &pt_mm, mitk::Point3D &pt_units) const |
Convert world coordinates (in mm) of a point to (continuous!) index coordinates. More... | |
void | WorldToIndex (const mitk::Vector3D &vec_mm, mitk::Vector3D &vec_units) const |
Convert world coordinates (in mm) of a vector vec_mm to (continuous!) index coordinates. For further information about coordinates types, please see the Geometry documentation. More... | |
template<unsigned int VIndexDimension> | |
void | WorldToIndex (const mitk::Point3D &pt_mm, itk::Index< VIndexDimension > &index) const |
Convert world coordinates (in mm) of a point to (discrete!) index coordinates. This method rounds to integer indices! For further information about coordinates types, please see the Geometry documentation. More... | |
void | IndexToWorld (const mitk::Vector3D &vec_units, mitk::Vector3D &vec_mm) const |
Convert (continuous or discrete) index coordinates of a vector vec_units to world coordinates (in mm) For further information about coordinates types, please see the Geometry documentation. More... | |
void | IndexToWorld (const mitk::Point3D &pt_units, mitk::Point3D &pt_mm) const |
Convert (continuous or discrete) index coordinates of a point to world coordinates (in mm) For further information about coordinates types, please see the Geometry documentation. More... | |
template<unsigned int VIndexDimension> | |
void | IndexToWorld (const itk::Index< VIndexDimension > &index, mitk::Point3D &pt_mm) const |
Convert (discrete) index coordinates of a point to world coordinates (in mm) For further information about coordinates types, please see the Geometry documentation. More... | |
void | IndexToWorld (const mitk::Point3D &atPt3d_units, const mitk::Vector3D &vec_units, mitk::Vector3D &vec_mm) const |
Convert (continuous or discrete) index coordinates of a vector vec_units to world coordinates (in mm) More... | |
void | WorldToIndex (const mitk::Point3D &atPt3d_mm, const mitk::Vector3D &vec_mm, mitk::Vector3D &vec_units) const |
Convert world coordinates (in mm) of a vector vec_mm to (continuous!) index coordinates. More... | |
template<class TCoordRep > | |
void | ItkPhysicalPointToWorld (const itk::Point< TCoordRep, 3 > &itkPhysicalPoint, mitk::Point3D &pt_mm) const |
Deprecated for use with ITK version 3.10 or newer. Convert ITK physical coordinates of a point (in mm, but without a rotation) into MITK world coordinates (in mm) More... | |
template<class TCoordRep > | |
void | WorldToItkPhysicalPoint (const mitk::Point3D &pt_mm, itk::Point< TCoordRep, 3 > &itkPhysicalPoint) const |
Deprecated for use with ITK version 3.10 or newer. Convert world coordinates (in mm) of a point to ITK physical coordinates (in mm, but without a possible rotation) More... | |
virtual const BoundingBoxType * | GetBoundingBox () |
const BoundsArrayType | GetBounds () const |
void | SetBounds (const BoundsArrayType &bounds) |
Set the bounding box (in index/unit coordinates) More... | |
void | SetFloatBounds (const float bounds[6]) |
Set the bounding box (in index/unit coordinates) via a float array. More... | |
void | SetFloatBounds (const double bounds[6]) |
Set the bounding box (in index/unit coordinates) via a double array. More... | |
VnlVector | GetMatrixColumn (unsigned int direction) const |
Get a VnlVector along bounding-box in the specified direction, length is spacing. More... | |
mitk::BoundingBox::Pointer | CalculateBoundingBoxRelativeToTransform (const mitk::AffineTransform3D *transform) const |
Calculates a bounding-box around the geometry relative to a coordinate system defined by a transform. More... | |
ScalarType | GetExtent (unsigned int direction) const |
Set the time bounds (in ms) More... | |
ScalarType | GetExtentInMM (int direction) const |
Get the extent of the bounding-box in the specified direction in mm. More... | |
Vector3D | GetAxisVector (unsigned int direction) const |
Get vector along bounding-box in the specified direction in mm. More... | |
virtual bool | Is2DConvertable () |
Checks, if the given geometry can be converted to 2D without information loss e.g. when a 2D image is saved, the matrix is usually cropped to 2x2, and when you load it back to MITK it will be filled with standard values. This function checks, if information would be lost during this procedure. More... | |
Point3D | GetCenter () const |
Get the center of the bounding-box in mm. More... | |
double | GetDiagonalLength2 () const |
Get the squared length of the diagonal of the bounding-box in mm. More... | |
double | GetDiagonalLength () const |
Get the length of the diagonal of the bounding-box in mm. More... | |
Point3D | GetCornerPoint (int id) const |
Get the position of the corner number id (in world coordinates) More... | |
Point3D | GetCornerPoint (bool xFront=true, bool yFront=true, bool zFront=true) const |
Get the position of a corner (in world coordinates) More... | |
void | SetExtentInMM (int direction, ScalarType extentInMM) |
Set the extent of the bounding-box in the specified direction in mm. More... | |
bool | IsInside (const mitk::Point3D &p) const |
Test whether the point p (world coordinates in mm) is inside the bounding box. More... | |
bool | IsIndexInside (const mitk::Point3D &index) const |
Test whether the point p ((continous!)index coordinates in units) is inside the bounding box. More... | |
template<unsigned int VIndexDimension> | |
bool | IsIndexInside (const itk::Index< VIndexDimension > &index) const |
Convenience method for working with ITK indices. More... | |
virtual void | ChangeImageGeometryConsideringOriginOffset (const bool isAnImageGeometry) |
When switching from an Image Geometry to a normal Geometry (and the other way around), you have to. More... | |
virtual bool | GetImageGeometry () const |
Is this an ImageGeometry? More... | |
virtual void | SetImageGeometry (bool _arg) |
Define that this BaseGeometry is refering to an Image. More... | |
virtual void | ImageGeometryOn () |
virtual void | ImageGeometryOff () |
const GeometryTransformHolder * | GetGeometryTransformHolder () const |
Public Member Functions inherited from mitk::OperationActor | |
itkTypeMacroNoParent (OperationActor) virtual ~OperationActor() | |
Static Public Member Functions | |
static const char * | GetStaticNameOfClass () |
static Pointer | New () |
static void | EnsurePerpendicularNormal (AffineTransform3D *transform) |
Change transform so that the third column of the transform-martix is perpendicular to the first two columns. More... | |
Static Public Member Functions inherited from mitk::BaseGeometry | |
static const char * | GetStaticNameOfClass () |
Protected Member Functions | |
PlaneGeometry () | |
PlaneGeometry (const PlaneGeometry &other) | |
virtual | ~PlaneGeometry () |
virtual void | PrintSelf (std::ostream &os, itk::Indent indent) const override |
virtual void | PreSetSpacing (const mitk::Vector3D &aSpacing) override |
PreSetSpacing. More... | |
virtual void | CheckBounds (const BoundsArrayType &bounds) override |
CheckBounds. More... | |
virtual void | CheckIndexToWorldTransform (mitk::AffineTransform3D *transform) override |
CheckIndexToWorldTransform. More... | |
Protected Member Functions inherited from mitk::BaseGeometry | |
BaseGeometry () | |
BaseGeometry (const BaseGeometry &other) | |
virtual | ~BaseGeometry () |
virtual unsigned int | GetNDimensions () const |
bool | IsBoundingBoxNull () const |
bool | IsIndexToWorldTransformNull () const |
void | SetVtkMatrixDeepCopy (vtkTransform *vtktransform) |
void | _SetSpacing (const mitk::Vector3D &aSpacing, bool enforceSetSpacing=false) |
Protected Attributes | |
const mitk::BaseGeometry * | m_ReferenceGeometry |
Additional Inherited Members | |
Static Protected Member Functions inherited from mitk::BaseGeometry | |
static const std::string | GetTransformAsString (TransformType *transformType) |
Describes a two-dimensional, rectangular plane.
Definition at line 80 of file mitkPlaneGeometry.h.
typedef itk::SmartPointer<const Self> mitk::PlaneGeometry::ConstPointer |
Definition at line 83 of file mitkPlaneGeometry.h.
Definition at line 83 of file mitkPlaneGeometry.h.
Definition at line 83 of file mitkPlaneGeometry.h.
Definition at line 83 of file mitkPlaneGeometry.h.
|
protected |
Definition at line 30 of file mitkPlaneGeometry.cpp.
References mitk::BaseGeometry::Initialize().
Referenced by InternalClone().
|
protected |
Definition at line 32 of file mitkPlaneGeometry.cpp.
|
protectedvirtual |
Definition at line 31 of file mitkPlaneGeometry.cpp.
double mitk::PlaneGeometry::Angle | ( | const PlaneGeometry * | plane | ) | const |
Calculate the angle between two planes.
Definition at line 712 of file mitkPlaneGeometry.cpp.
References mitk::BaseGeometry::GetMatrixColumn().
Referenced by IsParallel().
double mitk::PlaneGeometry::Angle | ( | const Line3D & | line | ) | const |
Calculate the angle between the plane and a line.
Definition at line 717 of file mitkPlaneGeometry.cpp.
References mitk::Line< TCoordRep, NPointDimension >::GetDirection(), and mitk::BaseGeometry::GetMatrixColumn().
|
overrideprotectedvirtual |
CheckBounds.
This function is called in SetBounds. Assertions can be implemented in this function (see PlaneGeometry.cpp). If you implement this function in a subclass, make sure, that all classes were your class inherits from have an implementation of CheckBounds (e.g. inheritance BaseGeometry <- A <- B. Implementation of CheckBounds in class B needs implementation in A as
Reimplemented from mitk::BaseGeometry.
Definition at line 107 of file mitkPlaneGeometry.cpp.
|
overrideprotectedvirtual |
CheckIndexToWorldTransform.
This function is called in SetIndexToWorldTransform. Assertions can be implemented in this function (see
Reimplemented from mitk::BaseGeometry.
Definition at line 102 of file mitkPlaneGeometry.cpp.
References EnsurePerpendicularNormal().
Pointer mitk::PlaneGeometry::Clone | ( | ) | const |
Referenced by QmitkSliceBasedInterpolatorWidget::AcceptAllInterpolations(), QmitkSlicesInterpolator::AcceptAllInterpolations(), mitk::SlicedGeometry3D::GetPlaneGeometry(), mitk::Image::Initialize(), mitk::SliceBasedInterpolationController::Interpolate(), mitk::SegmentationInterpolationController::Interpolate(), mitk::FastMarchingTool::OnAddPoint(), mitk::LiveWireTool2D::OnFinish(), and mitk::AbstractTransformGeometry::SetPlane().
|
inline |
Distance of the point from the geometry (bounding-box not considered)
Definition at line 542 of file mitkPlaneGeometry.h.
Referenced by mitk::ClippedSurfaceBoundsCalculator::CalculateIntersectionPoints(), mitk::PlanarFigureInteractor::CheckFigureOnRenderingGeometry(), mitk::PointSetVtkMapper2D::CreateVTKRenderObjects(), mitk::PlanarFigureInteractor::IsMousePositionAcceptableAsNewControlPoint(), IsOnPlane(), mitk::SliceNavigationController::SelectSliceByPoint(), mitk::PlanarFigureInteractor::TransformObjectToDisplay(), and mitk::PlanarFigureInteractor::TransformPositionEventToPoint2D().
ScalarType mitk::PlaneGeometry::DistanceFromPlane | ( | const Point3D & | pt3d_mm | ) | const |
Distance of the point from the plane (bounding-box not considered)
Definition at line 649 of file mitkPlaneGeometry.cpp.
References SignedDistance().
Referenced by mitk::PlanarFigureMapper2D::Paint().
|
inline |
Distance of the plane from another plane (bounding-box not considered)
Result is 0 if planes are not parallel.
Definition at line 345 of file mitkPlaneGeometry.h.
|
static |
Change transform so that the third column of the transform-martix is perpendicular to the first two columns.
ensure column(2) of indexToWorldTransform-matrix to be perpendicular to plane, keep length and handedness.
If det(matrix)<0, multiply normal vector by (-1) to keep geometry lefthanded.
Check if normal (3. column) was perpendicular: If not, replace with calculated normal vector:
Definition at line 37 of file mitkPlaneGeometry.cpp.
References MITK_DEBUG, and MITK_WARN.
Referenced by CheckIndexToWorldTransform().
|
overridevirtual |
Implements operation to re-orient the plane
Reimplemented from mitk::BaseGeometry.
Definition at line 792 of file mitkPlaneGeometry.cpp.
References mitk::BaseGeometry::ExecuteOperation(), mitk::FillVector3D(), mitk::RestorePlanePositionOperation::GetHeight(), mitk::PlaneOperation::GetNormal(), mitk::Operation::GetOperationType(), mitk::PointOperation::GetPoint(), mitk::RestorePlanePositionOperation::GetTransform(), mitk::BaseGeometry::GetVtkMatrix(), mitk::RestorePlanePositionOperation::GetWidth(), mitk::BaseGeometry::Modified(), mitk::New(), offset, mitk::OpORIENT, mitk::OpRESTOREPLANEPOSITION, mitk::BaseGeometry::SetBounds(), mitk::BaseGeometry::SetIndexToWorldTransform(), and mitk::BaseGeometry::SetVtkMatrixDeepCopy().
|
inlineoverridevirtual |
Reimplemented from mitk::BaseGeometry.
Reimplemented in mitk::AbstractTransformGeometry, mitk::LandmarkProjectorBasedCurvedGeometry, and mitk::ThinPlateSplineCurvedGeometry.
Definition at line 83 of file mitkPlaneGeometry.h.
|
virtual |
Reimplemented from mitk::BaseGeometry.
Reimplemented in mitk::AbstractTransformGeometry, mitk::LandmarkProjectorBasedCurvedGeometry, and mitk::ThinPlateSplineCurvedGeometry.
Vector3D mitk::PlaneGeometry::GetNormal | ( | ) | const |
Normal of the plane.
Definition at line 636 of file mitkPlaneGeometry.cpp.
References mitk::BaseGeometry::GetIndexToWorldTransform().
Referenced by mitk::DisplayInteractor::CheckSwivelPossible(), QmitkTbssRoiAnalysisWidget::CreateTracts(), mitk::PlaneGeometryDataMapper2D::CreateVtkCrosshair(), mitk::ContourModelMapper2D::CreateVtkPolyDataFromContour(), mitk::SegTool2D::DetermineAffectedImageSlice(), mitk::ImageStatisticsCalculator::ExtractImageAndMask(), mitk::ExtrudePlanarFigureFilter::GenerateData(), mitk::ExtractDirectedPlaneImageFilter::GenerateData(), mitk::ExtractSliceFilter::GenerateData(), mitk::SurfaceVtkMapper2D::GenerateDataForRenderer(), mitk::ImageVtkMapper2D::GenerateDataForRenderer(), mitk::DoseImageVtkMapper2D::GenerateDataForRenderer(), mitk::SlicedGeometry3D::GetPlaneGeometry(), IntersectionLine(), IntersectionPoint(), IntersectionPointParam(), PrintSelf(), ProjectPointOntoPlane(), mitk::SlicedGeometry3D::ReinitializePlanes(), mitk::vtkSimulationPolyDataMapper2D::Render(), and mitk::SegTool2D::UpdateSurfaceInterpolation().
VnlVector mitk::PlaneGeometry::GetNormalVnl | ( | ) | const |
Normal of the plane as VnlVector.
Definition at line 644 of file mitkPlaneGeometry.cpp.
References mitk::BaseGeometry::GetIndexToWorldTransform().
Referenced by itk::FibersFromPlanarFiguresFilter::GenerateData(), and ProjectPointOntoPlane().
const mitk::BaseGeometry * mitk::PlaneGeometry::GetReferenceGeometry | ( | ) | const |
Get the geometrical frame of reference for this PlaneGeometry.
Definition at line 982 of file mitkPlaneGeometry.cpp.
References m_ReferenceGeometry.
Referenced by mitk::PlaneGeometryDataMapper2D::CreateVtkCrosshair(), and mitk::PlaneGeometryDataToSurfaceFilter::GenerateOutputInformation().
|
inlinestatic |
Definition at line 83 of file mitkPlaneGeometry.h.
bool mitk::PlaneGeometry::HasReferenceGeometry | ( | ) | const |
Definition at line 983 of file mitkPlaneGeometry.cpp.
References m_ReferenceGeometry.
Referenced by mitk::PlaneGeometryDataMapper2D::CreateVtkCrosshair(), mitk::SurfaceVtkMapper2D::GenerateDataForRenderer(), mitk::RegEvaluationMapper2D::GenerateDataForRenderer(), mitk::ImageVtkMapper2D::GenerateDataForRenderer(), and mitk::DoseImageVtkMapper2D::GenerateDataForRenderer().
Reimplemented in mitk::AbstractTransformGeometry.
Definition at line 122 of file mitkPlaneGeometry.cpp.
References mitk::BaseGeometry::GetExtent(), and mitk::BaseGeometry::GetExtentInMM().
Referenced by mitk::PlaneGeometryDataMapper2D::CutCrossLineWithPlaneGeometry(), IndexToWorld(), and mitk::PartialVolumeAnalysisHistogramCalculator::InternalCalculateMaskFromPlanarFigure().
|
virtual |
Convert (continuous or discrete) index coordinates of a vector vec_units to world coordinates (in mm)
Reimplemented in mitk::AbstractTransformGeometry.
Definition at line 134 of file mitkPlaneGeometry.cpp.
References IndexToWorld(), and MITK_WARN.
|
virtual |
Convert (continuous or discrete) index coordinates of a vector vec_units to world coordinates (in mm) For further information about coordinates types, please see the Geometry documentation.
Reimplemented in mitk::AbstractTransformGeometry.
Definition at line 141 of file mitkPlaneGeometry.cpp.
References mitk::BaseGeometry::GetExtent(), and mitk::BaseGeometry::GetExtentInMM().
|
virtual |
Initialize plane by origin and normal (size is 1.0 mm in all directions, direction of right-/down-vector valid but undefined).
Definition at line 593 of file mitkPlaneGeometry.cpp.
References mitk::Equal(), mitk::FillVector3D(), InitializeStandardPlane(), and mitk::BaseGeometry::SetOrigin().
|
virtual |
Initialize a plane with orientation planeorientation (default: axial) with respect to BaseGeometry (default: identity). Spacing also taken from BaseGeometry.
The index of the sagittal, coronal and axial axes in the reference geometry.
The direction of the sagittal, coronal and axial axes in the reference geometry. +1 means that the direction is straight, i.e. greater index translates to greater world coordinate. -1 means that the direction is inverted.
The "world origin" is the corner with the lowest physical coordinates. We use it as a reference point so that we get the correct anatomical orientations.
The distance of the plane origin from the world origin in voxels.
Orientation 'None' shall be done like the axial plane orientation, for whatever reasons.
Definition at line 382 of file mitkPlaneGeometry.cpp.
References Axial, Frontal, mitk::BaseGeometry::GetExtent(), mitk::BaseGeometry::GetImageGeometry(), mitk::BaseGeometry::GetIndexToWorldTransform(), mitk::BaseGeometry::GetOrigin(), mitk::BaseGeometry::GetSpacing(), mitk::New(), None, offset, Sagittal, mitk::BaseGeometry::SetBounds(), and SetReferenceGeometry().
Referenced by InitializePlane(), and InitializeStandardPlane().
|
virtual |
Initialize a plane with orientation planeorientation (default: axial) with respect to BaseGeometry (default: identity). Spacing also taken from BaseGeometry.
top | if true, create plane at top, otherwise at bottom (for PlaneOrientation Axial, for other plane locations respectively) |
The index of the sagittal, coronal and axial axes in world coordinate system.
Orientation 'None' shall be done like the axial plane orientation, for whatever reasons.
The index of the sagittal, coronal and axial axes in the reference geometry.
Definition at line 485 of file mitkPlaneGeometry.cpp.
References Axial, Frontal, mitk::BaseGeometry::GetExtent(), mitk::BaseGeometry::GetIndexToWorldTransform(), InitializeStandardPlane(), None, and Sagittal.
|
virtual |
Initialize a plane with orientation planeorientation (default: axial) with respect to transform (default: identity) given width and height in units.
Rotated means rotated by 180 degrees (1/2 rotation) within the plane. Rotation by 90 degrees (1/4 rotation) is not implemented as of now.
Frontside/Backside: Viewed from below = frontside in the axial case; (radiologist's view versus neuro-surgeon's view, see: http://www.itk.org/Wiki/images/e/ed/DICOM-OrientationDiagram-Radiologist-vs-NeuroSurgeon.png ) Viewed from front = frontside in the coronal case; Viewed from left = frontside in the sagittal case.
Cave/Caution: Currently only RPI, LAI, LPS and RAS in the three standard planes are covered, i.e. 12 cases of 144: 3 standard planes * 48 coordinate orientations = 144 cases.
construct standard view.
Bottom means downwards, DV means Direction Vector. Both relative to the image!
Origin of this plane is by default a zero vector and implicitly in the top-left corner:
This is different to all definitions in MITK, except the QT mouse clicks. But it is like this here and we don't want to change a running system. Just be aware, that IN THIS FUNCTION we define the origin at the top left (e.g. your screen).
NormalDirection defines which axis (i.e. column index in the transform matrix) is perpendicular to the plane:
Orientation 'None' shall be done like the axial plane orientation, for whatever reasons.
Origin in the top-left corner, x=[1; 0; 0], y=[0; 1; 0], z=[0; 0; 1], origin=[0,0,zpos]: LAI (r.h.)
0—rightDV-—> | | | | Picture of a finite, rectangular plane | | ( insert LOLCAT-scan here ^_^ ) | | | v _________________________________________|
Definition at line 185 of file mitkPlaneGeometry.cpp.
References Axial, mitk::FillVector3D(), Frontal, mitk::BaseGeometry::GetIndexToWorldTransform(), mitk::BaseGeometry::Initialize(), mitk::New(), None, Sagittal, mitk::BaseGeometry::SetBounds(), mitk::BaseGeometry::SetIndexToWorldTransform(), and mitk::BaseGeometry::SetOrigin().
|
virtual |
Initialize plane with orientation planeorientation (default: axial) given width, height and spacing.
Definition at line 160 of file mitkPlaneGeometry.cpp.
References InitializeStandardPlane(), and mitk::New().
|
virtual |
Initialize plane by width and height in pixels, right-/down-vector (itk) to describe orientation in world-space (vectors will be normalized) and spacing (default: 1.0 mm in all directions).
The vectors are normalized and multiplied by the respective spacing before they are set in the matrix.
This overloaded version of InitializeStandardPlane() creates only righthanded coordinate orientations, unless spacing contains 1 or 3 negative entries.
Definition at line 544 of file mitkPlaneGeometry.cpp.
References InitializeStandardPlane().
|
virtual |
Initialize plane by width and height in pixels, right-/down-vector (vnl) to describe orientation in world-space (vectors will be normalized) and spacing (default: 1.0 mm in all directions).
The vectors are normalized and multiplied by the respective spacing before they are set in the matrix.
This overloaded version of InitializeStandardPlane() creates only righthanded coordinate orientations, unless spacing contains 1 or 3 negative entries.
Definition at line 553 of file mitkPlaneGeometry.cpp.
References mitk::BaseGeometry::GetIndexToWorldTransform(), mitk::New(), mitk::BaseGeometry::SetBounds(), and mitk::BaseGeometry::SetIndexToWorldTransform().
|
virtual |
Initialize plane by right-/down-vector (itk) and spacing (default: 1.0 mm in all directions).
The length of the right-/-down-vector is used as width/height in units, respectively. Then, the vectors are normalized and multiplied by the respective spacing before they are set in the matrix.
Definition at line 527 of file mitkPlaneGeometry.cpp.
References InitializeStandardPlane().
|
virtual |
Initialize plane by right-/down-vector (vnl) and spacing (default: 1.0 mm in all directions).
The length of the right-/-down-vector is used as width/height in units, respectively. Then, the vectors are normalized and multiplied by the respective spacing before they are set in the matrix.
Definition at line 534 of file mitkPlaneGeometry.cpp.
References InitializeStandardPlane().
|
overridevirtual |
clones the geometry
Overwrite in all sub-classes. Normally looks like:
Implements mitk::BaseGeometry.
Reimplemented in mitk::AbstractTransformGeometry, mitk::LandmarkProjectorBasedCurvedGeometry, and mitk::ThinPlateSplineCurvedGeometry.
Definition at line 785 of file mitkPlaneGeometry.cpp.
References PlaneGeometry().
bool mitk::PlaneGeometry::IntersectionLine | ( | const PlaneGeometry * | plane, |
Line3D & | crossline | ||
) | const |
Calculate the intersecting line of two planes.
Definition at line 663 of file mitkPlaneGeometry.cpp.
References mitk::eps, GetNormal(), mitk::BaseGeometry::GetOrigin(), mitk::Line< TCoordRep, NPointDimension >::GetPoint(), and mitk::Line< TCoordRep, NPointDimension >::SetDirection().
Referenced by mitk::DisplayInteractor::CheckRotationPossible(), mitk::DisplayInteractor::CheckSwivelPossible(), QmitkBoundingObjectWidget::CreateBoundingObject(), mitk::PlaneGeometryDataMapper2D::CreateVtkCrosshair(), QmlMitkStdMultiItem::getCrossPosition(), QmitkStdMultiWidget::GetCrossPosition(), and IntersectWithPlane2D().
bool mitk::PlaneGeometry::IntersectionPoint | ( | const Line3D & | line, |
Point3D & | intersectionPoint | ||
) | const |
Calculate intersection point between the plane and a line.
intersectionPoint | intersection point |
Definition at line 722 of file mitkPlaneGeometry.cpp.
References mitk::eps, mitk::Line< TCoordRep, NPointDimension >::GetDirection(), GetNormal(), mitk::BaseGeometry::GetOrigin(), and mitk::Line< TCoordRep, NPointDimension >::GetPoint().
Referenced by mitk::ClippedSurfaceBoundsCalculator::CalculateIntersectionPoints(), mitk::DisplayInteractor::CheckRotationPossible(), mitk::DisplayInteractor::CheckSwivelPossible(), QmitkBoundingObjectWidget::CreateBoundingObject(), QmlMitkStdMultiItem::getCrossPosition(), and QmitkStdMultiWidget::GetCrossPosition().
bool mitk::PlaneGeometry::IntersectionPointParam | ( | const Line3D & | line, |
double & | t | ||
) | const |
Calculate line parameter of intersection point between the plane and a line.
t | parameter of line: intersection point is line.GetPoint()+t*line.GetDirection() |
Definition at line 744 of file mitkPlaneGeometry.cpp.
References mitk::eps, mitk::Line< TCoordRep, NPointDimension >::GetDirection(), GetNormal(), mitk::BaseGeometry::GetOrigin(), and mitk::Line< TCoordRep, NPointDimension >::GetPoint().
Referenced by mitk::ClippedSurfaceBoundsCalculator::CalculateIntersectionPoints(), mitk::PlaneGeometryDataMapper2D::CreateVtkCrosshair(), and mitk::MeshMapper2D::Paint().
unsigned int mitk::PlaneGeometry::IntersectWithPlane2D | ( | const PlaneGeometry * | plane, |
Point2D & | lineFrom, | ||
Point2D & | lineTo | ||
) | const |
Calculate two points where another plane intersects the border of this plane.
Definition at line 696 of file mitkPlaneGeometry.cpp.
References mitk::Line< TCoordRep, NPointDimension >::GetDirection(), mitk::BaseGeometry::GetExtentInMM(), mitk::Line< TCoordRep, NPointDimension >::GetPoint(), IntersectionLine(), Map(), and mitk::Line< TCoordRep, NPointDimension >::RectangleLineIntersection().
|
virtual |
Calculates, whether a point is below or above the plane. There are two different calculation methods, with or without consideration of the bounding box.
Reimplemented in mitk::AbstractTransformGeometry.
Definition at line 651 of file mitkPlaneGeometry.cpp.
References mitk::BaseGeometry::GetBoundingBox(), mitk::BaseGeometry::GetBounds(), SignedDistanceFromPlane(), and mitk::BaseGeometry::WorldToIndex().
Referenced by QmitkTbssRoiAnalysisWidget::CreateTracts().
bool mitk::PlaneGeometry::IsOnPlane | ( | const Point3D & | point | ) | const |
Returns whether the point is on the plane (bounding-box not considered)
Definition at line 768 of file mitkPlaneGeometry.cpp.
References Distance(), and mitk::eps.
bool mitk::PlaneGeometry::IsOnPlane | ( | const Line3D & | line | ) | const |
Returns whether the line is on the plane (bounding-box not considered)
Definition at line 769 of file mitkPlaneGeometry.cpp.
References Distance(), mitk::eps, mitk::Line< TCoordRep, NPointDimension >::GetPoint(), and mitk::Line< TCoordRep, NPointDimension >::GetPoint2().
bool mitk::PlaneGeometry::IsOnPlane | ( | const PlaneGeometry * | plane | ) | const |
Returns whether the plane is on the plane (bounding-box not considered)
Definition at line 774 of file mitkPlaneGeometry.cpp.
References Distance(), mitk::eps, mitk::BaseGeometry::GetOrigin(), and IsParallel().
bool mitk::PlaneGeometry::IsParallel | ( | const PlaneGeometry * | plane | ) | const |
Returns whether the plane is parallel to another plane.
Definition at line 763 of file mitkPlaneGeometry.cpp.
References Angle(), and mitk::sqrteps.
Referenced by IsOnPlane(), and mitk::PlanarFigureMapper2D::Paint().
|
virtual |
Project a 3D point given in mm (pt3d_mm) onto the 2D geometry. The result is a 2D point in mm (pt2d_mm).
The result is a 2D point in mm (pt2d_mm) relative to the upper-left corner of the geometry. To convert this point into units (e.g., pixels in case of an image), use WorldToIndex.
Reimplemented in mitk::AbstractTransformGeometry.
Definition at line 869 of file mitkPlaneGeometry.cpp.
References mitk::BaseGeometry::GetBoundingBox(), mitk::BaseGeometry::GetExtent(), mitk::BaseGeometry::GetExtentInMM(), mitk::BaseGeometry::IsBoundingBoxNull(), mitk::BaseGeometry::IsInside(), and mitk::BaseGeometry::WorldToIndex().
Referenced by mitk::SegTool2D::AddContourmarker(), mitk::PlanarFigureSegmentationController::CreateSurfaceFromPlanarFigure(), mitk::PlaneGeometryDataMapper2D::CutCrossLineWithPlaneGeometry(), QmitkStdMultiWidget::EnsureDisplayContainsPoint(), mitk::ExtrudePlanarFigureFilter::GenerateData(), itk::FibersFromPlanarFiguresFilter::GenerateData(), mitk::RegEvaluationMapper2D::GenerateDataForRenderer(), GetBendDirection(), mitk::PartialVolumeAnalysisHistogramCalculator::InternalCalculateMaskFromPlanarFigure(), mitk::ImageStatisticsCalculator::InternalCalculateMaskFromPlanarFigure(), IntersectWithPlane2D(), mitk::PlanarFigureInteractor::IsMousePositionAcceptableAsNewControlPoint(), Map(), mitk::PlaneGeometryDataMapper2D::TestPointInPlaneGeometry(), mitk::PlanarFigureInteractor::TransformObjectToDisplay(), mitk::PlanarFigureMapper2D::TransformObjectToDisplay(), and mitk::PlanarFigureInteractor::TransformPositionEventToPoint2D().
|
virtual |
Converts a 2D point given in mm (pt2d_mm) relative to the upper-left corner of the geometry into the corresponding world-coordinate (a 3D point in mm, pt3d_mm).
To convert a 2D point given in units (e.g., pixels in case of an image) into a 2D point given in mm (as required by this method), use IndexToWorld.
Reimplemented in mitk::AbstractTransformGeometry.
Definition at line 881 of file mitkPlaneGeometry.cpp.
References mitk::BaseGeometry::GetExtent(), mitk::BaseGeometry::GetExtentInMM(), and mitk::BaseGeometry::GetIndexToWorldTransform().
|
virtual |
Project a 3D vector given in mm (vec3d_mm) onto the 2D geometry. The result is a 2D vector in mm (vec2d_mm).
The result is a 2D vector in mm (vec2d_mm) relative to the upper-left corner of the geometry. To convert this point into units (e.g., pixels in case of an image), use WorldToIndex.
Reimplemented in mitk::AbstractTransformGeometry.
Definition at line 960 of file mitkPlaneGeometry.cpp.
References Map().
|
virtual |
Converts a 2D vector given in mm (vec2d_mm) relative to the upper-left corner of the geometry into the corresponding world-coordinate (a 3D vector in mm, vec3d_mm).
To convert a 2D vector given in units (e.g., pixels in case of an image) into a 2D vector given in mm (as required by this method), use IndexToWorld.
Reimplemented in mitk::AbstractTransformGeometry.
Definition at line 973 of file mitkPlaneGeometry.cpp.
|
static |
Method for creation through the object factory.
Referenced by addPlaneToDataStorage(), mitk::BaseRenderer::BaseRenderer(), CheckIntersectionWithRotatedGeometry(), CheckIntersectionWithRotatedGeometry90(), CheckPlanesInsideBoundingBox(), CheckPlanesInsideBoundingBoxOnlyOnOneSlice(), CheckPlanesOutsideOfBoundingBox(), createPlaneGeometry(), mitk::ExtrudedContour::ExtrudedContour(), mitk::ContourModelSetToImageFilter::GenerateData(), mitk::NeedleProjectionFilter::GenerateData(), mitk::PlanarFigureReader::GenerateData(), mitk::ExtractImageFilter::GenerateData(), mitk::NavigationDataSliceVisualization::GenerateData(), mitk::PlaneFit::GenerateOutputInformation(), GetEmptyTestImageWithGeometry(), mitk::Image::Initialize(), mitk::SlicedGeometry3D::InitializePlanes(), mitk::PlanarFigure::InitializeTimeGeometry(), mitkAbstractTransformGeometryTest(), mitkClippedSurfaceBoundsCalculatorTest(), mitkExtractSliceFilterTest(), mitkGeometryDataToSurfaceFilterTest(), mitkImageTest(), mitkPlanarArrowTest(), mitkPlanarCrossTest(), mitkPlanarPolygonTest(), mitkPlanarSubdivisionPolygonTest(), mitkRotatedSlice4DTest(), mitkSlicedGeometry3DTest(), mitkVtkAbstractTransformPlaneGeometryTest(), mitk::SlicedGeometry3D::PreSetSpacing(), mitk::SlicedData::SetGeometry(), mitk::PlaneFit::SetInput(), SetUpBeforeTest(), mitk::BaseRenderer::SetWorldGeometry3D(), and testSurfaceBoundingBoxConsistency().
|
inlineoverrideprotectedvirtual |
PreSetSpacing.
These virtual function allows a different beahiour in subclasses. Do implement them in every subclass of BaseGeometry. If not needed, use {Superclass::PreSetSpacing();};
Reimplemented from mitk::BaseGeometry.
Reimplemented in mitk::AbstractTransformGeometry, mitk::LandmarkProjectorBasedCurvedGeometry, and mitk::ThinPlateSplineCurvedGeometry.
Definition at line 575 of file mitkPlaneGeometry.h.
|
overrideprotectedvirtual |
Reimplemented from mitk::BaseGeometry.
Definition at line 861 of file mitkPlaneGeometry.cpp.
References mitk::BaseGeometry::GetExtent(), mitk::BaseGeometry::GetExtentInMM(), GetNormal(), and mitk::BaseGeometry::PrintSelf().
|
virtual |
Project a 3D point given in mm (pt3d_mm) onto the 2D geometry. The result is a 3D point in mm (projectedPt3d_mm).
Reimplemented in mitk::AbstractTransformGeometry.
Definition at line 921 of file mitkPlaneGeometry.cpp.
References mitk::BaseGeometry::GetBoundingBox(), mitk::BaseGeometry::GetIndexToWorldTransform(), mitk::BaseGeometry::IsBoundingBoxNull(), mitk::BaseGeometry::IsInside(), and mitk::BaseGeometry::WorldToIndex().
Referenced by mitk::PlaneGeometryDataMapper2D::CreateVtkCrosshair(), mitk::SegTool2D::DetermineAffectedImageSlice(), mitk::ContourMapper2D::Paint(), mitk::ContourSetMapper2D::Paint(), mitk::MeshMapper2D::Paint(), and mitk::SliceNavigationController::SelectSliceByPoint().
|
virtual |
Project a 3D vector given in mm (vec3d_mm) onto the 2D geometry. The result is a 3D vector in mm (projectedVec3d_mm).
DEPRECATED. Use Project(vector,vector) instead
Reimplemented in mitk::AbstractTransformGeometry.
Definition at line 943 of file mitkPlaneGeometry.cpp.
References mitk::BaseGeometry::GetBoundingBox(), mitk::BaseGeometry::GetIndexToWorldTransform(), mitk::BaseGeometry::IsBoundingBoxNull(), mitk::BaseGeometry::IsInside(), MITK_WARN, and mitk::BaseGeometry::WorldToIndex().
|
virtual |
Project a 3D vector given in mm (vec3d_mm) onto the 2D geometry. The result is a 3D vector in mm (projectedVec3d_mm).
Reimplemented in mitk::AbstractTransformGeometry.
Definition at line 932 of file mitkPlaneGeometry.cpp.
References mitk::BaseGeometry::GetIndexToWorldTransform(), mitk::BaseGeometry::IsBoundingBoxNull(), and mitk::BaseGeometry::WorldToIndex().
Returns the lot from the point to the plane.
Definition at line 779 of file mitkPlaneGeometry.cpp.
References GetNormal(), GetNormalVnl(), and SignedDistanceFromPlane().
Referenced by itk::FibersFromPlanarFiguresFilter::GenerateData().
void mitk::PlaneGeometry::SetMatrixByVectors | ( | const VnlVector & | rightVector, |
const VnlVector & | downVector, | ||
ScalarType | thickness = 1.0 |
||
) |
Initialize plane by right-/down-vector.
Definition at line 615 of file mitkPlaneGeometry.cpp.
References mitk::BaseGeometry::GetIndexToWorldTransform(), mitk::New(), and mitk::BaseGeometry::SetIndexToWorldTransform().
void mitk::PlaneGeometry::SetReferenceGeometry | ( | const mitk::BaseGeometry * | geometry | ) |
Set the geometrical frame of reference in which this PlaneGeometry is placed.
This would usually be the BaseGeometry of the underlying dataset, but setting it is optional.
Definition at line 981 of file mitkPlaneGeometry.cpp.
References m_ReferenceGeometry.
Referenced by InitializeStandardPlane(), and mitk::SlicedGeometry3D::SetPlaneGeometry().
|
virtual |
Set the width and height of this 2D-geometry in units by calling SetBounds. This does not change the extent in mm!
For an image, this is the number of pixels in x-/y-direction.
Definition at line 896 of file mitkPlaneGeometry.cpp.
References mitk::BaseGeometry::GetExtent(), mitk::BaseGeometry::GetExtentInMM(), mitk::BaseGeometry::SetBounds(), and mitk::BaseGeometry::SetExtentInMM().
|
virtual |
Definition at line 650 of file mitkPlaneGeometry.cpp.
References SignedDistanceFromPlane().
Referenced by mitk::PointSetVtkMapper2D::CreateVTKRenderObjects(), DistanceFromPlane(), mitk::ContourModelGLMapper2DBase::InternalDrawContour(), mitk::ContourModelSetGLMapper2D::InternalDrawContour(), mitk::LabelSetImageVtkMapper2D::RenderingGeometryIntersectsImage(), mitk::RegEvaluationMapper2D::RenderingGeometryIntersectsImage(), mitk::DoseImageVtkMapper2D::RenderingGeometryIntersectsImage(), and mitk::ImageVtkMapper2D::RenderingGeometryIntersectsImage().
|
inline |
Signed distance of the point from the plane (bounding-box not considered)
0 : point is in the direction of the direction vector.
Definition at line 329 of file mitkPlaneGeometry.h.
Referenced by IsAbove(), ProjectPointOntoPlane(), mitk::SlicedGeometry3D::ReinitializePlanes(), and SignedDistance().
|
inline |
Signed distance of the plane from another plane (bounding-box not considered)
Result is 0 if planes are not parallel.
Definition at line 352 of file mitkPlaneGeometry.h.
References mitk::BaseGeometry::GetOrigin().
Reimplemented in mitk::AbstractTransformGeometry.
Definition at line 128 of file mitkPlaneGeometry.cpp.
References mitk::BaseGeometry::GetExtent(), and mitk::BaseGeometry::GetExtentInMM().
Referenced by mitk::PlaneGeometryDataMapper2D::CutCrossLineWithPlaneGeometry(), mitk::RegEvaluationMapper2D::GenerateDataForRenderer(), mitk::PartialVolumeAnalysisHistogramCalculator::InternalCalculateMaskFromPlanarFigure(), mitk::PlaneGeometryDataMapper2D::TestPointInPlaneGeometry(), and WorldToIndex().
|
virtual |
Convert world coordinates (in mm) of a vector vec_mm to (continuous!) index coordinates.
Reimplemented in mitk::AbstractTransformGeometry.
Definition at line 147 of file mitkPlaneGeometry.cpp.
References MITK_WARN, and WorldToIndex().
|
virtual |
Convert world coordinates (in mm) of a vector vec_mm to (continuous!) index coordinates. For further information about coordinates types, please see the Geometry documentation.
Reimplemented in mitk::AbstractTransformGeometry.
Definition at line 154 of file mitkPlaneGeometry.cpp.
References mitk::BaseGeometry::GetExtent(), and mitk::BaseGeometry::GetExtentInMM().
|
protected |
Definition at line 567 of file mitkPlaneGeometry.h.
Referenced by GetReferenceGeometry(), HasReferenceGeometry(), and SetReferenceGeometry().