2014-10-27 14:41:44 +01:00
|
|
|
// VIPS image wrapper
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
This file is part of VIPS.
|
|
|
|
|
|
|
|
VIPS is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU Lesser General Public License as published by
|
|
|
|
the Free Software Foundation; either version 2 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU Lesser General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU Lesser General Public License
|
|
|
|
along with this program; if not, write to the Free Software
|
|
|
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
|
|
|
02110-1301 USA
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef VIPS_VIMAGE_H
|
|
|
|
#define VIPS_VIMAGE_H
|
|
|
|
|
|
|
|
#include <list>
|
|
|
|
#include <complex>
|
|
|
|
#include <vector>
|
|
|
|
|
2014-10-31 19:11:26 +01:00
|
|
|
#include <string.h>
|
|
|
|
|
2014-10-27 14:41:44 +01:00
|
|
|
#include <vips/vips.h>
|
|
|
|
|
|
|
|
VIPS_NAMESPACE_START
|
|
|
|
|
2014-10-30 22:53:24 +01:00
|
|
|
/* Small utility things.
|
|
|
|
*/
|
|
|
|
|
2016-01-11 18:55:59 +01:00
|
|
|
VIPS_CPLUSPLUS_API std::vector<double> to_vectorv( int n, ... );
|
|
|
|
VIPS_CPLUSPLUS_API std::vector<double> to_vector( double value );
|
|
|
|
VIPS_CPLUSPLUS_API std::vector<double> to_vector( int n, double array[] );
|
|
|
|
VIPS_CPLUSPLUS_API std::vector<double> negate( std::vector<double> value );
|
|
|
|
VIPS_CPLUSPLUS_API std::vector<double> invert( std::vector<double> value );
|
2014-10-30 22:53:24 +01:00
|
|
|
|
2014-10-27 14:41:44 +01:00
|
|
|
enum VSteal {
|
|
|
|
NOSTEAL = 0,
|
|
|
|
STEAL = 1
|
|
|
|
};
|
|
|
|
|
|
|
|
/* A smart VipsObject pointer class ... use g_object_ref()/_unref() for
|
|
|
|
* lifetime management.
|
|
|
|
*/
|
|
|
|
class VObject
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
// can be NULL, see eg. VObject()
|
|
|
|
VipsObject *vobject;
|
|
|
|
|
|
|
|
public:
|
|
|
|
VObject( VipsObject *new_vobject, VSteal steal = STEAL ) :
|
|
|
|
vobject( new_vobject )
|
|
|
|
{
|
|
|
|
// we allow NULL init, eg. "VImage a;"
|
|
|
|
g_assert( !new_vobject ||
|
|
|
|
VIPS_IS_OBJECT( new_vobject ) );
|
|
|
|
|
2014-11-05 15:04:46 +01:00
|
|
|
#ifdef VIPS_DEBUG_VERBOSE
|
2014-10-27 14:41:44 +01:00
|
|
|
printf( "VObject constructor, obj = %p, steal = %d\n",
|
|
|
|
new_vobject, steal );
|
|
|
|
if( new_vobject ) {
|
|
|
|
printf( " obj " );
|
|
|
|
vips_object_print_name( VIPS_OBJECT( new_vobject ) );
|
|
|
|
printf( "\n" );
|
|
|
|
}
|
2014-11-05 15:04:46 +01:00
|
|
|
#endif /*VIPS_DEBUG_VERBOSE*/
|
2014-10-27 15:17:33 +01:00
|
|
|
|
2014-10-27 14:41:44 +01:00
|
|
|
if( !steal ) {
|
2014-11-05 15:04:46 +01:00
|
|
|
#ifdef VIPS_DEBUG_VERBOSE
|
2014-10-27 14:41:44 +01:00
|
|
|
printf( " reffing object\n" );
|
2014-11-05 15:04:46 +01:00
|
|
|
#endif /*VIPS_DEBUG_VERBOSE*/
|
2014-10-27 14:41:44 +01:00
|
|
|
g_object_ref( vobject );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
VObject() :
|
|
|
|
vobject( 0 )
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
// copy constructor
|
|
|
|
VObject( const VObject &a ) :
|
|
|
|
vobject( a.vobject )
|
|
|
|
{
|
|
|
|
g_assert( VIPS_IS_OBJECT( a.vobject ) );
|
|
|
|
|
2014-11-05 15:04:46 +01:00
|
|
|
#ifdef VIPS_DEBUG_VERBOSE
|
2014-10-27 14:41:44 +01:00
|
|
|
printf( "VObject copy constructor, obj = %p\n",
|
|
|
|
vobject );
|
|
|
|
printf( " reffing object\n" );
|
2014-11-05 15:04:46 +01:00
|
|
|
#endif /*VIPS_DEBUG_VERBOSE*/
|
2014-10-27 15:17:33 +01:00
|
|
|
g_object_ref( vobject );
|
2014-10-27 14:41:44 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
// assignment ... we must delete the old ref
|
|
|
|
// old can be NULL, new must not be NULL
|
|
|
|
VObject &operator=( const VObject &a )
|
|
|
|
{
|
|
|
|
VipsObject *old_vobject;
|
|
|
|
|
2014-11-05 15:04:46 +01:00
|
|
|
#ifdef VIPS_DEBUG_VERBOSE
|
2014-10-27 14:41:44 +01:00
|
|
|
printf( "VObject assignment\n" );
|
|
|
|
printf( " reffing %p\n", a.vobject );
|
|
|
|
printf( " unreffing %p\n", vobject );
|
2014-11-05 15:04:46 +01:00
|
|
|
#endif /*VIPS_DEBUG_VERBOSE*/
|
2014-10-27 14:41:44 +01:00
|
|
|
|
|
|
|
g_assert( !vobject ||
|
|
|
|
VIPS_IS_OBJECT( vobject ) );
|
|
|
|
g_assert( a.vobject &&
|
|
|
|
VIPS_IS_OBJECT( a.vobject ) );
|
|
|
|
|
|
|
|
// delete the old ref at the end ... otherwise "a = a;" could
|
|
|
|
// unref before reffing again
|
|
|
|
old_vobject = vobject;
|
|
|
|
vobject = a.vobject;
|
|
|
|
g_object_ref( vobject );
|
|
|
|
if( old_vobject )
|
|
|
|
g_object_unref( old_vobject );
|
|
|
|
|
|
|
|
return( *this );
|
|
|
|
}
|
|
|
|
|
|
|
|
// this mustn't be virtual: we want this class to only be a pointer,
|
|
|
|
// no vtable allowed
|
|
|
|
~VObject()
|
|
|
|
{
|
2014-11-05 15:04:46 +01:00
|
|
|
#ifdef VIPS_DEBUG_VERBOSE
|
2014-10-27 14:41:44 +01:00
|
|
|
printf( "VObject destructor\n" );
|
|
|
|
printf( " unreffing %p\n", vobject );
|
2014-11-05 15:04:46 +01:00
|
|
|
#endif /*VIPS_DEBUG_VERBOSE*/
|
2014-10-27 14:41:44 +01:00
|
|
|
|
|
|
|
g_assert( !vobject ||
|
|
|
|
VIPS_IS_OBJECT( vobject ) );
|
|
|
|
|
|
|
|
if( vobject )
|
|
|
|
g_object_unref( vobject );
|
|
|
|
}
|
|
|
|
|
|
|
|
VipsObject *get_object()
|
|
|
|
{
|
|
|
|
g_assert( !vobject ||
|
|
|
|
VIPS_IS_OBJECT( vobject ) );
|
|
|
|
|
|
|
|
return( vobject );
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
|
2016-01-11 18:55:59 +01:00
|
|
|
class VIPS_CPLUSPLUS_API VImage;
|
|
|
|
class VIPS_CPLUSPLUS_API VInterpolate;
|
|
|
|
class VIPS_CPLUSPLUS_API VOption;
|
2014-10-27 14:41:44 +01:00
|
|
|
|
|
|
|
class VOption
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
struct Pair {
|
|
|
|
const char *name;
|
|
|
|
|
2014-10-31 19:11:26 +01:00
|
|
|
// the thing we pass to and from our caller
|
|
|
|
GValue value;
|
2014-10-27 14:41:44 +01:00
|
|
|
|
|
|
|
// an input or output parameter ... we guess the direction
|
|
|
|
// from the arg to set()
|
|
|
|
bool input;
|
|
|
|
|
2014-10-31 19:11:26 +01:00
|
|
|
// the pointer we write output values to
|
2014-10-27 19:17:49 +01:00
|
|
|
union {
|
2014-10-31 19:11:26 +01:00
|
|
|
bool *vbool;
|
2014-10-27 19:17:49 +01:00
|
|
|
int *vint;
|
2014-10-31 19:11:26 +01:00
|
|
|
double *vdouble;
|
|
|
|
VImage *vimage;
|
2014-10-28 11:12:06 +01:00
|
|
|
std::vector<double> *vvector;
|
|
|
|
VipsBlob **vblob;
|
2014-10-27 19:17:49 +01:00
|
|
|
};
|
2014-10-27 14:41:44 +01:00
|
|
|
|
|
|
|
Pair( const char *name ) :
|
|
|
|
name( name ), input( false ), vimage( 0 )
|
|
|
|
{
|
2014-10-31 19:11:26 +01:00
|
|
|
// argh = {0} won't work wil vanilla C++
|
|
|
|
memset( &value, 0, sizeof( GValue ) );
|
2014-10-27 14:41:44 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
~Pair()
|
|
|
|
{
|
|
|
|
g_value_unset( &value );
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
std::list<Pair *> options;
|
|
|
|
|
|
|
|
public:
|
|
|
|
VOption()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
virtual ~VOption();
|
|
|
|
|
2014-10-28 11:12:06 +01:00
|
|
|
VOption *set( const char *name, bool value );
|
2014-10-27 14:41:44 +01:00
|
|
|
VOption *set( const char *name, int value );
|
2014-10-28 11:12:06 +01:00
|
|
|
VOption *set( const char *name, double value );
|
|
|
|
VOption *set( const char *name, const char *value );
|
2014-10-27 14:41:44 +01:00
|
|
|
VOption *set( const char *name, VImage value );
|
2015-01-30 22:19:58 +01:00
|
|
|
VOption *set( const char *name, VInterpolate value );
|
2014-10-27 19:17:49 +01:00
|
|
|
VOption *set( const char *name, std::vector<VImage> value );
|
|
|
|
VOption *set( const char *name, std::vector<double> value );
|
2014-10-28 11:12:06 +01:00
|
|
|
VOption *set( const char *name, VipsBlob *value );
|
2014-10-27 19:17:49 +01:00
|
|
|
|
2014-10-28 11:12:06 +01:00
|
|
|
VOption *set( const char *name, bool *value );
|
2014-10-27 19:17:49 +01:00
|
|
|
VOption *set( const char *name, int *value );
|
|
|
|
VOption *set( const char *name, double *value );
|
2014-10-28 11:12:06 +01:00
|
|
|
VOption *set( const char *name, VImage *value );
|
|
|
|
VOption *set( const char *name, std::vector<double> *value );
|
|
|
|
VOption *set( const char *name, VipsBlob **blob );
|
2014-10-27 14:41:44 +01:00
|
|
|
|
|
|
|
void set_operation( VipsOperation *operation );
|
|
|
|
void get_operation( VipsOperation *operation );
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
class VImage : VObject
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
VImage( VipsImage *image, VSteal steal = STEAL ) :
|
|
|
|
VObject( (VipsObject *) image, steal )
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
// an empty (NULL) VImage, eg. "VImage a;"
|
|
|
|
VImage() :
|
|
|
|
VObject( 0 )
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2014-10-30 23:11:43 +01:00
|
|
|
VipsImage *
|
|
|
|
get_image()
|
2014-10-27 14:41:44 +01:00
|
|
|
{
|
|
|
|
return( (VipsImage *) VObject::get_object() );
|
|
|
|
}
|
|
|
|
|
2014-10-30 23:11:43 +01:00
|
|
|
int
|
|
|
|
width()
|
2014-10-29 10:47:02 +01:00
|
|
|
{
|
|
|
|
return( vips_image_get_width( get_image() ) );
|
|
|
|
}
|
|
|
|
|
2014-10-30 23:11:43 +01:00
|
|
|
int
|
|
|
|
height()
|
2014-10-29 10:47:02 +01:00
|
|
|
{
|
|
|
|
return( vips_image_get_height( get_image() ) );
|
|
|
|
}
|
|
|
|
|
2014-10-30 23:11:43 +01:00
|
|
|
int
|
|
|
|
bands()
|
2014-10-29 10:47:02 +01:00
|
|
|
{
|
|
|
|
return( vips_image_get_bands( get_image() ) );
|
|
|
|
}
|
|
|
|
|
2014-10-30 23:11:43 +01:00
|
|
|
VipsBandFormat
|
|
|
|
format()
|
2014-10-29 10:47:02 +01:00
|
|
|
{
|
|
|
|
return( vips_image_get_format( get_image() ) );
|
|
|
|
}
|
|
|
|
|
2014-10-30 23:11:43 +01:00
|
|
|
VipsCoding
|
|
|
|
coding()
|
2014-10-29 10:47:02 +01:00
|
|
|
{
|
|
|
|
return( vips_image_get_coding( get_image() ) );
|
|
|
|
}
|
|
|
|
|
2014-10-30 23:11:43 +01:00
|
|
|
VipsInterpretation
|
|
|
|
interpretation()
|
2014-10-29 10:47:02 +01:00
|
|
|
{
|
|
|
|
return( vips_image_get_interpretation( get_image() ) );
|
|
|
|
}
|
|
|
|
|
2014-10-30 23:11:43 +01:00
|
|
|
VipsInterpretation
|
|
|
|
guess_interpretation()
|
2014-10-29 10:47:02 +01:00
|
|
|
{
|
|
|
|
return( vips_image_guess_interpretation( get_image() ) );
|
|
|
|
}
|
|
|
|
|
2014-10-30 23:11:43 +01:00
|
|
|
double
|
|
|
|
xres()
|
2014-10-29 10:47:02 +01:00
|
|
|
{
|
|
|
|
return( vips_image_get_xres( get_image() ) );
|
|
|
|
}
|
|
|
|
|
2014-10-30 23:11:43 +01:00
|
|
|
double
|
|
|
|
yres()
|
2014-10-29 10:47:02 +01:00
|
|
|
{
|
|
|
|
return( vips_image_get_yres( get_image() ) );
|
|
|
|
}
|
|
|
|
|
2014-10-30 23:11:43 +01:00
|
|
|
double
|
|
|
|
xoffset()
|
2014-10-29 10:47:02 +01:00
|
|
|
{
|
|
|
|
return( vips_image_get_xoffset( get_image() ) );
|
|
|
|
}
|
|
|
|
|
2014-10-30 23:11:43 +01:00
|
|
|
double
|
|
|
|
yoffset()
|
2014-10-29 10:47:02 +01:00
|
|
|
{
|
|
|
|
return( vips_image_get_yoffset( get_image() ) );
|
|
|
|
}
|
|
|
|
|
2014-10-30 23:11:43 +01:00
|
|
|
const char *
|
|
|
|
filename()
|
2014-10-29 10:47:02 +01:00
|
|
|
{
|
|
|
|
return( vips_image_get_filename( get_image() ) );
|
|
|
|
}
|
|
|
|
|
2014-10-30 23:11:43 +01:00
|
|
|
const void *
|
|
|
|
data()
|
2014-10-29 10:47:02 +01:00
|
|
|
{
|
|
|
|
return( vips_image_get_data( get_image() ) );
|
|
|
|
}
|
|
|
|
|
2014-10-30 23:11:43 +01:00
|
|
|
void
|
|
|
|
set( const char *field, int value )
|
2014-10-30 22:53:24 +01:00
|
|
|
{
|
|
|
|
vips_image_set_int( this->get_image(), field, value );
|
|
|
|
}
|
|
|
|
|
2014-10-30 23:11:43 +01:00
|
|
|
void
|
|
|
|
set( const char *field, double value )
|
2014-10-30 22:53:24 +01:00
|
|
|
{
|
|
|
|
vips_image_set_double( this->get_image(), field, value );
|
|
|
|
}
|
|
|
|
|
2014-10-30 23:11:43 +01:00
|
|
|
void
|
|
|
|
set( const char *field, const char *value )
|
2014-10-30 22:53:24 +01:00
|
|
|
{
|
|
|
|
vips_image_set_string( this->get_image(), field, value );
|
|
|
|
}
|
|
|
|
|
2014-10-30 23:11:43 +01:00
|
|
|
void
|
|
|
|
set( const char *field,
|
2014-10-30 22:53:24 +01:00
|
|
|
VipsCallbackFn free_fn, void *data, size_t length )
|
|
|
|
{
|
|
|
|
vips_image_set_blob( this->get_image(), field,
|
|
|
|
free_fn, data, length );
|
|
|
|
}
|
|
|
|
|
2016-01-09 21:27:14 +01:00
|
|
|
GType
|
2014-10-30 23:11:43 +01:00
|
|
|
get_typeof( const char *field )
|
2014-10-30 22:53:24 +01:00
|
|
|
{
|
|
|
|
return( vips_image_get_typeof( this->get_image(), field ) );
|
|
|
|
}
|
|
|
|
|
2014-10-30 23:11:43 +01:00
|
|
|
int
|
|
|
|
get_int( const char *field )
|
2014-10-30 22:53:24 +01:00
|
|
|
{
|
|
|
|
int value;
|
|
|
|
|
|
|
|
if( vips_image_get_int( this->get_image(), field, &value ) )
|
|
|
|
throw( VError() );
|
|
|
|
|
|
|
|
return( value );
|
|
|
|
}
|
|
|
|
|
2014-10-30 23:11:43 +01:00
|
|
|
double
|
|
|
|
get_double( const char *field )
|
2014-10-30 22:53:24 +01:00
|
|
|
{
|
|
|
|
double value;
|
|
|
|
|
|
|
|
if( vips_image_get_double( this->get_image(), field, &value ) )
|
|
|
|
throw( VError() );
|
|
|
|
|
|
|
|
return( value );
|
|
|
|
}
|
|
|
|
|
2014-10-30 23:11:43 +01:00
|
|
|
const char *
|
|
|
|
get_string( const char *field )
|
2014-10-30 22:53:24 +01:00
|
|
|
{
|
|
|
|
const char *value;
|
|
|
|
|
|
|
|
if( vips_image_get_string( this->get_image(), field, &value ) )
|
|
|
|
throw( VError() );
|
|
|
|
|
|
|
|
return( value );
|
|
|
|
}
|
|
|
|
|
2014-10-30 23:11:43 +01:00
|
|
|
const void *
|
|
|
|
get_blob( const char *field, size_t *length )
|
2014-10-30 22:53:24 +01:00
|
|
|
{
|
|
|
|
void *value;
|
|
|
|
|
|
|
|
if( vips_image_get_blob( this->get_image(), field,
|
|
|
|
&value, length ) )
|
|
|
|
throw( VError() );
|
|
|
|
|
|
|
|
return( value );
|
|
|
|
}
|
|
|
|
|
2014-10-30 23:11:43 +01:00
|
|
|
static VOption *
|
|
|
|
option()
|
2014-10-27 14:41:44 +01:00
|
|
|
{
|
|
|
|
return( new VOption() );
|
|
|
|
}
|
|
|
|
|
|
|
|
static void call_option_string( const char *operation_name,
|
2016-01-09 15:52:05 +01:00
|
|
|
const char *option_string, VOption *options = 0 );
|
|
|
|
static void call( const char *operation_name, VOption *options = 0 );
|
2014-10-27 14:41:44 +01:00
|
|
|
|
2014-10-31 20:15:29 +01:00
|
|
|
static VImage
|
|
|
|
new_memory()
|
|
|
|
{
|
|
|
|
return( VImage( vips_image_new_memory() ) );
|
|
|
|
}
|
|
|
|
|
|
|
|
static VImage
|
|
|
|
new_temp_file( const char *file_format = ".v" )
|
|
|
|
{
|
|
|
|
VipsImage *image;
|
|
|
|
|
|
|
|
if( !(image = vips_image_new_temp_file( file_format )) )
|
|
|
|
throw( VError() );
|
|
|
|
|
|
|
|
return( VImage( image ) );
|
|
|
|
}
|
|
|
|
|
2016-01-09 15:52:05 +01:00
|
|
|
static VImage new_from_file( const char *name, VOption *options = 0 );
|
2014-10-31 20:15:29 +01:00
|
|
|
|
|
|
|
static VImage new_from_memory( void *data, size_t size,
|
|
|
|
int width, int height, int bands, VipsBandFormat format )
|
|
|
|
{
|
|
|
|
VipsImage *image;
|
|
|
|
|
|
|
|
if( !(image = vips_image_new_from_memory( data, size,
|
|
|
|
width, height, bands, format )) )
|
|
|
|
throw( VError() );
|
|
|
|
|
|
|
|
return( VImage( image ) );
|
|
|
|
}
|
|
|
|
|
|
|
|
static VImage new_from_buffer( void *buf, size_t len,
|
2016-01-09 15:52:05 +01:00
|
|
|
const char *option_string, VOption *options = 0 );
|
2014-10-31 20:15:29 +01:00
|
|
|
|
|
|
|
static VImage new_matrix( int width, int height );
|
|
|
|
|
|
|
|
static VImage new_matrix( int width, int height,
|
|
|
|
double *array, int size )
|
|
|
|
{
|
|
|
|
VipsImage *image;
|
|
|
|
|
|
|
|
if( !(image = vips_image_new_matrix_from_array( width, height,
|
|
|
|
array, size )) )
|
|
|
|
throw( VError() );
|
|
|
|
|
|
|
|
return( VImage( image ) );
|
|
|
|
}
|
|
|
|
|
|
|
|
static VImage new_matrixv( int width, int height, ... );
|
|
|
|
|
2016-01-09 15:52:05 +01:00
|
|
|
VImage new_from_image( std::vector<double> pixel );
|
|
|
|
VImage new_from_image( double pixel );
|
2014-10-31 20:15:29 +01:00
|
|
|
|
2016-06-10 15:22:08 +02:00
|
|
|
VImage write( VImage out );
|
2014-10-27 14:41:44 +01:00
|
|
|
|
2016-01-09 15:52:05 +01:00
|
|
|
void write_to_file( const char *name, VOption *options = 0 );
|
2014-10-27 14:41:44 +01:00
|
|
|
|
2014-10-31 20:15:29 +01:00
|
|
|
void write_to_buffer( const char *suffix, void **buf, size_t *size,
|
2016-01-09 15:52:05 +01:00
|
|
|
VOption *options = 0 );
|
2014-10-31 20:15:29 +01:00
|
|
|
|
|
|
|
void *write_to_memory( size_t *size )
|
|
|
|
{
|
|
|
|
void *result;
|
|
|
|
|
|
|
|
if( !(result = vips_image_write_to_memory( this->get_image(),
|
|
|
|
size )) )
|
|
|
|
throw( VError() );
|
|
|
|
|
|
|
|
return( result );
|
|
|
|
}
|
|
|
|
|
2014-10-27 14:41:44 +01:00
|
|
|
#include "vips-operators.h"
|
|
|
|
|
2014-10-29 10:47:02 +01:00
|
|
|
// a few useful things
|
2014-10-30 22:53:24 +01:00
|
|
|
|
2014-10-30 23:11:43 +01:00
|
|
|
VImage
|
|
|
|
linear( double a, double b, VOption *options = 0 )
|
2014-10-30 22:53:24 +01:00
|
|
|
{
|
|
|
|
return( this->linear( to_vector( a ), to_vector( b ),
|
|
|
|
options ) );
|
|
|
|
}
|
|
|
|
|
2014-10-30 23:11:43 +01:00
|
|
|
VImage
|
|
|
|
linear( std::vector<double> a, double b, VOption *options = 0 )
|
2014-10-30 22:53:24 +01:00
|
|
|
{
|
|
|
|
return( this->linear( a, to_vector( b ), options ) );
|
|
|
|
}
|
|
|
|
|
2014-10-30 23:11:43 +01:00
|
|
|
VImage
|
|
|
|
linear( double a, std::vector<double> b, VOption *options = 0 )
|
2014-10-30 22:53:24 +01:00
|
|
|
{
|
|
|
|
return( this->linear( to_vector( a ), b, options ) );
|
|
|
|
}
|
2014-10-29 10:47:02 +01:00
|
|
|
|
2016-01-09 15:52:05 +01:00
|
|
|
std::vector<VImage> bandsplit( VOption *options = 0 );
|
2014-10-29 10:47:02 +01:00
|
|
|
|
2016-01-09 15:52:05 +01:00
|
|
|
VImage bandjoin( VImage other, VOption *options = 0 );
|
2014-10-31 20:15:29 +01:00
|
|
|
|
2014-10-30 23:11:43 +01:00
|
|
|
VImage
|
|
|
|
bandjoin( double other, VOption *options = 0 )
|
2014-10-30 22:53:24 +01:00
|
|
|
{
|
|
|
|
return( bandjoin( this->new_from_image( other ), options ) );
|
|
|
|
}
|
2014-10-30 23:11:43 +01:00
|
|
|
|
|
|
|
VImage
|
|
|
|
bandjoin( std::vector<double> other, VOption *options = 0 )
|
2014-10-30 22:53:24 +01:00
|
|
|
{
|
|
|
|
return( bandjoin( this->new_from_image( other ), options ) );
|
|
|
|
}
|
2014-10-29 10:47:02 +01:00
|
|
|
|
2016-01-09 15:52:05 +01:00
|
|
|
std::complex<double> minpos( VOption *options = 0 );
|
2014-10-29 10:47:02 +01:00
|
|
|
|
2016-01-09 15:52:05 +01:00
|
|
|
std::complex<double> maxpos( VOption *options = 0 );
|
2014-10-29 10:47:02 +01:00
|
|
|
|
2015-04-24 11:10:44 +02:00
|
|
|
VImage
|
|
|
|
fliphor( VOption *options = 0 )
|
|
|
|
{
|
|
|
|
return( flip( VIPS_DIRECTION_HORIZONTAL, options ) );
|
|
|
|
}
|
|
|
|
|
|
|
|
VImage
|
|
|
|
flipver( VOption *options = 0 )
|
|
|
|
{
|
|
|
|
return( flip( VIPS_DIRECTION_VERTICAL, options ) );
|
|
|
|
}
|
|
|
|
|
|
|
|
VImage
|
|
|
|
rot90( VOption *options = 0 )
|
|
|
|
{
|
|
|
|
return( rot( VIPS_ANGLE_D90, options ) );
|
|
|
|
}
|
|
|
|
|
|
|
|
VImage
|
|
|
|
rot180( VOption *options = 0 )
|
|
|
|
{
|
|
|
|
return( rot( VIPS_ANGLE_D180, options ) );
|
|
|
|
}
|
|
|
|
|
|
|
|
VImage
|
|
|
|
rot270( VOption *options = 0 )
|
|
|
|
{
|
|
|
|
return( rot( VIPS_ANGLE_D270, options ) );
|
|
|
|
}
|
|
|
|
|
|
|
|
VImage
|
|
|
|
dilate( VImage mask, VOption *options = 0 )
|
|
|
|
{
|
|
|
|
return( morph( mask, VIPS_OPERATION_MORPHOLOGY_DILATE,
|
|
|
|
options ) );
|
|
|
|
}
|
|
|
|
|
|
|
|
VImage
|
|
|
|
erode( VImage mask, VOption *options = 0 )
|
|
|
|
{
|
|
|
|
return( morph( mask, VIPS_OPERATION_MORPHOLOGY_ERODE,
|
|
|
|
options ) );
|
|
|
|
}
|
|
|
|
|
|
|
|
VImage
|
|
|
|
median( int size = 3, VOption *options = 0 )
|
|
|
|
{
|
|
|
|
return( rank( size, size, (size * size) / 2, options ) );
|
|
|
|
}
|
|
|
|
|
2014-10-30 23:11:43 +01:00
|
|
|
VImage
|
|
|
|
floor( VOption *options = 0 )
|
2014-10-29 10:47:02 +01:00
|
|
|
{
|
|
|
|
return( round( VIPS_OPERATION_ROUND_FLOOR, options ) );
|
|
|
|
}
|
|
|
|
|
2014-10-30 23:11:43 +01:00
|
|
|
VImage
|
|
|
|
ceil( VOption *options = 0 )
|
2014-10-29 10:47:02 +01:00
|
|
|
{
|
|
|
|
return( round( VIPS_OPERATION_ROUND_CEIL, options ) );
|
|
|
|
}
|
|
|
|
|
2014-10-30 23:11:43 +01:00
|
|
|
VImage
|
|
|
|
rint( VOption *options = 0 )
|
2014-10-29 10:47:02 +01:00
|
|
|
{
|
|
|
|
return( round( VIPS_OPERATION_ROUND_RINT, options ) );
|
|
|
|
}
|
|
|
|
|
2014-10-30 23:11:43 +01:00
|
|
|
VImage
|
|
|
|
real( VOption *options = 0 )
|
2014-10-29 10:47:02 +01:00
|
|
|
{
|
|
|
|
return( complexget( VIPS_OPERATION_COMPLEXGET_REAL, options ) );
|
|
|
|
}
|
|
|
|
|
2014-10-30 23:11:43 +01:00
|
|
|
VImage
|
|
|
|
imag( VOption *options = 0 )
|
2014-10-29 10:47:02 +01:00
|
|
|
{
|
|
|
|
return( complexget( VIPS_OPERATION_COMPLEXGET_IMAG, options ) );
|
|
|
|
}
|
|
|
|
|
2014-10-30 23:11:43 +01:00
|
|
|
VImage
|
|
|
|
polar( VOption *options = 0 )
|
2014-10-29 10:47:02 +01:00
|
|
|
{
|
|
|
|
return( complex( VIPS_OPERATION_COMPLEX_POLAR, options ) );
|
|
|
|
}
|
|
|
|
|
2014-10-30 23:11:43 +01:00
|
|
|
VImage
|
|
|
|
rect( VOption *options = 0 )
|
2014-10-29 10:47:02 +01:00
|
|
|
{
|
|
|
|
return( complex( VIPS_OPERATION_COMPLEX_RECT, options ) );
|
|
|
|
}
|
|
|
|
|
2014-10-30 23:11:43 +01:00
|
|
|
VImage
|
|
|
|
conj( VOption *options = 0 )
|
2014-10-29 10:47:02 +01:00
|
|
|
{
|
|
|
|
return( complex( VIPS_OPERATION_COMPLEX_CONJ, options ) );
|
|
|
|
}
|
|
|
|
|
2014-10-30 23:11:43 +01:00
|
|
|
VImage
|
|
|
|
sin( VOption *options = 0 )
|
2014-10-29 10:47:02 +01:00
|
|
|
{
|
|
|
|
return( math( VIPS_OPERATION_MATH_SIN, options ) );
|
|
|
|
}
|
|
|
|
|
2014-10-30 23:11:43 +01:00
|
|
|
VImage
|
|
|
|
cos( VOption *options = 0 )
|
2014-10-29 10:47:02 +01:00
|
|
|
{
|
|
|
|
return( math( VIPS_OPERATION_MATH_COS, options ) );
|
|
|
|
}
|
|
|
|
|
2014-10-30 23:11:43 +01:00
|
|
|
VImage
|
|
|
|
tan( VOption *options = 0 )
|
2014-10-29 10:47:02 +01:00
|
|
|
{
|
|
|
|
return( math( VIPS_OPERATION_MATH_TAN, options ) );
|
|
|
|
}
|
|
|
|
|
2014-10-30 23:11:43 +01:00
|
|
|
VImage
|
|
|
|
asin( VOption *options = 0 )
|
2014-10-29 10:47:02 +01:00
|
|
|
{
|
|
|
|
return( math( VIPS_OPERATION_MATH_ASIN, options ) );
|
|
|
|
}
|
|
|
|
|
2014-10-30 23:11:43 +01:00
|
|
|
VImage
|
|
|
|
acos( VOption *options = 0 )
|
2014-10-29 10:47:02 +01:00
|
|
|
{
|
|
|
|
return( math( VIPS_OPERATION_MATH_ACOS, options ) );
|
|
|
|
}
|
|
|
|
|
2014-10-30 23:11:43 +01:00
|
|
|
VImage
|
|
|
|
atan( VOption *options = 0 )
|
2014-10-29 10:47:02 +01:00
|
|
|
{
|
|
|
|
return( math( VIPS_OPERATION_MATH_ATAN, options ) );
|
|
|
|
}
|
|
|
|
|
2014-10-30 23:11:43 +01:00
|
|
|
VImage
|
|
|
|
log( VOption *options = 0 )
|
2014-10-29 10:47:02 +01:00
|
|
|
{
|
|
|
|
return( math( VIPS_OPERATION_MATH_LOG, options ) );
|
|
|
|
}
|
|
|
|
|
2014-10-30 23:11:43 +01:00
|
|
|
VImage
|
|
|
|
log10( VOption *options = 0 )
|
2014-10-29 10:47:02 +01:00
|
|
|
{
|
|
|
|
return( math( VIPS_OPERATION_MATH_LOG10, options ) );
|
|
|
|
}
|
|
|
|
|
2014-10-30 23:11:43 +01:00
|
|
|
VImage
|
|
|
|
exp( VOption *options = 0 )
|
2014-10-29 10:47:02 +01:00
|
|
|
{
|
|
|
|
return( math( VIPS_OPERATION_MATH_EXP, options ) );
|
|
|
|
}
|
|
|
|
|
2014-10-30 23:11:43 +01:00
|
|
|
VImage
|
|
|
|
exp10( VOption *options = 0 )
|
2014-10-29 10:47:02 +01:00
|
|
|
{
|
|
|
|
return( math( VIPS_OPERATION_MATH_EXP10, options ) );
|
|
|
|
}
|
|
|
|
|
2014-10-30 23:11:43 +01:00
|
|
|
VImage
|
|
|
|
pow( VImage other, VOption *options = 0 )
|
2014-10-30 22:53:24 +01:00
|
|
|
{
|
|
|
|
return( math2( other, VIPS_OPERATION_MATH2_POW, options ) );
|
|
|
|
}
|
|
|
|
|
2014-10-30 23:11:43 +01:00
|
|
|
VImage
|
|
|
|
pow( double other, VOption *options = 0 )
|
2014-10-30 22:53:24 +01:00
|
|
|
{
|
|
|
|
return( math2_const( to_vector( other ),
|
|
|
|
VIPS_OPERATION_MATH2_POW, options ) );
|
|
|
|
}
|
|
|
|
|
2014-10-30 23:11:43 +01:00
|
|
|
VImage
|
|
|
|
pow( std::vector<double> other, VOption *options = 0 )
|
2014-10-30 22:53:24 +01:00
|
|
|
{
|
|
|
|
return( math2_const( other,
|
|
|
|
VIPS_OPERATION_MATH2_POW, options ) );
|
|
|
|
}
|
|
|
|
|
2014-10-30 23:11:43 +01:00
|
|
|
VImage
|
|
|
|
wop( VImage other, VOption *options = 0 )
|
2014-10-30 22:53:24 +01:00
|
|
|
{
|
|
|
|
return( math2( other, VIPS_OPERATION_MATH2_WOP, options ) );
|
|
|
|
}
|
|
|
|
|
2014-10-30 23:11:43 +01:00
|
|
|
VImage
|
|
|
|
wop( double other, VOption *options = 0 )
|
2014-10-30 22:53:24 +01:00
|
|
|
{
|
|
|
|
return( math2_const( to_vector( other ),
|
|
|
|
VIPS_OPERATION_MATH2_WOP, options ) );
|
|
|
|
}
|
|
|
|
|
2014-10-30 23:11:43 +01:00
|
|
|
VImage
|
|
|
|
wop( std::vector<double> other, VOption *options = 0 )
|
2014-10-30 22:53:24 +01:00
|
|
|
{
|
|
|
|
return( math2_const( other,
|
|
|
|
VIPS_OPERATION_MATH2_WOP, options ) );
|
|
|
|
}
|
2014-10-29 10:47:02 +01:00
|
|
|
|
2014-10-30 23:11:43 +01:00
|
|
|
VImage
|
|
|
|
ifthenelse( std::vector<double> th, VImage el, VOption *options = 0 )
|
2014-10-30 22:53:24 +01:00
|
|
|
{
|
|
|
|
return( ifthenelse( el.new_from_image( th ), el, options ) );
|
|
|
|
}
|
|
|
|
|
2014-10-30 23:11:43 +01:00
|
|
|
VImage
|
|
|
|
ifthenelse( VImage th, std::vector<double> el, VOption *options = 0 )
|
2014-10-30 22:53:24 +01:00
|
|
|
{
|
|
|
|
return( ifthenelse( th, th.new_from_image( el ), options ) );
|
|
|
|
}
|
|
|
|
|
2014-10-30 23:11:43 +01:00
|
|
|
VImage
|
|
|
|
ifthenelse( std::vector<double> th, std::vector<double> el,
|
2014-10-29 10:47:02 +01:00
|
|
|
VOption *options = 0 )
|
2014-10-30 22:53:24 +01:00
|
|
|
{
|
|
|
|
return( ifthenelse( new_from_image( th ), new_from_image( el ),
|
|
|
|
options ) );
|
|
|
|
}
|
|
|
|
|
2014-10-30 23:11:43 +01:00
|
|
|
VImage
|
2016-06-10 18:34:41 +02:00
|
|
|
ifthenelse( double th, VImage el, VOption *options = 0 )
|
2014-10-30 22:53:24 +01:00
|
|
|
{
|
|
|
|
return( ifthenelse( to_vector( th ), el, options ) );
|
|
|
|
}
|
|
|
|
|
2014-10-30 23:11:43 +01:00
|
|
|
VImage
|
2016-06-10 18:34:41 +02:00
|
|
|
ifthenelse( VImage th, double el, VOption *options = 0 )
|
2014-10-30 22:53:24 +01:00
|
|
|
{
|
|
|
|
return( ifthenelse( th, to_vector( el ), options ) );
|
|
|
|
}
|
|
|
|
|
2014-10-30 23:11:43 +01:00
|
|
|
VImage
|
2016-06-10 18:34:41 +02:00
|
|
|
ifthenelse( double th, double el, VOption *options = 0 )
|
2014-10-30 22:53:24 +01:00
|
|
|
{
|
|
|
|
return( ifthenelse( to_vector( th ), to_vector( el ),
|
|
|
|
options ) );
|
|
|
|
}
|
|
|
|
|
|
|
|
// Operator overloads
|
|
|
|
|
2016-03-25 07:09:07 +01:00
|
|
|
VImage operator[]( int index );
|
|
|
|
|
|
|
|
std::vector<double> operator()( int x, int y );
|
|
|
|
|
2016-10-15 21:50:32 +02:00
|
|
|
friend VIPS_CPLUSPLUS_API VImage operator+( VImage a, VImage b );
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage operator+( double a, VImage b );
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage operator+( VImage a, double b );
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage operator+( std::vector<double> a, VImage b );
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage operator+( VImage a, std::vector<double> b );
|
|
|
|
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage & operator+=( VImage a, const VImage b );
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage & operator+=( VImage a, const double b );
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage & operator+=( VImage a, const std::vector<double> b );
|
|
|
|
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage operator-( VImage a, VImage b );
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage operator-( double a, VImage b );
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage operator-( VImage a, double b );
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage operator-( std::vector<double> a, VImage b );
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage operator-( VImage a, std::vector<double> b );
|
|
|
|
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage & operator-=( VImage a, const VImage b );
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage & operator-=( VImage a, const double b );
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage & operator-=( VImage a, const std::vector<double> b );
|
|
|
|
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage operator-( VImage a );
|
|
|
|
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage operator*( VImage a, VImage b );
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage operator*( double a, VImage b );
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage operator*( VImage a, double b );
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage operator*( std::vector<double> a, VImage b );
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage operator*( VImage a, std::vector<double> b );
|
|
|
|
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage & operator*=( VImage a, const VImage b );
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage & operator*=( VImage a, const double b );
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage & operator*=( VImage a, const std::vector<double> b );
|
|
|
|
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage operator/( VImage a, VImage b );
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage operator/( double a, VImage b );
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage operator/( VImage a, double b );
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage operator/( std::vector<double> a, VImage b );
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage operator/( VImage a, std::vector<double> b );
|
|
|
|
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage & operator/=( VImage a, const VImage b );
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage & operator/=( VImage a, const double b );
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage & operator/=( VImage a, const std::vector<double> b );
|
|
|
|
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage operator%( VImage a, VImage b );
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage operator%( VImage a, double b );
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage operator%( VImage a, std::vector<double> b );
|
|
|
|
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage & operator%=( VImage a, const VImage b );
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage & operator%=( VImage a, const double b );
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage & operator%=( VImage a, const std::vector<double> b );
|
|
|
|
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage operator<( VImage a, VImage b );
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage operator<( double a, VImage b );
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage operator<( VImage a, double b );
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage operator<( std::vector<double> a, VImage b );
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage operator<( VImage a, std::vector<double> b );
|
|
|
|
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage operator<=( VImage a, VImage b );
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage operator<=( double a, VImage b );
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage operator<=( VImage a, double b );
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage operator<=( std::vector<double> a, VImage b );
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage operator<=( VImage a, std::vector<double> b );
|
|
|
|
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage operator>( VImage a, VImage b );
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage operator>( double a, VImage b );
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage operator>( VImage a, double b );
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage operator>( std::vector<double> a, VImage b );
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage operator>( VImage a, std::vector<double> b );
|
|
|
|
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage operator>=( VImage a, VImage b );
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage operator>=( double a, VImage b );
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage operator>=( VImage a, double b );
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage operator>=( std::vector<double> a, VImage b );
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage operator>=( VImage a, std::vector<double> b );
|
|
|
|
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage operator==( VImage a, VImage b );
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage operator==( double a, VImage b );
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage operator==( VImage a, double b );
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage operator==( std::vector<double> a, VImage b );
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage operator==( VImage a, std::vector<double> b );
|
|
|
|
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage operator!=( VImage a, VImage b );
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage operator!=( double a, VImage b );
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage operator!=( VImage a, double b );
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage operator!=( std::vector<double> a, VImage b );
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage operator!=( VImage a, std::vector<double> b );
|
|
|
|
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage operator&( VImage a, VImage b );
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage operator&( double a, VImage b );
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage operator&( VImage a, double b );
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage operator&( std::vector<double> a, VImage b );
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage operator&( VImage a, std::vector<double> b );
|
|
|
|
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage & operator&=( VImage a, const VImage b );
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage & operator&=( VImage a, const double b );
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage & operator&=( VImage a, const std::vector<double> b );
|
|
|
|
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage operator|( VImage a, VImage b );
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage operator|( double a, VImage b );
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage operator|( VImage a, double b );
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage operator|( std::vector<double> a, VImage b );
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage operator|( VImage a, std::vector<double> b );
|
|
|
|
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage & operator|=( VImage a, const VImage b );
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage & operator|=( VImage a, const double b );
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage & operator|=( VImage a, const std::vector<double> b );
|
|
|
|
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage operator^( VImage a, VImage b );
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage operator^( double a, VImage b );
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage operator^( VImage a, double b );
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage operator^( std::vector<double> a, VImage b );
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage operator^( VImage a, std::vector<double> b );
|
|
|
|
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage & operator^=( VImage a, const VImage b );
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage & operator^=( VImage a, const double b );
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage & operator^=( VImage a, const std::vector<double> b );
|
|
|
|
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage operator<<( VImage a, VImage b );
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage operator<<( VImage a, double b );
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage operator<<( VImage a, std::vector<double> b );
|
|
|
|
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage & operator<<=( VImage a, const VImage b );
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage & operator<<=( VImage a, const double b );
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage & operator<<=( VImage a, const std::vector<double> b );
|
|
|
|
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage operator>>( VImage a, VImage b );
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage operator>>( VImage a, double b );
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage operator>>( VImage a, std::vector<double> b );
|
|
|
|
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage & operator>>=( VImage a, const VImage b );
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage & operator>>=( VImage a, const double b );
|
|
|
|
friend VIPS_CPLUSPLUS_API VImage & operator>>=( VImage a, const std::vector<double> b );
|
2016-06-10 15:57:46 +02:00
|
|
|
|
2014-10-27 14:41:44 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
VIPS_NAMESPACE_END
|
|
|
|
|
|
|
|
#endif /*VIPS_VIMAGE_H*/
|