![]() |
ImFusion C++ SDK 4.5.0
|
#include <ImFusion/US/GlSweepStretchDeformation.h>
Deformation model to undo probe pressure deformation on an ultrasound sweep. More...
Deformation model to undo probe pressure deformation on an ultrasound sweep.
Public Member Functions | |
| GlSweepStretchDeformation (const UltrasoundSweep &sweep, double scaleY, const SharedImageSet *distanceVolume=nullptr) | |
| Constructor with relative height scaling. | |
| GlSweepStretchDeformation (const GlSweepStretchDeformation &other) | |
| Copy constructor. | |
| virtual | ~GlSweepStretchDeformation () |
| Destructor. | |
| void | setFrameParameters (const SharedImage *img, vec2 center, double radius, double depth) |
| Provide individual parameters for an ultrasound frame in mm image coordinates. | |
| double | scaleY () const |
| Return the y scaling factor. | |
| Public Member Functions inherited from ImFusion::ParametricDeformation | |
| ParametricDeformation (const std::string &shaderPath) | |
| Initializes the parametric deformation with path to the GlInclude file. | |
| ~ParametricDeformation () override | |
| Destructor. | |
| virtual void | setDisplacement (const std::vector< vec3f > &d) |
| Set displacement in mm for all control points if applicable For 2D images the z-coordinate of the displacement is ignored. | |
| virtual std::vector< vec3f > | displacements () const |
| Get displacement in mm of all control points if applicable. | |
| virtual std::vector< vec3 > | controlPoints () const |
| Returns a list of all control points in world coordinates (might be empty for certain models). | |
| virtual int | numberOfControlPoints () const |
| Returns the number of control points (may be zero for certain deformations). | |
| Public Member Functions inherited from ImFusion::Deformation | |
| Deformation (const std::string &shaderPath) | |
| Initializes the Deformation with path to the GlInclude file. | |
| virtual vec3 | displacement (const vec2 &pos) const |
| Returns the displacement at the world position pos. | |
| virtual vec3 | displacePoint (const vec3 &point) const |
| Returns the displaced position of the given point in world-coordinates. | |
| void | setDisabled (bool flag) |
| Set a disabled flag in order to hide the visualization of this deformation. | |
| bool | disabled () const |
| Return whether the deformation was set to disabled. | |
| virtual std::unique_ptr< SharedImageSet > | supportingImages () const |
| Returns the images that, together with the configuration, defines the deformation. | |
| Public Member Functions inherited from ImFusion::GL::AbstractInclude | |
| AbstractInclude (const std::string &defineName, const std::string &includePath) | |
| Creates a AbstractInclude for the given define and with the corresponding GLSL file at includePath. | |
| const std::string & | defineName () const |
| Returns the name of define used by this include. | |
| const std::string & | includePath () const |
| Returns the path to the included shader file. | |
| virtual std::function< std::string(const std::string &)> | includeCodeSubstitution () const |
| Optionally the abstract include can provide a function to change the shader code. | |
| virtual std::vector< AbstractInclude * > | dependentIncludes () const |
| Returns a list of dependent abstract includes that need to be included as well. | |
| virtual Fingerprint | fingerprint () const |
| Provides a finger print of the include. | |
| Public Member Functions inherited from ImFusion::GL::MultiIncludable< Deformation, const SharedImage * > | |
| std::shared_ptr< MultiIncludeType > | createMultiInclude (const std::string &replacementToken) |
| Instantiates a new AbstractInclude instance where all occurrences of baseToken provided during construction are replaces with replacementToken according to the specified replacementScheme. | |
| virtual int | setIncludeArguments (Program &prog, IncludeArgumentsTypes... includeArgs, const std::string &token) const=0 |
| Interface that multi includes should use to configure the shader include (such as setting uniforms, binding textures, etc). | |
| Public Member Functions inherited from ImFusion::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 |
| Public Member Functions inherited from ImFusion::SignalReceiver | |
| SignalReceiver ()=default | |
| Default constructor. | |
| SignalReceiver (const SignalReceiver &other) | |
| Copy constructor, does not copy any existing signal connections from other. | |
| SignalReceiver & | operator= (SignalReceiver rhs) |
| Assignment operator, disconnects all existing connections, does not copy any existing signal connections from rhs. | |
| virtual | ~SignalReceiver () |
| Virtual destructor disconnects from all connected signals. | |
Static Public Member Functions | |
| static void | createAndApply (UltrasoundSweep &sweep, double margin, const SharedImageSet *distanceVolume=nullptr) |
| Create a suited deformation and apply it to the provided sweep, including stretching it. | |
| static void | remove (UltrasoundSweep &sweep) |
| Remove the deformation from provided sweep and undo vertical stretching. | |
| Static Public Member Functions inherited from ImFusion::Deformation | |
| static std::string | defineName () |
| Returns the define name of GlAbstractInclude for all deformations. | |
| static std::string | defineSuffix () |
| Returns "DEFORM". | |
| static std::string | multiIncludeDefine (const std::string &replacementToken) |
| Returns "IMAGE_" + toUpper(replacementToken). | |
Methods of the Deformation base class | |
| virtual Deformation * | clone () const override |
| Returns a copy of the deformation. | |
| virtual vec3 | displacement (const vec3 &pos) const override |
| Returns the displacement for pos (in world coordinates). | |
| virtual bool | isIdentity () const override |
| Returns if the current state of the deformation transformations the image or not. | |
| virtual void | setIdentity () override |
| Sets all displacements to 0. | |
| virtual int | setIncludeArguments (GL::Program &p, const SharedImage *img, const std::string &prefix="deform") const override |
| Override default arguments for GlMask includes. | |
| virtual int | dimension () const override |
| Returns the dimension of the deformation. | |
| std::string | id () const override |
| Returns a unique string identifier for this type of deformation. | |
Methods of the ParametricDeformation base class | |
| virtual void | setParameters (const std::vector< double > &pars) override |
| Set the parameters of the deformation. | |
| virtual void | parameters (std::vector< double > &parsOut) const override |
| Retrieve the current parameters of the deformation. | |
| virtual int | numberOfParameters () const override |
| Returns the number of parameters e.g. for optimization. | |
Methods of the Configurable interface | |
| virtual void | configure (const Properties *p) override |
| Configure this object instance by de-serializing the given Properties. | |
| virtual void | configuration (Properties *p) const override |
| Serialize the current object configuration into the given Properties object. | |
Additional Inherited Members | |
| Public Types inherited from ImFusion::GL::MultiIncludable< Deformation, const SharedImage * > | |
| using | MultiIncludeType |
| Alias for type of a multi-include instance of the original include. | |
| Public Attributes inherited from ImFusion::Deformation | |
| Signal< const DeformationEvent & > | signalChanged |
| Public Attributes inherited from ImFusion::Configurable | |
| Signal | signalParametersChanged |
| Emitted whenever one of the registered Parameters' or SubPropertys' signalValueChanged signal was emitted. | |
| Protected Member Functions inherited from ImFusion::Deformation | |
| void | notifyListeners (const DeformationEvent &event) const |
| convenience function to call signalChanged.emitSignal(event). | |
| Protected Member Functions inherited from ImFusion::GL::MultiIncludable< Deformation, const SharedImage * > | |
| MultiIncludable (Deformation *crtpInstance, const std::string &baseToken, Flags< ShaderTextReplacement > replacementScheme) | |
| Instantiate and configure the MultiIncludable interface. | |
| Protected Member Functions inherited from ImFusion::SignalReceiver | |
| void | disconnectAll () |
| Disconnects all existing connections. | |
| Protected Attributes inherited from ImFusion::Deformation | |
| bool | m_disabled |
| Disabled flag for visualization. | |
| Protected Attributes inherited from ImFusion::Configurable | |
| std::vector< Param > | m_params |
| List of all registered Parameter and SubProperty instances. | |
|
overridevirtual |
Returns a copy of the deformation.
Implements ImFusion::Deformation.
|
overridevirtual |
Returns the displacement for pos (in world coordinates).
The returned displacement is also in world coordinates. The displacement indicates where pos originated from before applying the deformation.
Implements ImFusion::Deformation.
|
overridevirtual |
Returns if the current state of the deformation transformations the image or not.
Implements ImFusion::Deformation.
|
overridevirtual |
Sets all displacements to 0.
Implements ImFusion::Deformation.
|
overridevirtual |
Override default arguments for GlMask includes.
Implements ImFusion::Deformation.
|
overridevirtual |
Returns the dimension of the deformation.
Implements ImFusion::Deformation.
|
inlineoverridevirtual |
Returns a unique string identifier for this type of deformation.
Usually the name of the class.
Implements ImFusion::Deformation.
|
overridevirtual |
Set the parameters of the deformation.
Reimplemented from ImFusion::ParametricDeformation.
|
overridevirtual |
Retrieve the current parameters of the deformation.
Reimplemented from ImFusion::ParametricDeformation.
|
overridevirtual |
Returns the number of parameters e.g. for optimization.
Reimplemented from ImFusion::ParametricDeformation.
|
inlineoverridevirtual |
Configure this object instance by de-serializing the given Properties.
The default implementation will do so automatically for all registered Parameter and SubProperty instances.
Reimplemented from ImFusion::Configurable.
|
inlineoverridevirtual |
Serialize the current object configuration into the given Properties object.
The default implementation will do so automatically for all registered Parameter and SubProperty instances.
Reimplemented from ImFusion::Configurable.