ImFusion SDK 4.3
PixelInfoOverlay Class Reference

#include <ImFusion/GUI/PixelInfoOverlay.h>

InfoOverlay to show information about the pixel currently underneath the mouse cursor. More...

+ Inheritance diagram for PixelInfoOverlay:

Detailed Description

InfoOverlay to show information about the pixel currently underneath the mouse cursor.

Public Types

enum  Coordinates { NoCoordinates = 0 , ShowPixelCoordinates = 1 << 0 , ShowWorldCoordinates = 1 << 1 }
 Bitmask enum to select which coordinates to show in overlay. More...
 
enum  ValueDomains { ShowOriginalValuesOnly = 0 , ShowStorageValues = 1 << 0 , ShowRealWorldUnits = 1 << 1 }
 Bitmask enum to select which value domain/unit to use when printing pixel intensities. More...
 
- Public Types inherited from InfoOverlay
enum class  Style { Overlay = 0 , Tooltip }
 Enumeration specifying how the text information shall be presented. More...
 
- Public Types inherited from ViewOverlay
enum class  Anchor {
  BottomLeft = 0 , BottomRight = 1 , TopLeft = 2 , TopRight = 3 ,
  Top = 4 , Bottom = 5 , Left = 6 , Right = 7 ,
  Fill = 8
}
 Anchor point of the overlay in the parent View. More...
 
enum class  LayoutDirection { Horizontal = 0 , Vertical = 1 }
 Layout direction when stacking multiple ViewOverlays at the same anchor.
 

Public Member Functions

 PixelInfoOverlay (const SliceView &view)
 Instantiate an PixelInfoOverlay for the given 2D view.
 
 PixelInfoOverlay (const ImageView2D &view)
 
Flags< CoordinatesshownCoordinates () const
 Returns the selected coordinate systems to show.
 
void setShownCoordinates (Flags< Coordinates > value)
 Sets the selected coordinate systems to show.
 
Flags< ValueDomainsshownValueDomains () const
 Returns the selected value domains to show.
 
void setShownValueDomains (Flags< ValueDomains > value)
 Sets the selected value domains to show.
 
- Public Member Functions inherited from InfoOverlay
const vec4 & textColor ()
 Returns the used text color in Style::Overlay mode.
 
void setTextColor (const vec4 &color)
 Set the used text color in Style::Overlay mode.
 
void setStyle (Style s)
 
Style style () const
 
GlTextOverlayglOverlay ()
 Get a pointer to the underlying GlTextOverlay to allow for more customization than setTextColor().
 
void render () override
 Calls GlOverlay::render() on the underlying glOverlay() using the current viewport() shrinked by margin().
 
EventResult handleInputEvent (const InputEvent &event) override
 Handle a user event received from the parent View.
 
- Public Member Functions inherited from ViewOverlay
 ViewOverlay (std::unique_ptr< GlOverlay > glOverlay)
 Instantiate a new ViewOverlay taking ownership of the underlying GlOverlay which must not be null.
 
const GlOverlayglOverlay () const
 Get a pointer to the underlying overlay.
 
GlOverlayglOverlay ()
 Get a pointer to the underlying overlay.
 
const GL::Viewportviewport ()
 Returns the area where this overlay is rendered.
 
bool isVisible () const
 Returns the visibility of this overlay.
 
virtual void setVisible (bool value)
 Sets the visibility of this overlay.
 
const vec2i & margin () const
 Returns the margin in pixels between the border of the drawing area and the border of the overlay content.
 
void setMargin (const vec2i &value)
 Sets the margin in pixels between the border of the drawing area and the border of the overlay content.
 
vec2i minimalSizeHint () const
 Returns the underlying GlOverlay's minimal size hint plus the configured margin().
 
vec2i sizeHint () const
 Returns the underlying GlOverlay's size hint plus the configured margin().
 
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
 
- Public Member Functions inherited from SignalReceiver
 SignalReceiver ()=default
 Default constructor.
 
 SignalReceiver (const SignalReceiver &other)
 Copy constructor, does not copy any existing signal connections from other.
 
SignalReceiveroperator= (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.
 

Protected Member Functions

std::string createSizeHintText () override
 Implement this function to return a largest sample text that would give a hint about the necessary overlay size.
 
std::string createText (vec2i mousePositionPx) override
 Implement this function to specify what text to display for the given mouse position.
 
std::string lookupPixelIntensity (const SharedImageSet &sis, const vec3i &pixelPos) const
 
- Protected Member Functions inherited from InfoOverlay
void updateSizeHint ()
 Updates the size hint of the overlay so that the view overlay layouting can be updated.
 
- Protected Member Functions inherited from SignalReceiver
void disconnectAll ()
 Disconnects all existing connections.
 

Protected Attributes

const Viewm_view = nullptr
 parent view to use for pixel lookup
 
const GlSliceViewm_sliceView = nullptr
 parent view to use for pixel lookup
 
Flags< Coordinatesm_shownCoordinates = ShowPixelCoordinates
 Selected coordinate systems to show in overlay.
 
Flags< ValueDomainsm_shownValueDomains = ShowOriginalValuesOnly
 Selected value domains to show in overlay.
 
- Protected Attributes inherited from InfoOverlay
GlTextOverlaym_textOverlay = nullptr
 
Style m_style = Style::Overlay
 
std::optional< vec2i > m_pixelPos = std::nullopt
 
std::string m_text
 
- Protected Attributes inherited from ViewOverlay
std::unique_ptr< GlOverlaym_glOverlay
 
GL::Viewport m_viewport = {}
 
vec2i m_margin = vec2i::Zero()
 
bool m_isVisible = true
 
- Protected Attributes inherited from Configurable
std::vector< Paramm_params
 List of all registered Parameter and SubProperty instances.
 

Additional Inherited Members

- Public Attributes inherited from ViewOverlay
Signal signalUpdateRequested
 Emitted in order to notify the parent Display that it's contents have changed and need to be re-rendered.
 
Signal signalLayoutNeeded
 Emitted whenever the size hints or margin have changed to notify the parent View that it needs to perform overlay layouting.
 
- Public Attributes inherited from Configurable
Signal signalParametersChanged
 Emitted whenever one of the registered Parameters' or SubPropertys' signalValueChanged signal was emitted.
 

Member Enumeration Documentation

◆ Coordinates

Bitmask enum to select which coordinates to show in overlay.

See also
CoordinateSystems
Enumerator
NoCoordinates 

Don't show coordinates under mouse cursor.

ShowPixelCoordinates 

Show pixel coordinates under mouse cursor.

ShowWorldCoordinates 

Show world coordinates under mouse cursor.

◆ ValueDomains

Bitmask enum to select which value domain/unit to use when printing pixel intensities.

See also
PixelValueDomains
Enumerator
ShowOriginalValuesOnly 

Show only values in original value domain, i.e. storage values with shift/scale applied.

ShowStorageValues 

Show only values as stored currently in memory.

ShowRealWorldUnits 

Additionally print units if a RealWorldMappingDataComponent is present.

Warning
PixelInfoOverlay does not validate if the unit information is accurate.

Member Function Documentation

◆ createSizeHintText()

std::string createSizeHintText ( )
overrideprotectedvirtual

Implement this function to return a largest sample text that would give a hint about the necessary overlay size.

Implements InfoOverlay.

◆ createText()

std::string createText ( vec2i mousePositionPx)
overrideprotectedvirtual

Implement this function to specify what text to display for the given mouse position.

Implements InfoOverlay.


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