GNU Octave  3.8.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions
__magick_read__.cc File Reference
#include "file-stat.h"
#include "oct-env.h"
#include "oct-time.h"
#include "defun-dld.h"
#include "error.h"
#include "ov-struct.h"
#include "gripes.h"
#include <Magick++.h>
#include <clocale>
Include dependency graph for __magick_read__.cc:

Go to the source code of this file.

Functions

template<class T >
static octave_idx_type bitdepth_from_class ()
static std::map< std::string,
octave_idx_type
calculate_region (const octave_scalar_map &options)
 DEFUN_DLD (__magick_read__, args, nargout,"-*- texinfo -*-\n\ @deftypefn {Loadable Function} {[@var{img}, @var{map}, @var{alpha}] =} __magick_read__ (@var{fname}, @var{options})\n\ Read image with GraphicsMagick or ImageMagick.\n\ \n\ This is a private internal function not intended for direct use. Instead\n\ use @code{imread}.\n\ \n\ @seealso{imfinfo, imformats, imread, imwrite}\n\ @end deftypefn")
 DEFUN_DLD (__magick_write__, args,,"-*- texinfo -*-\n\ @deftypefn {Loadable Function} {} __magick_write__ (@var{fname}, @var{fmt}, @var{img}, @var{map}, @var{options})\n\ Write image with GraphicsMagick or ImageMagick.\n\ \n\ This is a private internal function not intended for direct use. Instead\n\ use @code{imwrite}.\n\ \n\ @seealso{imfinfo, imformats, imread, imwrite}\n\ @end deftypefn")
 DEFUN_DLD (__magick_ping__, args,,"-*- texinfo -*-\n\ @deftypefn {Loadable Function} {} __magick_ping__ (@var{fname}, @var{idx})\n\ Ping image information with GraphicsMagick or ImageMagick.\n\ \n\ This is a private internal function not intended for direct use.\n\ \n\ @seealso{imfinfo}\n\ @end deftypefn")
 DEFUN_DLD (__magick_finfo__, args,,"-*- texinfo -*-\n\ @deftypefn {Loadable Function} {} __magick_finfo__ (@var{fname})\n\ Read image information with GraphicsMagick or ImageMagick.\n\ \n\ This is a private internal function not intended for direct use. Instead\n\ use @code{imfinfo}.\n\ \n\ @seealso{imfinfo, imformats, imread, imwrite}\n\ @end deftypefn")
 DEFUN_DLD (__magick_formats__, args,,"-*- texinfo -*-\n\ @deftypefn {Loadable Function} {} __magick_imformats__ (@var{formats})\n\ Fill formats info with GraphicsMagick CoderInfo.\n\ \n\ @seealso{imfinfo, imformats, imread, imwrite}\n\ @end deftypefn")
static void encode_bool_image (std::vector< Magick::Image > &imvec, const boolNDArray &img)
template<class T >
static void encode_indexed_images (std::vector< Magick::Image > &imvec, const T &img, const Matrix &cmap)
template<class T >
static void encode_uint_image (std::vector< Magick::Image > &imvec, const T &img, const T &alpha)
static void fill_exif (octave_scalar_map &map, Magick::Image &img, const std::string &key)
static void fill_exif_floats (octave_scalar_map &map, Magick::Image &img, const std::string &key)
static void fill_exif_ints (octave_scalar_map &map, Magick::Image &img, const std::string &key)
static octave_idx_type get_depth (Magick::Image &img)
static Range get_region_range (const octave_value &region)
template<class T >
static uint32NDArray img_float2uint (const T &img)
static std::map
< octave_idx_type, std::string > 
init_disposal_methods ()
static Magick::Image init_enconde_image (const octave_idx_type &nCols, const octave_idx_type &nRows, const octave_idx_type &bitdepth, const Magick::ImageType &type, const Magick::ClassType &klass)
static std::map< std::string,
octave_idx_type
init_reverse_disposal_methods ()
static bool is_indexed (const Magick::Image &img)
static bool is_valid_exif (const std::string &val)
static octave_value magick_to_octave_value (const Magick::CompressionType &magick)
static octave_value magick_to_octave_value (const Magick::EndianType &magick)
static octave_value magick_to_octave_value (const Magick::OrientationType &magick)
static octave_value magick_to_octave_value (const Magick::ResolutionType &magick)
static void maybe_initialize_magick (void)
static void read_file (const std::string &filename, std::vector< Magick::Image > &imvec)
template<class T >
octave_value_list read_images (std::vector< Magick::Image > &imvec, const Array< octave_idx_type > &frameidx, const octave_idx_type &nargout, const octave_scalar_map &options)
template<class T >
static octave_value_list read_indexed_images (const std::vector< Magick::Image > &imvec, const Array< octave_idx_type > &frameidx, const octave_idx_type &nargout, const octave_scalar_map &options)
static octave_value_list read_maps (Magick::Image &img)
static void write_file (const std::string &filename, const std::string &ext, std::vector< Magick::Image > &imvec)

Function Documentation

template<class T >
static octave_idx_type bitdepth_from_class ( )
static

Definition at line 851 of file __magick_read__.cc.

static std::map<std::string, octave_idx_type> calculate_region ( const octave_scalar_map options)
static
DEFUN_DLD ( __magick_read__  ,
args  ,
nargout   
)
DEFUN_DLD ( __magick_write__  ,
args   
)
DEFUN_DLD ( __magick_ping__  ,
args   
)
DEFUN_DLD ( __magick_finfo__  ,
args   
)
DEFUN_DLD ( __magick_formats__  ,
args   
)
static void encode_bool_image ( std::vector< Magick::Image > &  imvec,
const boolNDArray img 
)
static
template<class T >
static void encode_indexed_images ( std::vector< Magick::Image > &  imvec,
const T &  img,
const Matrix cmap 
)
static
template<class T >
static void encode_uint_image ( std::vector< Magick::Image > &  imvec,
const T &  img,
const T &  alpha 
)
static

Definition at line 1006 of file __magick_read__.cc.

References error(), and init_enconde_image().

static void fill_exif ( octave_scalar_map map,
Magick::Image &  img,
const std::string &  key 
)
static

Definition at line 1683 of file __magick_read__.cc.

References is_valid_exif(), and octave_scalar_map::setfield().

Referenced by DEFUN_DLD().

static void fill_exif_floats ( octave_scalar_map map,
Magick::Image &  img,
const std::string &  key 
)
static

Definition at line 1716 of file __magick_read__.cc.

References is_valid_exif(), and octave_scalar_map::setfield().

Referenced by DEFUN_DLD().

static void fill_exif_ints ( octave_scalar_map map,
Magick::Image &  img,
const std::string &  key 
)
static

Definition at line 1693 of file __magick_read__.cc.

References is_valid_exif(), and octave_scalar_map::setfield().

Referenced by DEFUN_DLD().

static octave_idx_type get_depth ( Magick::Image &  img)
static

Definition at line 104 of file __magick_read__.cc.

Referenced by DEFUN_DLD().

static Range get_region_range ( const octave_value region)
static
template<class T >
static uint32NDArray img_float2uint ( const T &  img)
static

Definition at line 831 of file __magick_read__.cc.

References max(), and octave_int< T >::max().

static std::map<octave_idx_type, std::string> init_disposal_methods ( )
static

Definition at line 1275 of file __magick_read__.cc.

Referenced by DEFUN_DLD().

static Magick::Image init_enconde_image ( const octave_idx_type nCols,
const octave_idx_type nRows,
const octave_idx_type bitdepth,
const Magick::ImageType &  type,
const Magick::ClassType &  klass 
)
static

Definition at line 860 of file __magick_read__.cc.

Referenced by encode_bool_image(), encode_indexed_images(), and encode_uint_image().

static std::map<std::string, octave_idx_type> init_reverse_disposal_methods ( )
static

Definition at line 1303 of file __magick_read__.cc.

Referenced by DEFUN_DLD().

static bool is_indexed ( const Magick::Image &  img)
static

Definition at line 75 of file __magick_read__.cc.

Referenced by DEFUN_DLD().

static bool is_valid_exif ( const std::string &  val)
static

Definition at line 1675 of file __magick_read__.cc.

Referenced by fill_exif(), fill_exif_floats(), and fill_exif_ints().

static octave_value magick_to_octave_value ( const Magick::CompressionType &  magick)
static

Definition at line 1577 of file __magick_read__.cc.

References octave_value().

Referenced by DEFUN_DLD().

static octave_value magick_to_octave_value ( const Magick::EndianType &  magick)
static

Definition at line 1620 of file __magick_read__.cc.

References octave_value().

static octave_value magick_to_octave_value ( const Magick::OrientationType &  magick)
static

Definition at line 1634 of file __magick_read__.cc.

References octave_value().

static octave_value magick_to_octave_value ( const Magick::ResolutionType &  magick)
static

Definition at line 1661 of file __magick_read__.cc.

References octave_value().

static void maybe_initialize_magick ( void  )
static

Definition at line 663 of file __magick_read__.cc.

References octave_env::get_program_invocation_name(), initialized, and warning().

Referenced by DEFUN_DLD().

static void read_file ( const std::string &  filename,
std::vector< Magick::Image > &  imvec 
)
static

Definition at line 645 of file __magick_read__.cc.

References error(), error_state, Faddeeva::w(), and warning().

Referenced by DEFUN_DLD().

template<class T >
octave_value_list read_images ( std::vector< Magick::Image > &  imvec,
const Array< octave_idx_type > &  frameidx,
const octave_idx_type nargout,
const octave_scalar_map options 
)

Definition at line 286 of file __magick_read__.cc.

References calculate_region(), error(), Array< T >::length(), and max().

template<class T >
static octave_value_list read_indexed_images ( const std::vector< Magick::Image > &  imvec,
const Array< octave_idx_type > &  frameidx,
const octave_idx_type nargout,
const octave_scalar_map options 
)
static
static octave_value_list read_maps ( Magick::Image &  img)
static

Definition at line 170 of file __magick_read__.cc.

Referenced by DEFUN_DLD(), and read_indexed_images().

static void write_file ( const std::string &  filename,
const std::string &  ext,
std::vector< Magick::Image > &  imvec 
)
static

Definition at line 1317 of file __magick_read__.cc.

References error(), error_state, Faddeeva::w(), and warning().

Referenced by DEFUN_DLD().