Top | ![]() |
![]() |
![]() |
![]() |
#include <libprocess/gwyprocess.h> void gwy_data_field_sum_fields (GwyDataField *result
,GwyDataField *operand1
,GwyDataField *operand2
); void gwy_data_field_subtract_fields (GwyDataField *result
,GwyDataField *operand1
,GwyDataField *operand2
); void gwy_data_field_divide_fields (GwyDataField *result
,GwyDataField *operand1
,GwyDataField *operand2
); void gwy_data_field_multiply_fields (GwyDataField *result
,GwyDataField *operand1
,GwyDataField *operand2
); void gwy_data_field_min_of_fields (GwyDataField *result
,GwyDataField *operand1
,GwyDataField *operand2
); void gwy_data_field_max_of_fields (GwyDataField *result
,GwyDataField *operand1
,GwyDataField *operand2
); void gwy_data_field_hypot_of_fields (GwyDataField *result
,GwyDataField *operand1
,GwyDataField *operand2
); GwyDataCompatibilityFlags gwy_data_field_check_compatibility (GwyDataField *data_field1
,GwyDataField *data_field2
,GwyDataCompatibilityFlags check
); GwyDataCompatibilityFlags gwy_data_line_check_compatibility (GwyDataLine *data_line1
,GwyDataLine *data_line2
,GwyDataCompatibilityFlags check
); GwyDataField * gwy_data_field_extend (GwyDataField *data_field
,guint left
,guint right
,guint up
,guint down
,GwyExteriorType exterior
,gdouble fill_value
,gboolean keep_offsets
);
Data arithmetic functions perform simple operations combining several data fields. Their sizes have to be size-compatible, i.e. gwy_data_field_check_compatibility(operand1, operand2, GWY_DATA_COMPATIBILITY_RES) must pass and the same must hold for the data field to store the result to.
Functions gwy_data_field_check_compatibility()
and
gwy_data_line_check_compatibility()
simplify testing compatibility of data
fields and lines, respectively.
void gwy_data_field_sum_fields (GwyDataField *result
,GwyDataField *operand1
,GwyDataField *operand2
);
Sums two data fields.
|
A data field to put the result to. May be one of operand1 ,
operand2 . |
|
First data field operand. |
|
Second data field operand. |
void gwy_data_field_subtract_fields (GwyDataField *result
,GwyDataField *operand1
,GwyDataField *operand2
);
Subtracts one data field from another.
|
A data field to put the result to. May be one of operand1 ,
operand2 . |
|
First data field operand. |
|
Second data field operand. |
void gwy_data_field_divide_fields (GwyDataField *result
,GwyDataField *operand1
,GwyDataField *operand2
);
Divides one data field with another.
|
A data field to put the result to. May be one of operand1 ,
operand2 . |
|
First data field operand. |
|
Second data field operand. |
void gwy_data_field_multiply_fields (GwyDataField *result
,GwyDataField *operand1
,GwyDataField *operand2
);
Multiplies two data fields.
|
A data field to put the result to. May be one of operand1 ,
operand2 . |
|
First data field operand. |
|
Second data field operand. |
void gwy_data_field_min_of_fields (GwyDataField *result
,GwyDataField *operand1
,GwyDataField *operand2
);
Finds point-wise maxima of two data fields.
|
A data field to put the result to. May be one of operand1 ,
operand2 . |
|
First data field operand. |
|
Second data field operand. |
void gwy_data_field_max_of_fields (GwyDataField *result
,GwyDataField *operand1
,GwyDataField *operand2
);
Finds point-wise minima of two data fields.
|
A data field to put the result to. May be one of operand1 ,
operand2 . |
|
First data field operand. |
|
Second data field operand. |
void gwy_data_field_hypot_of_fields (GwyDataField *result
,GwyDataField *operand1
,GwyDataField *operand2
);
Finds point-wise hypotenuse of two data fields.
|
A data field to put the result to. May be one of operand1 ,
operand2 . |
|
First data field operand. |
|
Second data field operand. |
Since 2.31
GwyDataCompatibilityFlags gwy_data_field_check_compatibility (GwyDataField *data_field1
,GwyDataField *data_field2
,GwyDataCompatibilityFlags check
);
Checks whether two data fields are compatible.
|
A data field. |
|
Another data field. |
|
The compatibility tests to perform. |
Returns : |
Zero if all tested properties are compatible. Flags corresponding to failed tests if data fields are not compatible. |
GwyDataCompatibilityFlags gwy_data_line_check_compatibility (GwyDataLine *data_line1
,GwyDataLine *data_line2
,GwyDataCompatibilityFlags check
);
Checks whether two data lines are compatible.
|
A data line. |
|
Another data line. |
|
The compatibility tests to perform. |
Returns : |
Zero if all tested properties are compatible. Flags corresponding to failed tests if data lines are not compatible. |
GwyDataField * gwy_data_field_extend (GwyDataField *data_field
,guint left
,guint right
,guint up
,guint down
,GwyExteriorType exterior
,gdouble fill_value
,gboolean keep_offsets
);
Creates a new data field by extending another data field using the specified method of exterior handling.
|
Number of pixels to extend to the left (towards lower column indices). |
|
Number of pixels to extend to the right (towards higher column indices). |
|
Number of pixels to extend up (towards lower row indices). |
|
Number of pixels to extend down (towards higher row indices). |
|
Exterior pixels handling. |
|
The value to use with GWY_EXTERIOR_FIXED_VALUE exterior. |
|
TRUE to set the X and Y offsets of the new field
using field offsets. FALSE to set offsets
of the new field to zeroes. |
Returns : |
A newly created data field. |
Since 2.36