Extend

Extend — Extend and extrapolate data

Functions

Includes

#include <libgwyddion/gwyddion.h>

Description

Functions

gwy_field_extend()

GwyField *
gwy_field_extend (GwyField *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.

If exterior is not GWY_EXTERIOR_UNDEFINED, the added pixels are filled with values, according to the exterior type. If it is undefined, the added pixels are simply left uninitialised.

Parameters

field

A two-dimensional data field.

 

left

Number of pixels to extend to the left (towards lower column indices).

 

right

Number of pixels to extend to the right (towards higher column indices).

 

up

Number of pixels to extend up (towards lower row indices).

 

down

Number of pixels to extend down (towards higher row indices).

 

exterior

Exterior pixels handling.

 

fill_value

The value to use with GWY_EXTERIOR_FIXED_VALUE exterior.

 

keep_offsets

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.

[transfer full]


gwy_nield_extend()

GwyNield *
gwy_nield_extend (GwyNield *nield,
                  guint left,
                  guint right,
                  guint up,
                  guint down,
                  GwyExteriorType exterior,
                  gint fill_value);

Creates a new natural number field by extending another field using the specified method of exterior handling.

Only simple exteriors not requiring interpolation can be used with this function. This excludes for instance GWY_EXTERIOR_LAPLACE and GWY_EXTERIOR_CONNECT.

If exterior is not GWY_EXTERIOR_UNDEFINED, the added pixels are filled with values, according to the exterior type. If it is undefined, the added pixels are simply left uninitialised.

Parameters

nield

A two-dimensional number field.

 

left

Number of pixels to extend to the left (towards lower column indices).

 

right

Number of pixels to extend to the right (towards higher column indices).

 

up

Number of pixels to extend up (towards lower row indices).

 

down

Number of pixels to extend down (towards higher row indices).

 

exterior

Exterior pixels handling.

 

fill_value

The value to use with GWY_EXTERIOR_FIXED_VALUE exterior.

 

Returns

A newly created number field.

[transfer full]


gwy_line_extend()

GwyLine *
gwy_line_extend (GwyLine *line,
                 guint left,
                 guint right,
                 GwyExteriorType exterior,
                 gdouble fill_value,
                 gboolean keep_offsets);

Creates a new data line by extending another data line using the specified method of exterior handling.

If exterior is not GWY_EXTERIOR_UNDEFINED, the added values are filled with values, according to the exterior type. If it is undefined, the added values are simply left uninitialised.

Parameters

line

A data line.

 

left

Number of values to extend to the left (towards lower indices).

 

right

Number of values to extend to the right (towards higher indices).

 

exterior

Exterior values handling.

 

fill_value

The value to use with GWY_EXTERIOR_FIXED_VALUE exterior.

 

keep_offsets

TRUE to set the offset of the new line using line offset. FALSE to set offset of the new line to zero.

 

Returns

A newly created data line.

[transfer full]