ImFusion C++ SDK 4.4.0
ImFusion::CT::GlProjectiveObject Class Reference

#include <ImFusion/CT/GlProjectiveObject.h>

OpenGL wrapper for projecting 3D objects onto 2D X-ray images. More...

Inheritance diagram for ImFusion::CT::GlProjectiveObject:

Detailed Description

OpenGL wrapper for projecting 3D objects onto 2D X-ray images.

Lightweight adapter for rendering 3D objects in fluoroscopy coordinate systems.

Public Member Functions

 GlProjectiveObject (GlObject &object, const SharedImageSet &projData)
 The lifetime of object and projData has to be ensured over the full lifetime of a wrapping GlProjectiveObject, as references to these wrapped objects are kept internally.
 GlProjectiveObject (GlObject &object, const ImageDescriptor &imgDesc, const mat4 &projMat)
 The lifetime of object has to be ensured over the full lifetime of a wrapping GlProjectiveObject.
GlObject & object ()
int which () const
 Returns the index of the projective data to use for projecting, use -1 to select the focus frame.
void setWhich (int value)
 Sets the index of the projective data shot to use for projecting, use -1 to select the focus frame.
void draw (const GlView &view) override
 Draw the object in 3D space.
std::string typeName () const override
 Return unique identifier for this object class used for serialization.
Geometry::AlignedBox bounds () const override
 Get the axis-aligned bounding box of this GlObject in world space.
Public Member Functions inherited from ImFusion::GlObject
virtual Geometry::AlignedBox boundsSpherical () const
 Get the spherical bounds of this GlObject in world space.
virtual void setMatrix (const mat4 &m)
 Set the modelview matrix of this object.
virtual const mat4 & matrix () const
 Return the modelview matrix.
virtual void setVisible (bool visible)
 Set object visibility.
virtual bool visible () const
 Return object visibility.
virtual void setAlwaysVisible (bool alwaysVisible)
 Set if object is always visible.
virtual bool alwaysVisible () const
 Return if object is always visible.
RenderingOrderGroup renderingOrder () const
 Return current rendering order value for this GlObject.
void setRenderingOrder (RenderingOrderGroup group)
 Set rendering order value for this GlObject.
void setDraw3DIn2DView (bool draw3DIn2DView)
void configure (const Properties *p) override
 Configure this object instance by de-serializing the given Properties.
void configuration (Properties *p) const override
 Serialize the current object configuration into the given Properties object.
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

Protected Attributes

GlObject & m_object
const SharedImageSetm_fluoroData
 Non-owning pointer to a SharedImageSet with projective information. If this is set the matrix of this dataset will be used otherwise we will fallback to m_mat.
const mat4 m_mat = mat4::Identity()
int m_which = -1
Protected Attributes inherited from ImFusion::GlObject
mat4 m_matrix = mat4::Identity()
 Modelview transformation matrix of this object.
bool m_visible = true
 Object visibility.
bool m_alwaysVisible = false
 Object always visible.
bool m_draw3DIn2DView
 Draw 3D objects in 2D views. This is to render 3D objects in projective 2D views. Property is not serialized.
RenderingOrderGroup m_renderingOrder = RenderingGroupRest
Protected Attributes inherited from ImFusion::Configurable
std::vector< Paramm_params
 List of all registered Parameter and SubProperty instances.

Additional Inherited Members

Public Types inherited from ImFusion::GlObject
enum  RenderingOrderGroup { RenderingGroupRest , RenderingGroupMesh , RenderingGroupManipulator }
 Enumeration to determine rendering order of GlObjects in GlSliceView and GlVolumeView. More...
Public Attributes inherited from ImFusion::Configurable
Signal signalParametersChanged
 Emitted whenever one of the registered Parameters' or SubPropertys' signalValueChanged signal was emitted.

Constructor & Destructor Documentation

◆ GlProjectiveObject()

ImFusion::CT::GlProjectiveObject::GlProjectiveObject ( GlObject & object,
const ImageDescriptor & imgDesc,
const mat4 & projMat )

The lifetime of object has to be ensured over the full lifetime of a wrapping GlProjectiveObject.

Parameters
projMatProjection matrix in OpenGL convention, i.e. (-1,-1) on the screen is the bottom left corner

Member Function Documentation

◆ draw()

void ImFusion::CT::GlProjectiveObject::draw ( const GlView & view)
overridevirtual

Draw the object in 3D space.

Implements ImFusion::GlObject.

◆ typeName()

std::string ImFusion::CT::GlProjectiveObject::typeName ( ) const
overridevirtual

Return unique identifier for this object class used for serialization.

Implements ImFusion::GlObject.

◆ bounds()

Geometry::AlignedBox ImFusion::CT::GlProjectiveObject::bounds ( ) const
overridevirtual

Get the axis-aligned bounding box of this GlObject in world space.

Return an empty (default-constructed) AlignedBox object if the GlObject does not reside in world space.

Implements ImFusion::GlObject.

Member Data Documentation

◆ m_fluoroData

const SharedImageSet* ImFusion::CT::GlProjectiveObject::m_fluoroData
protected
Initial value:
=
nullptr

Non-owning pointer to a SharedImageSet with projective information. If this is set the matrix of this dataset will be used otherwise we will fallback to m_mat.


The documentation for this class was generated from the following file:
  • ImFusion/CT/GlProjectiveObject.h
Search Tab / S to search, Esc to close