ImFusion SDK 4.3
GeometryDetection Class Reference

#include <ImFusion/US/GeometryDetection.h>

Actual implementation for automatically detecting the ultrasound image geometry from screen recordings. More...

+ Inheritance diagram for GeometryDetection:

Detailed Description

Actual implementation for automatically detecting the ultrasound image geometry from screen recordings.

This algorithm applies a series of image analysis operations to automatically determine the region and shape of the actual ultrasound image content. After successful computation it will provide an instance of FrameGeometry describing the shape of the US image.

When given a set of images as input this class will identify US pixels as pixels that change between frames. When given a single image, this class will use thresholding to identify US pixels

Public Types

enum class  GeometryType { Detect , Linear , Convex , Sector }
 

Public Member Functions

std::unique_ptr< US::FrameGeometrycompute (const std::vector< const TypedImage< unsigned char > * > &frames)
 Compute the US geometry from the given frames.
 
std::unique_ptr< US::FrameGeometrycompute (const TypedImage< unsigned char > *frame, unsigned char threshold=35, vec2i bbTL={0, 0}, vec2i bbBR={0, 0})
 Compute the US geometry from a single frame using thresholding.
 
std::pair< vec2i, vec2i > boundingBox () const
 Call after compute() to get the axis-aligned bounding box containing the entire US image.
 
std::shared_ptr< TypedImage< unsigned char > > debugImage ()
 Return the detection debug image if enabled.
 
- Public Member Functions inherited from Configurable
virtual void configure (const Properties *p)
 Configure this object instance by de-serializing the given Properties.
 
virtual void configuration (Properties *p) const
 Serialize the current object configuration into the given Properties object.
 
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
 
Configurableoperator= (const Configurable &)
 
Configurableoperator= (Configurable &&) noexcept
 

Public Attributes

Parameter< bool > p_enableGrayscaleFilter = {"enableGrayscaleFilter", false, this}
 Skip non-grayscale pixels in an RGB image.
 
Parameter< bool > p_enableDebugImage = {"enableDebugImage", false, this}
 Enable debug image.
 
Parameter< GeometryType > p_geometryType = {"geometryType", GeometryType::Detect, this}
 Limit the detection to a certain type of geometry.
 
Parameter< int > p_closeRadius = {"closeRadius", 2, this}
 Radius for the close operation that is used to clean-up the detection.
 
Parameter< int > p_intensityThreshold = {"intensityThreshold", 35, this}
 Threshold used to detect the geometry when only one frame is available.
 
- Public Attributes inherited from Configurable
Signal signalParametersChanged
 Emitted whenever one of the registered Parameters' or SubPropertys' signalValueChanged signal was emitted.
 

Additional Inherited Members

- Protected Attributes inherited from Configurable
std::vector< Paramm_params
 List of all registered Parameter and SubProperty instances.
 

Member Function Documentation

◆ compute() [1/2]

std::unique_ptr< US::FrameGeometry > compute ( const std::vector< const TypedImage< unsigned char > * > & frames)

Compute the US geometry from the given frames.

Will return a valid FrameGeometry on success.

Parameters
framesSet of at least 2 frames containing US images. The frames are expected to be compatible to each other. They can be of any number of channels.

◆ compute() [2/2]

std::unique_ptr< US::FrameGeometry > compute ( const TypedImage< unsigned char > * frame,
unsigned char threshold = 35,
vec2i bbTL = {0, 0},
vec2i bbBR = {0, 0} )

Compute the US geometry from a single frame using thresholding.

Will return a valid FrameGeometry on success.

Parameters
frameThe frame is expected to be top-down, i.e. the US scan lines are travelling in the direction of increasing Y values.
thresholdThe threshold value

◆ boundingBox()

std::pair< vec2i, vec2i > boundingBox ( ) const

Call after compute() to get the axis-aligned bounding box containing the entire US image.

The returned pair contains { top-left point, bottom-right point } in pixel space.


The documentation for this class was generated from the following file:
Search Tab / S to search, Esc to close