ome-qtwidgets 5.2.0

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

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:
[legend]
Collaboration diagram for ome::qtwidgets::gl::Grid2D:
[legend]

## Public Member Functions
| Grid2D (ome::compat::shared_ptr< ome::files::FormatReader > reader, ome::files::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::files::FormatReader > | reader
| The image reader.
ome::files::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::files::FormatReader > | reader,
|  | ome::files::dimension_size_type | series,
|  | QObject * | parent = `0`
| ) |  |
| explicit

Create a 2D grid.

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

Parameters

  reader | the image reader.
  series | the image series.
  parent | the 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

  mvp | the model view projection matrix.
  zoom | the 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
| ) |  |
| protected virtual

Set the size of the x and y axes.

Parameters

  xlim | the x axis limits (range).
  ylim | the 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:

- ome/qtwidgets/gl/Grid2D.h
- ome/qtwidgets/gl/Grid2D.cpp