GNU Octave
3.8.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
|
#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>
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 ®ion) |
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) |
|
static |
Definition at line 851 of file __magick_read__.cc.
|
static |
Definition at line 139 of file __magick_read__.cc.
References Range::base(), octave_value::cell_value(), get_region_range(), octave_scalar_map::getfield(), Range::inc(), Range::max(), and Range::nelem().
Referenced by read_images(), and read_indexed_images().
DEFUN_DLD | ( | __magick_read__ | , |
args | , | ||
nargout | |||
) |
Definition at line 690 of file __magick_read__.cc.
References error(), error_state, get_depth(), octave_scalar_map::getfield(), gripe_disabled_feature(), octave_value::int_vector_value(), is_indexed(), octave_value::is_string(), maybe_initialize_magick(), Array< T >::nelem(), print_usage(), read_file(), Array< T >::resize(), and octave_value::string_value().
DEFUN_DLD | ( | __magick_write__ | , |
args | |||
) |
Definition at line 1342 of file __magick_read__.cc.
References octave_value::array_value(), octave_value::bool_array_value(), octave_value::cellstr_value(), octave_value::column_vector_value(), encode_bool_image(), error(), error_state, exists(), octave_value::float_array_value(), octave_scalar_map::getfield(), gripe_disabled_feature(), init_reverse_disposal_methods(), octave_value::int_value(), octave_value::is_bool_type(), Array< T >::is_empty(), octave_value::is_float_type(), octave_value::is_single_type(), octave_value::is_uint16_type(), octave_value::is_uint32_type(), octave_value::is_uint8_type(), maybe_initialize_magick(), print_usage(), read_file(), octave_value::string_value(), octave_value::uint16_array_value(), octave_value::uint32_array_value(), octave_value::uint8_array_value(), octave_value::uint_value(), and write_file().
DEFUN_DLD | ( | __magick_ping__ | , |
args | |||
) |
Definition at line 1520 of file __magick_read__.cc.
References error(), gripe_disabled_feature(), maybe_initialize_magick(), octave_value(), print_usage(), octave_scalar_map::setfield(), octave_value::string_value(), Faddeeva::w(), and warning().
DEFUN_DLD | ( | __magick_finfo__ | , |
args | |||
) |
Definition at line 1741 of file __magick_read__.cc.
References base_file_stat::error(), error(), error_state, octave_map::fast_elem_insert(), fill_exif(), fill_exif_floats(), fill_exif_ints(), Array< T >::fortran_vec(), get_depth(), gripe_disabled_feature(), init_disposal_methods(), is_indexed(), magick_to_octave_value(), maybe_initialize_magick(), base_file_stat::mtime(), Array< T >::nnz(), Array< T >::numel(), octave_value(), print_usage(), read_file(), read_maps(), octave_scalar_map::setfield(), octave_map::setfield(), base_file_stat::size(), octave_base_tm::strftime(), and octave_value::string_value().
DEFUN_DLD | ( | __magick_formats__ | , |
args | |||
) |
Definition at line 2196 of file __magick_read__.cc.
References octave_map::checkelem(), octave_map::delete_elements(), octave_map::fast_elem_insert(), octave_scalar_map::getfield(), gripe_disabled_feature(), maybe_initialize_magick(), octave_map::numel(), print_usage(), octave_scalar_map::setfield(), and octave_value::string_value().
|
static |
Definition at line 960 of file __magick_read__.cc.
References Array< T >::columns(), Array< T >::dims(), Array< T >::fortran_vec(), init_enconde_image(), Array< T >::ndims(), and Array< T >::rows().
Referenced by DEFUN_DLD().
|
static |
Definition at line 892 of file __magick_read__.cc.
References Array< T >::fortran_vec(), init_enconde_image(), and Array< T >::rows().
|
static |
Definition at line 1006 of file __magick_read__.cc.
References error(), and init_enconde_image().
|
static |
Definition at line 1683 of file __magick_read__.cc.
References is_valid_exif(), and octave_scalar_map::setfield().
Referenced by DEFUN_DLD().
|
static |
Definition at line 1716 of file __magick_read__.cc.
References is_valid_exif(), and octave_scalar_map::setfield().
Referenced by DEFUN_DLD().
|
static |
Definition at line 1693 of file __magick_read__.cc.
References is_valid_exif(), and octave_scalar_map::setfield().
Referenced by DEFUN_DLD().
|
static |
Definition at line 104 of file __magick_read__.cc.
Referenced by DEFUN_DLD().
|
static |
Definition at line 122 of file __magick_read__.cc.
References error(), octave_value::is_range(), octave_value::is_scalar_type(), octave_value::range_value(), and octave_value::scalar_value().
Referenced by calculate_region().
|
static |
Definition at line 831 of file __magick_read__.cc.
References max(), and octave_int< T >::max().
|
static |
Definition at line 1275 of file __magick_read__.cc.
Referenced by DEFUN_DLD().
|
static |
Definition at line 860 of file __magick_read__.cc.
Referenced by encode_bool_image(), encode_indexed_images(), and encode_uint_image().
|
static |
Definition at line 1303 of file __magick_read__.cc.
Referenced by DEFUN_DLD().
|
static |
Definition at line 75 of file __magick_read__.cc.
Referenced by DEFUN_DLD().
|
static |
Definition at line 1675 of file __magick_read__.cc.
Referenced by fill_exif(), fill_exif_floats(), and fill_exif_ints().
|
static |
Definition at line 1577 of file __magick_read__.cc.
References octave_value().
Referenced by DEFUN_DLD().
|
static |
Definition at line 1620 of file __magick_read__.cc.
References octave_value().
|
static |
Definition at line 1634 of file __magick_read__.cc.
References octave_value().
|
static |
Definition at line 1661 of file __magick_read__.cc.
References octave_value().
Definition at line 663 of file __magick_read__.cc.
References octave_env::get_program_invocation_name(), initialized, and warning().
Referenced by DEFUN_DLD().
|
static |
Definition at line 645 of file __magick_read__.cc.
References error(), error_state, Faddeeva::w(), and warning().
Referenced by DEFUN_DLD().
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().
|
static |
Definition at line 192 of file __magick_read__.cc.
References calculate_region(), Array< T >::fortran_vec(), Array< T >::length(), Array< T >::numel(), octave_value(), and read_maps().
|
static |
Definition at line 170 of file __magick_read__.cc.
Referenced by DEFUN_DLD(), and read_indexed_images().
|
static |
Definition at line 1317 of file __magick_read__.cc.
References error(), error_state, Faddeeva::w(), and warning().
Referenced by DEFUN_DLD().