libpniio
Public Member Functions | Private Attributes
pni::io::image_info Class Reference

image information type More...

#include <image_info.hpp>

Collaboration diagram for pni::io::image_info:
Collaboration graph
[legend]

Public Member Functions

 image_info ()
 default constructor More...
 
 image_info (size_t nx, size_t ny)
 standard constructor More...
 
 image_info (image_info &&i)
 move constructor More...
 
 image_info (const image_info &i)
 copy constructor More...
 
image_infooperator= (image_info &&i)
 move assignment operator More...
 
image_infooperator= (const image_info &i)
 copy assignment operator More...
 
size_t nx () const
 get pixels along x More...
 
size_t ny () const
 get pixels along y More...
 
size_t npixels () const
 get total number of pixels More...
 
size_t bit_per_pixel () const
 get number of bits per pixel More...
 
std::vector< size_t > bits_per_channel () const
 get bits per channel More...
 
std::vector< pni::core::type_id_t > types_per_channel () const
 get types per channel More...
 
size_t nchannels () const
 get number of channels More...
 
void append_channel (const image_channel_info &i)
 append a new channel More...
 
image_channel_info get_channel (size_t i) const
 get channel information More...
 

Private Attributes

size_t _nx
 number of pixels in x-direction More...
 
size_t _ny
 number of pixels in y-direction More...
 
std::vector< image_channel_info_channel_info
 channel information More...
 

Detailed Description

ImageInfo holds basic information about a particular image.

Constructor & Destructor Documentation

pni::io::image_info::image_info ( )
inline
pni::io::image_info::image_info ( size_t  nx,
size_t  ny 
)
Parameters
nxnumber of pixels in x-direction
nynumber of pixels in y-direction
pni::io::image_info::image_info ( image_info &&  i)
pni::io::image_info::image_info ( const image_info i)

Member Function Documentation

void pni::io::image_info::append_channel ( const image_channel_info i)

Append information about a channel to the image information class.

Parameters
ichannel information
size_t pni::io::image_info::bit_per_pixel ( ) const
inline

Return the number of bits per pixel.

Returns
number of bits per pixel
std::vector< size_t > pni::io::image_info::bits_per_channel ( ) const

Return the number of bits used to store data for each channel.

Returns
vector with the number of bits for each channel
image_channel_info pni::io::image_info::get_channel ( size_t  i) const

Return the channel information for channle i.

Parameters
ichannel number
Returns
channel information.
size_t pni::io::image_info::nchannels ( ) const
inline
Returns
number of channels
size_t pni::io::image_info::npixels ( ) const
inline

Computes the total number of pixels of the image (nx*ny).

Returns
total number of pixels.
size_t pni::io::image_info::nx ( ) const
inline
Returns
number of pixels in x-direction
size_t pni::io::image_info::ny ( ) const
inline
Returns
number of pixels in y-direction
image_info & pni::io::image_info::operator= ( image_info &&  i)
image_info & pni::io::image_info::operator= ( const image_info i)
std::vector< type_id_t > pni::io::image_info::types_per_channel ( ) const

Return a vector with the different types per channel.

Returns
vector with data types for each channel

Field Documentation

std::vector<image_channel_info> pni::io::image_info::_channel_info
private
size_t pni::io::image_info::_nx
private
size_t pni::io::image_info::_ny
private

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