bioformats  5.1.3
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ome::qtwidgets::gl::Grid2D Class Referenceabstract

2D (xy) grid renderer. More...

#include <ome/qtwidgets/gl/Grid2D.h>

+ Inheritance diagram for ome::qtwidgets::gl::Grid2D:
+ Collaboration diagram for ome::qtwidgets::gl::Grid2D:

Public Member Functions

 Grid2D (ome::compat::shared_ptr< ome::bioformats::FormatReader > reader, ome::bioformats::dimension_size_type series, QObject *parent=0)
 Create a 2D grid. More...
 
virtual ~Grid2D ()=0
 Destructor.
 
virtual void create ()
 Create GL buffers. More...
 
virtual void render (const glm::mat4 &mvp, float zoom)=0
 Render the grid. More...
 

Protected Member Functions

virtual void setSize (const glm::vec2 &xlim, const glm::vec2 &ylim)
 Set the size of the x and y axes. More...
 

Protected Attributes

QOpenGLBuffer grid_vertices
 The vertices for the grid.
 
QOpenGLBuffer grid_elements
 The elements for the grid.
 
ome::compat::shared_ptr< ome::bioformats::FormatReaderreader
 The image reader.
 
ome::bioformats::dimension_size_type series
 The image series.
 

Detailed Description

2D (xy) grid renderer.

Draws x and y gridlines for the specified image.

Constructor & Destructor Documentation

ome::qtwidgets::gl::Grid2D::Grid2D ( ome::compat::shared_ptr< ome::bioformats::FormatReader reader,
ome::bioformats::dimension_size_type  series,
QObject *  parent = 0 
)
explicit

Create a 2D grid.

The size and position will be taken from the specified image.

Parameters
readerthe image reader.
seriesthe image series.
parentthe parent of this object.

References setSize().

Member Function Documentation

void ome::qtwidgets::gl::Grid2D::create ( )
virtual

Create GL buffers.

Note
Requires a valid GL context. Must be called before rendering.

Referenced by ome::qtwidgets::GLView2D::initialize().

+ Here is the caller graph for this function:

virtual void ome::qtwidgets::gl::Grid2D::render ( const glm::mat4 &  mvp,
float  zoom 
)
pure virtual

Render the grid.

The zoom level is used to selectively draw gridlines of differing magnitude depending upon the magnification.

Parameters
mvpthe model view projection matrix.
zoomthe zoom level.

Implemented in ome::qtwidgets::gl::v20::Grid2D.

Referenced by ome::qtwidgets::GLView2D::render().

+ Here is the caller graph for this function:

void ome::qtwidgets::gl::Grid2D::setSize ( const glm::vec2 &  xlim,
const glm::vec2 &  ylim 
)
protectedvirtual

Set the size of the x and y axes.

Parameters
xlimthe x axis limits (range).
ylimthe y axis limits (range).

References grid_elements, and grid_vertices.

Referenced by Grid2D().

+ Here is the caller graph for this function:


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