imaging_table Class Reference

#include <imaging_table.h>

Public Types

typedef std::vector< imaging_columncolumn_vector_t
 
typedef std::vector< float > data_vector_t
 

Public Member Functions

 imaging_table ()
 
void set_data (const size_t rows, column_vector_t &cols, data_vector_t &data)
 
float operator() (const size_t r, const column_id c, const size_t subcol=0) const INTEROP_THROW_SPEC((model
 
float operator() (const size_t row, const size_t col, const size_t subcol=0) const INTEROP_THROW_SPEC((model
 
const column_vector_tcolumns () const
 
bool empty () const
 
void clear ()
 
const imaging_columncolumn_at (const size_t col_index) INTEROP_THROW_SPEC((model
 
size_t column_count () const
 
size_t total_column_count () const
 
size_t row_count () const
 

Friends

std::istream & operator>> (std::istream &in, imaging_table &table)
 
std::ostream & operator<< (std::ostream &out, const imaging_table &table)
 

Detailed Description

Describes an imaging table, row data, column headers and boolean filled

Test:
Confirm to_header and to_name properly convert header names

Member Typedef Documentation

typedef std::vector< imaging_column> column_vector_t

Define a column vector

typedef std::vector< float > data_vector_t

Define a data vector

Constructor & Destructor Documentation

imaging_table ( )
inline

Constructor

Member Function Documentation

void clear ( )
inline

Clear the contents of the table

const imaging_column& column_at ( const size_t  col_index)
inline

Get the current column description (which may have subcolumns)

Parameters
col_indexindex of column description
Returns
column description
size_t column_count ( ) const
inline

Number of columns

Returns
column count
const column_vector_t& columns ( ) const
inline

Get a vector of column headers

Returns
column headers
bool empty ( ) const
inline

Test if the table is empty

Returns
true if empty
float operator() ( const size_t  r,
const column_id  c,
const size_t  subcol = 0 
) const
inline

Get a reference to a row

Parameters
rrow row index
ccol column index
subcolsub column offset
Returns
cell value
float operator() ( const size_t  row,
const size_t  col,
const size_t  subcol = 0 
) const
inline

Get a reference to a row

Parameters
rowrow row index
colcol column index
subcolsub column offset
Returns
cell value
size_t row_count ( ) const
inline

Number of rows in the table

Returns
row count
void set_data ( const size_t  rows,
column_vector_t cols,
data_vector_t data 
)
inline

Reserve space for the rows

Parameters
rowsnumber of rows
colscolumn vector
datatable cell data
size_t total_column_count ( ) const
inline

Number of columns including subcolumns in the table

Returns
column count

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  out,
const imaging_table table 
)
friend

Write the imaging table to the output stream in the CSV format

Parameters
outoutput stream
tableimaging table
Returns
output stream
std::istream& operator>> ( std::istream &  in,
imaging_table table 
)
friend

Read an imaging table from an input stream in the CSV format

Parameters
ininput stream
tableimaging table
Returns
input stream

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