Functions
vnl_matlab_write.h File Reference

Write to a MAT file. More...

#include <iosfwd>
#include "vnl/vnl_export.h"

Go to the source code of this file.

Functions

template<class T >
VNL_EXPORT bool vnl_matlab_write (std::ostream &, T const &, char const *variable_name)
 scalars. More...
 
template<class T >
VNL_EXPORT bool vnl_matlab_write (std::ostream &, T const *, unsigned size, char const *variable_name)
 1D array. More...
 
template<class T >
VNL_EXPORT bool vnl_matlab_write (std::ostream &, T const *const *, unsigned rows, unsigned cols, char const *variable_name)
 2D array. More...
 

Detailed Description

Write to a MAT file.

Core code stolen from D. Capel's code. These functions are useful because they allow one to write, say, an image buffer to a MAT file.

NB. with these functions, the variable name must be a non-null and point to a zero-terminated string. otherwise the code will segfault.

Author
fsm
  Modifications
   09 Mar 2000 fsm. changed order of arguments for consistency with \sa vnl_matlab_read.

Definition in file vnl_matlab_write.h.

Function Documentation

◆ vnl_matlab_write() [1/3]

template<class T >
VNL_EXPORT bool vnl_matlab_write ( std::ostream &  ,
T const &  ,
char const *  variable_name 
)

scalars.

Definition at line 90 of file vnl_matlab_write.cxx.

◆ vnl_matlab_write() [2/3]

template<class T >
VNL_EXPORT bool vnl_matlab_write ( std::ostream &  ,
T const *  ,
unsigned  size,
char const *  variable_name 
)

1D array.

Definition at line 111 of file vnl_matlab_write.cxx.

◆ vnl_matlab_write() [3/3]

template<class T >
VNL_EXPORT bool vnl_matlab_write ( std::ostream &  ,
T const *const *  ,
unsigned  rows,
unsigned  cols,
char const *  variable_name 
)

2D array.

Definition at line 132 of file vnl_matlab_write.cxx.