OpenStructure
Signals | Public Member Functions | Protected Slots | Protected Attributes
DataViewerPanelBase Class Reference

#include <data_viewer_panel_base.hh>

Inherits QWidget, and DataObserver.

Inherited by DataViewerPanel, and FFTPanel.

Signals

void clicked (const geom::Vec3 &mousepos)
 
void zoomed (int zoomlevel)
 
void selected (const Extent &selection)
 
void deselected ()
 
void slabChanged (int slab)
 
void released (void)
 

Public Member Functions

 DataViewerPanelBase (const ImageHandle &data, QWidget *parent)
 
virtual ~DataViewerPanelBase ()
 
virtual void SetData (const ImageHandle &d)
 
virtual void paintEvent (QPaintEvent *event)
 
virtual void resizeEvent (QResizeEvent *event)
 
virtual void wheelEvent (QWheelEvent *event)
 
virtual void mousePressEvent (QMouseEvent *event)
 
virtual void mouseReleaseEvent (QMouseEvent *event)
 
virtual void mouseMoveEvent (QMouseEvent *event)
 
virtual void keyPressEvent (QKeyEvent *event)
 
virtual void ObserverUpdate ()
 
virtual void ObserverUpdate (const Extent &e)
 
virtual void ObserverUpdate (const Point &p)
 
virtual void ObserverRelease ()
 
void UpdateView (bool update_raster_image=true)
 
void UpdateView (const QRect &rect, bool update_raster_image=true)
 
ViewerNormalizerPtr GetNormalizer () const
 
void Renormalize ()
 
Extent GetSelection () const
 
void SetSelection (const Extent &extent)
 
Point WinToPoint (int mx, int my) const
 
Point WinToPoint (const QPoint &p) const
 
geom::Vec2 WinToFracPoint (const QPoint &p) const
 
geom::Vec2 WinToFracPoint (int mx, int my) const
 
geom::Vec2 WinToFracPointCenter (const QPoint &p) const
 
geom::Vec2 WinToFracPointCenter (int mx, int my) const
 
QPoint PointToWin (const Point &p) const
 
QPoint FracPointToWin (const geom::Vec2 &p) const
 
QPoint FracPointToWinCenter (const geom::Vec2 &p) const
 
bool IsWithin (const QPoint &p) const
 
Real GetZoomScale () const
 
void SetZoomScale (Real zoom)
 
Extent GetExtent ()
 
geom::Vec3 GetPixelSampling ()
 
void SetDefaultCursor (const QCursor &c)
 
void SetDefaultCursor (int id)
 
void SetCursor (const QCursor &c)
 
void SetCursor (int id)
 
void SetDisplayPixelValues (bool show)
 
bool GetDisplayPixelValues ()
 
void Recenter ()
 
void SetColorMode (RasterImage::Mode m)
 
RasterImage::Mode GetColorMode ()
 
void SetFastLowMagnificationDrawing (bool flag)
 
bool GetFastLowMagnificationDrawing ()
 
void SetFastHighMagnificationDrawing (bool flag)
 
bool GetFastHighMagnificationDrawing ()
 
geom::Vec2 GetMousePosition ()
 
void MoveTo (const geom::Vec2 &p)
 
ImageHandle Extract (const Extent &e)
 
void HideClickedPosition ()
 
void ShowClickedPosition (bool show)
 
bool ClickedPositionIsVisible ()
 
bool HasSelection ()
 
geom::Vec3 GetClickedPosition ()
 
Real GetDataMin () const
 
Real GetDataMax () const
 
bool GetInvert () const
 
void SetInvert (bool invert)
 
Real GetGamma () const
 
void SetGamma (Real gamma)
 
void SetViewerMin (Real min)
 
Real GetViewerMin () const
 
void SetViewerMax (Real max)
 
Real GetViewerMax () const
 
void UpdateNormalizer (Real min, Real max, Real gamma, bool invert)
 
int GetSlab ()
 
void SetSlab (int slab)
 
void SetSelectionMode (int mode)
 
int GetSelectionMode ()
 
void SetAntialiasing (bool f)
 
bool GetAntialiasing () const
 
geom::Vec2 GetOffset () const
 
void SetOffset (const geom::Vec2 &offset)
 
- Public Member Functions inherited from DataObserver
 DataObserver (const ImageHandle &d)
 
 DataObserver (const DataObserver &o)
 
DataObserveroperator= (const DataObserver &o)
 
virtual ~DataObserver ()
 
void ObserverInvalidate ()
 
virtual const ImageHandleGetObservedData () const
 
bool IsDataValid () const
 

Protected Slots

void toggle_phase_color ()
 
void normalize ()
 
void center ()
 
void toggle_invert ()
 
void toggle_display_pixels ()
 
void toggle_show_click_pos ()
 
void zoom_plus ()
 
void zoom_minus ()
 
void zoom_reset ()
 
void slab_plus ()
 
void slab_minus ()
 
void slab_start ()
 
void slab_end ()
 
void slab_center ()
 
void toggle_fast_low_mag ()
 
void toggle_fast_high_mag ()
 
void toggle_antialiasing ()
 

Protected Attributes

QMenu * popupmenu_
 

Additional Inherited Members

- Protected Member Functions inherited from DataObserver
void SetObservedData (const ImageHandle &d)
 
bool is_valid () const
 

Detailed Description

Definition at line 56 of file data_viewer_panel_base.hh.

Constructor & Destructor Documentation

◆ DataViewerPanelBase()

DataViewerPanelBase ( const ImageHandle data,
QWidget *  parent 
)

◆ ~DataViewerPanelBase()

virtual ~DataViewerPanelBase ( )
virtual

Member Function Documentation

◆ center

void center ( )
protectedslot

◆ clicked

void clicked ( const geom::Vec3 mousepos)
signal

◆ ClickedPositionIsVisible()

bool ClickedPositionIsVisible ( )

◆ deselected

void deselected ( )
signal

◆ Extract()

ImageHandle Extract ( const Extent e)

◆ FracPointToWin()

QPoint FracPointToWin ( const geom::Vec2 p) const

convert fractional image point to window coordinates (top left corner of point)

◆ FracPointToWinCenter()

QPoint FracPointToWinCenter ( const geom::Vec2 p) const

convert fractional image point to window coordinates (center of point)

◆ GetAntialiasing()

bool GetAntialiasing ( ) const

◆ GetClickedPosition()

geom::Vec3 GetClickedPosition ( )

◆ GetColorMode()

RasterImage::Mode GetColorMode ( )
inline

Definition at line 161 of file data_viewer_panel_base.hh.

◆ GetDataMax()

Real GetDataMax ( ) const

◆ GetDataMin()

Real GetDataMin ( ) const

◆ GetDisplayPixelValues()

bool GetDisplayPixelValues ( )
inline

Definition at line 151 of file data_viewer_panel_base.hh.

◆ GetExtent()

Extent GetExtent ( )

retrieve the extent of the image

◆ GetFastHighMagnificationDrawing()

bool GetFastHighMagnificationDrawing ( )

◆ GetFastLowMagnificationDrawing()

bool GetFastLowMagnificationDrawing ( )

◆ GetGamma()

Real GetGamma ( ) const

◆ GetInvert()

bool GetInvert ( ) const

◆ GetMousePosition()

geom::Vec2 GetMousePosition ( )
inline

Definition at line 169 of file data_viewer_panel_base.hh.

◆ GetNormalizer()

ViewerNormalizerPtr GetNormalizer ( ) const

retrieve ptr to internal normalizer

◆ GetOffset()

geom::Vec2 GetOffset ( ) const

◆ GetPixelSampling()

geom::Vec3 GetPixelSampling ( )

retrieve the pixel sampling of the image

◆ GetSelection()

Extent GetSelection ( ) const

return currently active selection

if no selection is present, return Extent()

◆ GetSelectionMode()

int GetSelectionMode ( )

◆ GetSlab()

int GetSlab ( )

◆ GetViewerMax()

Real GetViewerMax ( ) const

◆ GetViewerMin()

Real GetViewerMin ( ) const

◆ GetZoomScale()

Real GetZoomScale ( ) const

retrieve the zoomscale

◆ HasSelection()

bool HasSelection ( )

◆ HideClickedPosition()

void HideClickedPosition ( )

◆ IsWithin()

bool IsWithin ( const QPoint &  p) const

checks if given point is visible in current panel

◆ keyPressEvent()

virtual void keyPressEvent ( QKeyEvent *  event)
virtual

◆ mouseMoveEvent()

virtual void mouseMoveEvent ( QMouseEvent *  event)
virtual

◆ mousePressEvent()

virtual void mousePressEvent ( QMouseEvent *  event)
virtual

◆ mouseReleaseEvent()

virtual void mouseReleaseEvent ( QMouseEvent *  event)
virtual

◆ MoveTo()

void MoveTo ( const geom::Vec2 p)

◆ normalize

void normalize ( )
protectedslot

◆ ObserverRelease()

virtual void ObserverRelease ( )
virtual

Called if data is released from memory.

Implements DataObserver.

◆ ObserverUpdate() [1/3]

virtual void ObserverUpdate ( )
virtual

called upon data change, noop by default

Reimplemented from DataObserver.

Reimplemented in FFTPanel.

◆ ObserverUpdate() [2/3]

virtual void ObserverUpdate ( const Extent )
virtual

special update, calls ObserverUpdate() by default

Reimplemented from DataObserver.

◆ ObserverUpdate() [3/3]

virtual void ObserverUpdate ( const Point )
virtual

special update, calls ObserverUpdate() by default

Reimplemented from DataObserver.

◆ paintEvent()

virtual void paintEvent ( QPaintEvent *  event)
virtual

◆ PointToWin()

QPoint PointToWin ( const Point p) const

convert image point to window coordinates

◆ Recenter()

void Recenter ( )

re-center with spatial origin in the middle of the window

◆ released

void released ( void  )
signal

◆ Renormalize()

void Renormalize ( )

do a renormalization with the current normalizer

◆ resizeEvent()

virtual void resizeEvent ( QResizeEvent *  event)
virtual

◆ selected

void selected ( const Extent selection)
signal

◆ SetAntialiasing()

void SetAntialiasing ( bool  f)

◆ SetColorMode()

void SetColorMode ( RasterImage::Mode  m)

set coloring mode to either greyscale or phasecolor

◆ SetCursor() [1/2]

void SetCursor ( const QCursor &  c)

set cursor

◆ SetCursor() [2/2]

void SetCursor ( int  id)

◆ SetData()

virtual void SetData ( const ImageHandle d)
virtual

Reimplemented in FFTPanel.

◆ SetDefaultCursor() [1/2]

void SetDefaultCursor ( const QCursor &  c)

set default cursor

◆ SetDefaultCursor() [2/2]

void SetDefaultCursor ( int  id)

◆ SetDisplayPixelValues()

void SetDisplayPixelValues ( bool  show)

set display pixelvalues

◆ SetFastHighMagnificationDrawing()

void SetFastHighMagnificationDrawing ( bool  flag)

◆ SetFastLowMagnificationDrawing()

void SetFastLowMagnificationDrawing ( bool  flag)

set/get fast drawing modes for low and high magnification

◆ SetGamma()

void SetGamma ( Real  gamma)

◆ SetInvert()

void SetInvert ( bool  invert)

◆ SetOffset()

void SetOffset ( const geom::Vec2 offset)

◆ SetSelection()

void SetSelection ( const Extent extent)

set currently active selection

◆ SetSelectionMode()

void SetSelectionMode ( int  mode)

◆ SetSlab()

void SetSlab ( int  slab)

◆ SetViewerMax()

void SetViewerMax ( Real  max)

◆ SetViewerMin()

void SetViewerMin ( Real  min)

◆ SetZoomScale()

void SetZoomScale ( Real  zoom)

set the zoomscale

◆ ShowClickedPosition()

void ShowClickedPosition ( bool  show)

◆ slab_center

void slab_center ( )
protectedslot

◆ slab_end

void slab_end ( )
protectedslot

◆ slab_minus

void slab_minus ( )
protectedslot

◆ slab_plus

void slab_plus ( )
protectedslot

◆ slab_start

void slab_start ( )
protectedslot

◆ slabChanged

void slabChanged ( int  slab)
signal

◆ toggle_antialiasing

void toggle_antialiasing ( )
protectedslot

◆ toggle_display_pixels

void toggle_display_pixels ( )
protectedslot

◆ toggle_fast_high_mag

void toggle_fast_high_mag ( )
protectedslot

◆ toggle_fast_low_mag

void toggle_fast_low_mag ( )
protectedslot

◆ toggle_invert

void toggle_invert ( )
protectedslot

◆ toggle_phase_color

void toggle_phase_color ( )
protectedslot

◆ toggle_show_click_pos

void toggle_show_click_pos ( )
protectedslot

◆ UpdateNormalizer()

void UpdateNormalizer ( Real  min,
Real  max,
Real  gamma,
bool  invert 
)

◆ UpdateView() [1/2]

void UpdateView ( bool  update_raster_image = true)

update view

◆ UpdateView() [2/2]

void UpdateView ( const QRect &  rect,
bool  update_raster_image = true 
)

◆ wheelEvent()

virtual void wheelEvent ( QWheelEvent *  event)
virtual

◆ WinToFracPoint() [1/2]

geom::Vec2 WinToFracPoint ( const QPoint &  p) const

convert window coordinates to fractional image point

◆ WinToFracPoint() [2/2]

geom::Vec2 WinToFracPoint ( int  mx,
int  my 
) const

◆ WinToFracPointCenter() [1/2]

geom::Vec2 WinToFracPointCenter ( const QPoint &  p) const

◆ WinToFracPointCenter() [2/2]

geom::Vec2 WinToFracPointCenter ( int  mx,
int  my 
) const

◆ WinToPoint() [1/2]

Point WinToPoint ( const QPoint &  p) const

◆ WinToPoint() [2/2]

Point WinToPoint ( int  mx,
int  my 
) const

convert window coordinates to image point

◆ zoom_minus

void zoom_minus ( )
protectedslot

◆ zoom_plus

void zoom_plus ( )
protectedslot

◆ zoom_reset

void zoom_reset ( )
protectedslot

◆ zoomed

void zoomed ( int  zoomlevel)
signal

Field Documentation

◆ popupmenu_

QMenu* popupmenu_
protected

Definition at line 208 of file data_viewer_panel_base.hh.


The documentation for this class was generated from the following file: