Typedefs | Functions

Point Based Custom Operations
[Image Processing]

Collaboration diagram for Point Based Custom Operations:

Typedefs

typedef int(* imUnaryPointOpFunc )(float src_value, float *dst_value, float *params, void *userdata, int x, int y, int d)
typedef int(* imUnaryPointColorOpFunc )(const float *src_value, float *dst_value, float *params, void *userdata, int x, int y)
typedef int(* imMultiPointOpFunc )(const float *src_value, float *dst_value, float *params, void *userdata, int x, int y, int d, int src_image_count)
typedef int(* imMultiPointColorOpFunc )(float *src_value, float *dst_value, float *params, void *userdata, int x, int y, int src_image_count, int src_depth, int dst_depth)

Functions

int imProcessUnaryPointOp (const imImage *src_image, imImage *dst_image, imUnaryPointOpFunc func, float *params, void *userdata, const char *op_name)
int imProcessUnaryPointColorOp (const imImage *src_image, imImage *dst_image, imUnaryPointColorOpFunc func, float *params, void *userdata, const char *op_name)
int imProcessMultiPointOp (const imImage **src_image_list, int src_image_count, imImage *dst_image, imMultiPointOpFunc func, float *params, void *userdata, const char *op_name)
int imProcessMultiPointColorOp (const imImage **src_image_list, int src_image_count, imImage *dst_image, imMultiPointColorOpFunc func, float *params, void *userdata, const char *op_name)

Detailed Description

See im_process_pnt.h

Typedef Documentation

typedef int(* imUnaryPointOpFunc)(float src_value, float *dst_value, float *params, void *userdata, int x, int y, int d)

Custom unary point function.
Data will be set only if the returned value is non zero.

func(src_value: number, params1, param2, ..., x: number, y: number, d: number) -> dst_value: number  [in Lua 5] 

In Lua, the params table is unpacked. And the returned value contains only the target values to update, or nil (also no return value) to leave target intact.

typedef int(* imUnaryPointColorOpFunc)(const float *src_value, float *dst_value, float *params, void *userdata, int x, int y)

Custom unary point color function.
Data will be set only if the returned value is non zero.

func(src_value_plane0: number, src_value_plane1: number, ... , params1, param2, ..., x: number, y: number) -> dst_value_plane0: number, dst_value_plane1: number, ...  [in Lua 5] 

In Lua, the params table is unpacked. Also each color plane is passed as a separate value, instead of inside an array. And the returned value contains only the target values to update, or nil (also no return value) to leave target intact.

typedef int(* imMultiPointOpFunc)(const float *src_value, float *dst_value, float *params, void *userdata, int x, int y, int d, int src_image_count)

Custom multiple point function.
Source values are copies, so they can be changed inside the function without affecting the original image.
Data will be set only if the returned value is non zero.

func(src_value1: number, src_value2: number, ... , params1, param2, ..., x: number, y: number, d: number) -> dst_value: number  [in Lua 5] 

In Lua, the source images data and the params table are unpacked. And the returned value contains only the target values to update, or nil (also no return value) to leave target intact.

typedef int(* imMultiPointColorOpFunc)(float *src_value, float *dst_value, float *params, void *userdata, int x, int y, int src_image_count, int src_depth, int dst_depth)

Custom multiple point color function.
Source values are copies, so they can be changed inside the function without affecting the original image.
Data will be set only if the returned value is non zero.

func(src_value1_plane0: number, src_value1_plane1: number, ..., src_value2_plane0: number, src_value2_plane1: number, ... , params1, param2, ..., x: number, y: number) -> dst_value_plane0: number, dst_value_plane1: number, ...  [in Lua 5] 

In Lua, the source images data and the params table are unpacked. Also each color plane is passed as a separate value, instead of inside an array. And the returned value contains only the target values to update, or nil (also no return value) to leave target intact.


Function Documentation

int imProcessUnaryPointOp ( const imImage src_image,
imImage dst_image,
imUnaryPointOpFunc  func,
float *  params,
void *  userdata,
const char *  op_name 
)

Apply an unary point operation using a custom function. One pixel from the source affects the same pixel on target.
Can be done in-place, images must match size and depth. Data type can be different, but complex is not supported.
op_name is used only by the counter and can be NULL. Returns zero if the counter aborted.

im.ProcessUnaryPointOp(src_image: imImage, dst_image: imImage, func: function, params: table, [op_name: string]) -> counter: boolean [in Lua 5] 
im.ProcessUnaryPointOpNew(image: imImage, func: function, params: table, [op_name: string]) -> counter: boolean, new_image: imImage [in Lua 5] 

In Lua, the params table is passed to the function by using the Lua stack, so its table can contain any type of objects, but they all must be unnamed.

int imProcessUnaryPointColorOp ( const imImage src_image,
imImage dst_image,
imUnaryPointColorOpFunc  func,
float *  params,
void *  userdata,
const char *  op_name 
)

Apply an unary point color operation using a custom function. One pixel from the source affects the same pixel on target.
Can be done in-place, images must match size, depth can be different. Data type can be different, but complex is not supported.
op_name is used only by the counter and can be NULL. Returns zero if the counter aborted.

im.ProcessUnaryPointColorOp(src_image: imImage, dst_image: imImage, func: function, params: table, [op_name: string]) -> counter: boolean [in Lua 5] 
im.ProcessUnaryPointColorOpNew(image: imImage, func: function, params: table, [op_name: string]) -> counter: boolean, new_image: imImage [in Lua 5] 

In Lua, the params table is passed to the function by using the Lua stack, so its table can contain any type of objects, but they all must be unnamed.

int imProcessMultiPointOp ( const imImage **  src_image_list,
int  src_image_count,
imImage dst_image,
imMultiPointOpFunc  func,
float *  params,
void *  userdata,
const char *  op_name 
)

Apply an multiple point operation using a custom function. One pixel from each source affects the same pixel on target.
All source images must match in size, depth and data type. Can be done in-place, source and target must match size and depth. Data type can be different between sources and target, but complex is not supported.
op_name is used only by the counter and can be NULL. Returns zero if the counter aborted.

im.ProcessMultiPointOp(src_image: table of imImage, dst_image: imImage, func: function, params: table, [op_name: string]) -> counter: boolean [in Lua 5] 
im.ProcessMultiPointOpNew(src_image: table of imImage, func: function, params: table, [op_name: string]) -> counter: boolean, new_image: imImage [in Lua 5] 

In Lua, the params table is passed to the function by using the Lua stack, so its table can contain any type of objects, but they all must be unnamed.

int imProcessMultiPointColorOp ( const imImage **  src_image_list,
int  src_image_count,
imImage dst_image,
imMultiPointColorOpFunc  func,
float *  params,
void *  userdata,
const char *  op_name 
)

Apply an multiple point color operation using a custom function. One pixel from each source affects the same pixel on target.
All source images must match in size, depth and data type. Can be done in-place, source and target must match size, depth can be different. Data type can be different between sources and target, but complex is not supported.
op_name is used only by the counter and can be NULL. Returns zero if the counter aborted.

im.ProcessMultiPointColorOp(src_image: table of imImage, dst_image: imImage, func: function, params: table, [op_name: string]) -> counter: boolean [in Lua 5] 
im.ProcessMultiPointColorOpNew(src_image: table of imImage, func: function, params: table, [op_name: string]) -> counter: boolean, new_image: imImage [in Lua 5] 

In Lua, the params table is passed to the function by using the Lua stack, so its table can contain any type of objects, but they all must be unnamed.