Class Image

Class Documentation

class Image

An image class. This stores unwrapped values of the icosahedron as a 2D image

Public Functions

Image(int rows, int cols, int bytes_per_channel, bool is_float = false)

Construct a new Image object.

Parameters
  • rows: Rows in image

  • cols: Columns in image

  • bytes_per_channel: Bytes per channel (e.g., Float32 = 4)

  • is_float: Weather the data is a float or an int

template<typename T>template uint8_t * FastGA::Ico::Image::PointerAt< uint8_t >(int u, int v)

Access the data of the image.

Return

T* Pointer to data

Template Parameters
  • T: Data type

Parameters
  • u: Index of first dimension, column

  • v: Index of second dimension, row

Public Members

std::vector<uint8_t> buffer_

The underlying memory buffer of the data.

int rows_

the rows in the image

int cols_

the columns in the image

int bytes_per_channel_

the bytes per pixel in a chanel, e.g, Float32 = 4

bool is_float_

Weather the data is a float or an int.