![]() |
ImFusion SDK 4.3
|
#include <ImFusion/US/FrameGeometrySector.h>
Specialization for sector frame geometries. More...
Inheritance diagram for FrameGeometrySector:Specialization for sector frame geometries.
See FrameGeometry for a detailed summary of the frame geometry concept.
The sector geometry is like a FrameGeometryConvex, but with a straight top, and possibly with a straight bottom. Like in the convex case, there is a virtual center point where all scanlines originate from. It is defined to resemble the convex geometry as closely as possible. Analogously to the other geometries, the offset is at the center of the transducer array, and the virtual center point is at (0,-smallRadius) from the offset in image coordinates. The small radius is thus always measured on the vertical line, and the opening angle is also defined with respect to the vertical line. However, the long radius is defined on the lateral side, so that the anchor points remain the same for the convex case regardless of bottom curvature [0,1], which smoothly controls straight vs. fully circular frame bottoms.
Public Member Functions | |
| FrameGeometrySector (CoordinateSystem coordSys) | |
| FrameGeometrySector * | asSector () override |
| Returns a pointer to this object as a FrameGeometrySector, or nullptr if not possible. | |
| bool | operator== (const FrameGeometry &rhs) const override |
| Checks for equality, also considering the image descriptor. | |
| void | setOpeningAngle (double degrees) |
| Set the opening angle of the frame sector [deg]. The angle is measured from the vertical line. | |
| void | setShortRadius (double radius) |
| Set the inner radius of the frame sector, in mm or pixels, depending on the coordinate system. | |
| void | setLongRadius (double radius) |
| Set the outer radius of the frame sector, in mm or pixels, depending on the coordinate system. | |
| void | setBottomCurvature (double coeff) |
| Set the bottom curvature of the frame sector. 0.0 is flat, 1.0 is a full circle of radius longRadius. | |
| double | openingAngle () const |
| Get the opening angle of the frame sector [deg]. The angle is measured from the vertical line. | |
| double | shortRadius () const |
| Get the inner radius of the frame sector, in mm or pixels, depending on the coordinate system. | |
| double | longRadius () const |
| Get the outer radius of the frame sector, in mm or pixels, depending on the coordinate system. | |
| double | bottomCurvature () const |
| Get the bottom curvature of the frame sector. 0.0 is flat, 1.0 is a full circle of radius longRadius. | |
| double | depth () const override |
| Get the depth of the frame sector, in mm or pixels, depending on the coordinate system. | |
| void | setDepth (double depth) override |
| Set the depth of the frame sector, in mm or pixels, depending on the coordinate system. Adapts the long radius. | |
| void | configure (const Properties *) override |
| Sets general properties. Only intended to be called from derived classes. See FrameGeometryMetadata. | |
| void | configuration (Properties *) const override |
| Retrieves general properties. Only intended to be called from derived classes. See FrameGeometryMetadata. | |
| std::unique_ptr< FrameGeometry > | convertTo (CoordinateSystem coordSys) const override |
| Convert the frame geometry to the given coordinate system. | |
| std::unique_ptr< FrameGeometry > | clone () const override |
| Create a copy of this frame geometry. | |
| bool | contains (vec2 coord) const override |
| Returns true if the given point is within the fan. | |
| bool | isSimilar (const FrameGeometry *other, bool ignoreOffset=false, double eps=0.1) const override |
| True if the given frame geometry is similar to this one, within a given tolerance. | |
| vec2 | apex () const |
| The virtual point beyond the probe surface where all the rays would intersect. | |
| vec2 | transformPoint (const vec2 &p, TransformationMode mode) const override |
| Applies the specified geometric transformation to a point. | |
| std::unique_ptr< GlGeometricTransform > | glGeometricTransform () const override |
| Returns the geometric transformation between image coordinates and pre-scan converted coordinates, if available. | |
| void | fitBottomCurvatureToUniformScanlines () |
| Computes a bottom curvature assuming all scanlines are of the same length. | |
Public Member Functions inherited from FrameGeometry | |
| FrameGeometry (CoordinateSystem coordSys) | |
| Constructor requires the coordinate system to be defined. It cannot be changed afterward. | |
| bool | operator!= (const FrameGeometry &rhs) const |
| Checks for inequality, also considering the image descriptor. | |
| vec2 | offset () const |
| Offset of the geometry within the image. | |
| void | setOffset (const vec2 &offset) |
| Sets the offset of the geometry. | |
| bool | isTopDown () const |
| Returns if the geometry is oriented top to bottom, where the frame geometry origin is higher on the image than the end. | |
| void | setTopDown (bool b) |
| Sets if the geometry is oriented top to bottom, or bottom to top. | |
| const ImageDescriptor & | imgDesc () const |
| Returns the ImageDescriptor for the frame geometry. | |
| const ImageDescriptor & | imgDescPrescan () const |
| Returns the ImageDescriptor for the pre-scanconverted image. | |
| void | setImgDesc (const ImageDescriptor &imgDescr) |
| Sets the ImageDescriptor for the frame geometry. | |
| void | setImgDescPrescan (const ImageDescriptor &imgDescrPrescan) |
| Sets the ImageDescriptor for the pre-scanconverted image. | |
| OrientationIndicatorPosition | indicatorPos () const |
| Returns the OrientationIndicatorPosition for the frame geometry. | |
| void | setIndicatorPos (OrientationIndicatorPosition pos) |
| Sets the OrientationIndicatorPosition for the frame geometry. | |
| CoordinateSystem | coordinateSystem () const |
| Returns the CoordinateSystem used in the frame geometry. | |
| Geometry::AlignedBox | bounds () const |
| Returns the Bounds of the frame geometry. | |
| mat4 | transformation () const |
| Convenience method to get the 2D transformation formed by the offset and orientation. | |
| virtual vec2 | frameCenter () const |
| Returns the center of the frame. | |
| bool | isLinear () const |
| Convenience type check. | |
| bool | isCircular () const |
| Convenience type check. | |
| bool | isConvex () const |
| Convenience type check. | |
| bool | isSector () const |
| Convenience type check. | |
| virtual FrameGeometryLinear * | asLinear () |
| Convenience cast to the derived type, or nullptr if not possible. | |
| virtual FrameGeometryConvex * | asConvex () |
| Convenience cast to the derived type, or nullptr if not possible. | |
| virtual FrameGeometryConvexSteered * | asConvexSteered () |
| virtual FrameGeometryCircular * | asCircular () |
| Convenience cast to the derived type, or nullptr if not possible. | |
| const FrameGeometryLinear * | asLinear () const |
| Convenience cast to the derived type, or nullptr if not possible. | |
| const FrameGeometryConvex * | asConvex () const |
| Convenience cast to the derived type, or nullptr if not possible. | |
| const FrameGeometryConvexSteered * | asConvexSteered () const |
| const FrameGeometrySector * | asSector () const |
| Convenience cast to the derived type, or nullptr if not possible. | |
| const FrameGeometryCircular * | asCircular () const |
| Convenience cast to the derived type, or nullptr if not possible. | |
| virtual FrameGeometry::Fan | createFan () |
| Computes the fan geometry edges and points. | |
Protected Member Functions | |
| FrameGeometry::Fan | createFanImpl () override |
| Internal fan geometry generation to be implemented by subclass. | |
| void | onTopLeftChanged (vec2 delta) |
| void | onTopRightChanged (vec2 delta) |
| void | onBottomRightChanged (vec2 delta) |
| void | onBottomLeftChanged (vec2 delta) |
| void | onBottomCurvatureChanged (vec2 delta) |
| void | onTopEdgeChanged (vec2 delta) |
| void | onRightEdgeChanged (vec2 delta) |
| void | onBottomEdgeChanged (vec2 delta) |
| void | onLeftEdgeChanged (vec2 delta) |
Protected Member Functions inherited from FrameGeometry | |
| void | onCenterChanged (vec2 delta) |
| Manipulation callback. | |
| vec2 | conversionSpacing () const |
| Internal helper methods returning the spacing or its inverse, dependent on the current coordinate system, either as vec2, are as the diagonal of a 2x2 matrix. | |
| mat2 | localCoordinateFrame () const |
Protected Member Functions inherited from Configurable | |
| virtual void | configureDefaults () |
| Retrieve the properties of this object, replaces values with their defaults and sets it again. | |
| void | registerParameter (ParameterBase *param) |
| Register the given Parameter or SubProperty, so that it will be configured during configure()/configuration(). | |
| void | unregisterParameter (const ParameterBase *param) |
| Remove the given Parameter or SubProperty from the list of registered parameters. | |
| Configurable (const Configurable &rhs) | |
| Configurable (Configurable &&rhs) noexcept | |
| Configurable & | operator= (const Configurable &) |
| Configurable & | operator= (Configurable &&) noexcept |
Protected Attributes | |
| double | m_shortRadius |
| Inner radius. | |
| double | m_longRadius |
| Outer radius. | |
| double | m_openingAngle |
| Lateral opening angle wrt. vertical line [deg]. | |
| double | m_bottomCurvature |
| Curvature of the bottom line (0.0 is flat, 1.0 full circle) | |
Protected Attributes inherited from FrameGeometry | |
| vec2 | m_offset = vec2::Zero() |
| location of the fan center (virtual apex) wrt. transducer center (image top) | |
| bool | m_isTopDown = true |
| Orientation of fan. | |
| OrientationIndicatorPosition | m_indicatorPosition |
| Position of the external orientation indicator. | |
| CoordinateSystem | m_coordSys = CoordinateSystem::Image |
| Coordinate system this geometry is defined in. | |
| ImageDescriptor | m_imgDesc |
| Image descriptor for frame conversion. | |
| ImageDescriptor | m_imgDescPrescan |
| Image descriptor for pre-scanconverted image conversion. | |
Protected Attributes inherited from Configurable | |
| std::vector< Param > | m_params |
| List of all registered Parameter and SubProperty instances. | |
| Signal | signalParametersChanged |
Emitted whenever one of the registered Parameters' or SubPropertys' signalValueChanged signal was emitted. | |
Additional Inherited Members | |
Public Types inherited from FrameGeometry | |
| enum class | OrientationIndicatorPosition { Nearside = 0 , Farside = 1 } |
| Position of external orientation indicator (e.g. colored knob) More... | |
| enum class | TransformationMode { NormalizedRawToScanConverted = 0 , NormalizedPrescanToScanConverted = 0 , ScanConvertedToNormalizedRaw = 1 , ScanConvertedToNormalizedPrescan = 1 } |
| Used in transformPoint() to specify which geometric transformation to apply. More... | |
Static Protected Attributes inherited from FrameGeometry | |
| static constexpr double | m_insetEpsilon = 1e-7 |
| Inset distance to avoid numerical errors when computing frame boundaries. | |
|
overridevirtual |
Returns a pointer to this object as a FrameGeometrySector, or nullptr if not possible.
Reimplemented from FrameGeometry.
|
overridevirtual |
Checks for equality, also considering the image descriptor.
Reimplemented from FrameGeometry.
|
overridevirtual |
Get the depth of the frame sector, in mm or pixels, depending on the coordinate system.
Implements FrameGeometry.
|
overridevirtual |
Set the depth of the frame sector, in mm or pixels, depending on the coordinate system. Adapts the long radius.
Implements FrameGeometry.
|
overridevirtual |
Sets general properties. Only intended to be called from derived classes. See FrameGeometryMetadata.
Reimplemented from FrameGeometry.
|
overridevirtual |
Retrieves general properties. Only intended to be called from derived classes. See FrameGeometryMetadata.
Reimplemented from FrameGeometry.
|
overridevirtual |
Convert the frame geometry to the given coordinate system.
Reimplemented from FrameGeometry.
|
overridevirtual |
Create a copy of this frame geometry.
Implements FrameGeometry.
|
overridevirtual |
Returns true if the given point is within the fan.
Implements FrameGeometry.
|
overridevirtual |
True if the given frame geometry is similar to this one, within a given tolerance.
Implements FrameGeometry.
|
overridevirtual |
Applies the specified geometric transformation to a point.
Implements FrameGeometry.
|
overridevirtual |
Returns the geometric transformation between image coordinates and pre-scan converted coordinates, if available.
Reimplemented from FrameGeometry.
|
overrideprotectedvirtual |
Internal fan geometry generation to be implemented by subclass.
Implements FrameGeometry.