ImFusion SDK 4.3
GlCurvedViewOrthoSlice Class Reference

#include <ImFusion/GL/GlCurvedViewOrthoSlice.h>

Displays an ortho slice for a panorama curve. More...

+ Inheritance diagram for GlCurvedViewOrthoSlice:

Detailed Description

Displays an ortho slice for a panorama curve.

Public Member Functions

 GlCurvedViewOrthoSlice (const Slice &slice, GlCurvedView *curvedView)
 Constructs the ortho slice for the given curve.
 
void setSlice (const Slice &s) override
 Set a custom slice in 3D space.
 
void draw (const GlView &view) override
 Render view.
 
void setMatrix (const mat4 &m) override
 Return the curve.
 
void updateMatrix ()
 
void setData (const std::vector< std::pair< const Data *, const DisplayOptions2d * > > &data) override
 Set image data, overwritten here to reset slice extent.
 
void setCurrentSlice (int slice)
 Set the index of the ortho slice in the related CurvedViewPrimitive.
 
int currentSlice () const
 Get the index of the ortho slice in the related CurvedViewPrimitive.
 
void computeAnnotationVertices (vec2 &p1_, vec2 &p2_) const
 
void setWidth (double width)
 
double width () const
 
void setHeight (double height)
 
double height () const
 
GlCurvedViewcurvedView () const
 
- Public Member Functions inherited from GlSlice
 GlSlice (bool is3D, const Slice &slice)
 Creates a new GlSlice instance.
 
virtual bool acceptsData (const Data *d) const
 Returns whether this slice is capable of displaying the given data.
 
std::vector< std::pair< const Data *, const DisplayOptions2d * > > data () const
 Return the list of shown data paired with the DisplayOptions to use.
 
SharedImageSetimageData () const
 Returns the first SharedImageSet that is rendered by this GlSlice.
 
Slice slice () const
 Return the slice of this view.
 
virtual bool isMetric () const
 Return whether displayed data is metric.
 
void setThickness (double val)
 Set 3D MPR thickness.
 
double thickness () const
 Get 3D MPR thickness.
 
int setNextSlice (int relative)
 Jump to one of the next whole voxels before or behind the current slice imageData().
 
int currentSlice () const
 Return closest slice of imageData() to current position/view matrix.
 
int numSlices () const
 Return the total number of slices of imageData() wrt.
 
vec3 center (const Data *data=nullptr) const
 Returns the center in world coordinates of the given data.
 
vec2 extent () const
 Returns slice extent based on the current image data.
 
mat4 defaultPose (const Data *data, Slice::AnatomicalPlane plane) const
 Returns the default view matrix to use for showing the given dataset in a slice view of the given anatomical plane.
 
void setInterpolation (int mode)
 Set the interpolation mode to nearest-neighbor (0), linear (1) or cubic (2)
 
void setColor (const vec3 &c)
 Set the border color of the slice.
 
void draw (const GlView &view) override
 Renders this GlSlice.
 
int interpolation () const
 Return the interpolation mode.
 
const vec3 & color () const
 Return the border color.
 
virtual bool is3D () const
 Return if a 2D image or 3D MPR plane is shown.
 
void render (const GL::ViewState &viewState) const
 Render the image content.
 
bool rendersFirstImageWithFullOpacity () const
 Returns the flag whether to render the first image always with full opacity independent of its actual alpha channel.
 
void setRenderFirstImageWithFullOpacity (bool value)
 Sets the flag whether to render the first image always with full opacity independent of its actual alpha channel.
 
BlendingMode blendingMode () const
 Returns the blending mode to use.
 
void setBlendingMode (BlendingMode value)
 Sets the blending mode to use.
 
double blendFactor () const
 Returns the blending factor to be used in alpha blending mode.
 
void setBlendFactor (double value)
 Sets the blending factor to be used in alpha blending mode.
 
double blendDistance () const
 Returns the stitching overlap in pixels when using DistToBorder blending mode.
 
void setBlendDistance (double value)
 Sets the stitching overlap in pixels when using DistToBorder blending mode.
 
const std::pair< vec4, vec4 > & blendingColors () const
 Returns the primary and secondary tint color when using one of the color blending modes.
 
void setBlendingColors (const std::pair< vec4, vec4 > &value)
 Sets the primary and secondary tint color when using one of the color blending modes.
 
int checkerboardFieldSize () const
 Returns the field size in pixels when using BlendingMode::Checkerboard.
 
void setCheckerboardFieldSize (int value)
 Sets the field size in pixels when using BlendingMode::Checkerboard.
 
std::optional< vec2f > customCheckerboardLocation () const
 Returns the optional custom location in normalized [0..1]^2 space for a basic 2x2 checkerboard blending.
 
void setCustomCheckerboardLocation (std::optional< vec2f > value)
 Sets the optional custom location in normalized [0..1]^2 space for a basic 2x2 checkerboard blending.
 
Flags< ObjectRenderModeobjectRenderMode () const
 Return how the slice is shown when rendered as GlObject.
 
void setObjectRenderMode (Flags< ObjectRenderMode > renderMode)
 Sets how the slice is shown when rendered as GlObject.
 
void setObjectRenderModeFlag (ObjectRenderMode renderModeFlag, bool value)
 Sets a single flag of how the slice is shown when rendered as GlObject.
 
Flags< CrosssectionRenderModecrosssectionRenderMode () const
 Returns the what is shown when rendering the cross-section with other MPR views.
 
void setCrosssectionRenderMode (Flags< CrosssectionRenderMode > value)
 Sets the what is shown when rendering the cross-section with other MPR views.
 
void setCrosssectionRenderModeFlag (CrosssectionRenderMode crosssectionModeFlag, bool value)
 Sets a single flag of how the slice is shown when rendered as GlObject.
 
bool usesAlphaBlendingToParentFbo () const
 Returns the flag whether to use alpha blending when rendering the result to the parent FBO, set to false to use existing custom blending configuration.
 
void setUseAlphaBlendingToParentFbo (bool value)
 Sets the flag whether to use alpha blending when rendering the result to the parent FBO, set to false to use existing custom blending configuration.
 
const std::vector< std::unique_ptr< GlSliceRenderer > > & renderers () const
 Return the list of all available renderers.
 
void setMatrix (const mat4 &m) override
 Set the modelview matrix of this object.
 
Geometry::AlignedBox bounds () const override
 Get the axis-aligned bounding box of this GlObject in world space.
 
std::string typeName () const override
 Return unique identifier for this object class used for serialization.
 
GlSliceRendererImagedefaultRenderer () const
 Return reference to the default renderer.
 
std::vector< GlSliceRenderer * > activeRenderers () const
 Return the list of all renderers that are used to render the currently set Data.
 
- Public Member Functions inherited from GlObject
virtual Geometry::AlignedBox boundsSpherical () const
 Get the spherical bounds of this GlObject in world space.
 
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 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
 
Configurableoperator= (const Configurable &)
 
Configurableoperator= (Configurable &&) noexcept
 

Protected Attributes

GlCurvedViewm_curvedView = nullptr
 
int m_sliceIdx
 
double m_width
 
double m_height
 
- Protected Attributes inherited from GlSlice
std::vector< std::unique_ptr< GlSliceRenderer > > m_renderers
 List of all slice renderers that can be used for rendering Data.
 
std::vector< RenderInfom_imagesToRender
 The list of images to render.
 
double m_sx
 Half width of the slice.
 
double m_sy
 Half height of the slice.
 
vec3 m_color
 Border color of the slice.
 
bool m_renderFirstImageWithFullOpacity = false
 Show the first image always with full opacity independent of its alpha channel.
 
BlendingMode m_blendingMode = BlendingMode::Default
 Blending mode to use.
 
double m_blendFactor = 0.5
 Blending factor used in alpha blending mode.
 
double m_blendDistance = 16.0
 Stitching overlap in pixels when using DistToBorder blending mode.
 
std::pair< vec4, vec4 > m_blendColors
 Primary and secondary tint color when using color blending.
 
int m_checkerboardFieldSize = 100
 Size of the checkerboard fields in pixels when using Checkerboard blending.
 
std::optional< vec2f > m_customCheckerboardLocation
 Optional custom location for a basic 2x2 checkerboard blending.
 
bool m_is3d
 Flag whether this GlSlice is supposed to show 3D data or 2D data.
 
bool m_useAlphaBlendingToParentFbo = true
 By default GlSlice will use alpha compositing when blending the result to the parent FBO, set to false to use existing custom blending configuration.
 
std::unique_ptr< GL::Programm_blendProg
 Shader used for blending.
 
std::unique_ptr< GL::Framebufferm_fbo
 FBO used for sweep blending.
 
Renderbuffer m_tex [3]
 Auxiliary color+depth texture attached to m_fbo used for blending.
 
std::unique_ptr< GL::VertexBufferm_vbo
 VBO used for rendering primitives.
 
- Protected Attributes inherited from 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 Configurable
std::vector< Paramm_params
 List of all registered Parameter and SubProperty instances.
 

Additional Inherited Members

- Public Types inherited from GlSlice
enum class  BlendingMode {
  None = 0 , Default = 1 , Color = 2 , Checkerboard = 3 ,
  DistanceToBorder = 4 , SingleColor = 5 , DualColor = 6
}
 Enumeration of the blending modes available in GlSlice. More...
 
enum class  ObjectRenderMode {
  Nothing = 0 , Border = 1 << 0 , ImageContent = 1 << 1 , Centerlines = 1 << 2 ,
  Plane = 1 << 3 , Crosssection = 1 << 4
}
 Enumeration for selecting what to render as GlObject. More...
 
enum class  CrosssectionRenderMode {
  Nothing = 0 , Line = 1 << 1 , Thickness = 1 << 2 , OrientationMarkers = 1 << 3 ,
  OrientationMarkersQuadrupedDefault = 1 << 4
}
 Enumeration for selecting how to render the cross-section between this MPR and other MPR slice views. More...
 
- Public Types inherited from GlObject
enum  RenderingOrderGroup { RenderingGroupRest , RenderingGroupMesh , RenderingGroupManipulator }
 Enumeration to determine rendering order of GlObjects in GlSliceView and GlVolumeView. More...
 
- Public Attributes inherited from GlSlice
Signal< GlSlice * > signalSliceChanged
 Signal emitted when the slice configuration has changed.
 
- Public Attributes inherited from Configurable
Signal signalParametersChanged
 Emitted whenever one of the registered Parameters' or SubPropertys' signalValueChanged signal was emitted.
 
- Protected Member Functions inherited from GlSlice
bool drawOtherSlice (const GL::ViewState &viewState, const GlSlice *s) const
 Render the intersection plane of another slice view.
 
void renderMprIntersectionCross (const GlView &parentView) const
 

Constructor & Destructor Documentation

◆ GlCurvedViewOrthoSlice()

GlCurvedViewOrthoSlice ( const Slice & slice,
GlCurvedView * curvedView )

Constructs the ortho slice for the given curve.

Parameters
sliceslice
curvedViewAnnotcurve to construct ortho slice for

Member Function Documentation

◆ setSlice()

void setSlice ( const Slice & s)
inlineoverridevirtual

Set a custom slice in 3D space.

Reimplemented from GlSlice.

◆ draw()

void draw ( const GlView & view)
overridevirtual

Render view.

Implements GlObject.

◆ setMatrix()

void setMatrix ( const mat4 & m)
inlineoverridevirtual

Return the curve.

Returns
curve

Reimplemented from GlObject.

◆ setData()

void setData ( const std::vector< std::pair< const Data *, const DisplayOptions2d * > > & data)
overridevirtual

Set image data, overwritten here to reset slice extent.

Reimplemented from GlSlice.


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