core/vnl/vnl_matlab_write.h
Go to the documentation of this file.
00001 // This is core/vnl/vnl_matlab_write.h
00002 #ifndef vnl_matlab_write_h_
00003 #define vnl_matlab_write_h_
00004 #ifdef VCL_NEEDS_PRAGMA_INTERFACE
00005 #pragma interface
00006 #endif
00007 //:
00008 //  \file
00009 //  \brief Write to a MAT file
00010 //
00011 // Core code stolen from D. Capel's code. These functions are useful
00012 // because they allow one to write, say, an image buffer to a MAT file.
00013 //
00014 // NB. with these functions, the variable name \e must be a non-null and
00015 // point to a zero-terminated string. otherwise the code will segfault.
00016 //
00017 //  \author fsm
00018 //
00019 // \verbatim
00020 //  Modifications
00021 //   09 Mar 2000 fsm. changed order of arguments for consistency with \sa vnl_matlab_read.
00022 // \endverbatim
00023 
00024 #include <vcl_iosfwd.h>
00025 
00026 template <class T> // scalar
00027 bool vnl_matlab_write(vcl_ostream &, T const &, char const *variable_name);
00028 
00029 template <class T> // 1D array
00030 bool vnl_matlab_write(vcl_ostream &, T const *, unsigned size, char const *variable_name);
00031 
00032 template <class T> // 2D array
00033 bool vnl_matlab_write(vcl_ostream &, T const * const *, unsigned rows, unsigned cols, char const *variable_name);
00034 
00035 #endif // vnl_matlab_write_h_