Skip to content

Struct cuvis::common_image_t

template <typename data_t>

ClassList > cuvis > common_image_t

Metaclass for handling image data (2d or 3d) More...

  • #include <cuvis.hpp>

Inherited by the following classes: cuvis::image_t, cuvis::view_t

Public Attributes

Type Name
std::size_t _channels
data_t const * _data
The raw data pointer.
std::size_t _height
std::size_t _width

Public Functions

Type Name
data_t const & get (std::size_t x, std::size_t y, std::size_t z=std::size_t(0)) const

Detailed Description

Holds an X/Y/Z- dimensional image cube, without wavelength informaiton.

Template parameters:

  • data_t The pixel bit depth, either std::uint8_t, std::uint16_t, std::uint32_t or float

Public Attributes Documentation

variable _channels

std::size_t cuvis::common_image_t< data_t >::_channels;

number of channels


variable _data

The raw data pointer.

data_t const* cuvis::common_image_t< data_t >::_data;

It is recommended to access the data with the get function. The memory interleave is BIP. E.g. for a 3x3x2 (x,y,z) the coordinates are:

(0,0,0); (0,0,1); (0,1,0); (0,1,1)

(1,0,0); (1,0,1); (1,1,0); (0,1,1)

(2,0,0); (2,0,1); (2,1,0); (0,1,1)


variable _height

std::size_t cuvis::common_image_t< data_t >::_height;

height of channel(Z - dimension)


variable _width

std::size_t cuvis::common_image_t< data_t >::_width;

width of channel(X - dimension)


Public Functions Documentation

function get

data_t  const & cuvis::common_image_t::get (
    std::size_t x,
    std::size_t y,
    std::size_t z=std::size_t(0)
) const

Access to a given memory location within _data

Parameters:

  • x x pixel position (0 - _width - 1)
  • y y pixel position (0 - _height - 1)
  • y z pixel position (0 - _channels - 1), Use "0" for a 2d image

Returns:

the pixel value of the image / cube at position (x,y,z)



The documentation for this class was generated from the following file cuvis.cpp/interface/cuvis.hpp