6 #define MIN(a,b) (((a) < (b)) ? (a) : (b))
52 GWYSCAN_ALLOCATION_FAILED = 3
62 GwyscanResult gwyscan_add_gwyddion_array(
const double *data,
int xres,
int yres,
double xreal,
double yreal,
const char *xyunit,
const char *zunit,
const char *description,
const char *filename);
64 GwyscanResult gwyscan_save_gwyddion_arrays_general(
const double **data,
int nchannels,
const int *xres,
const int *yres,
const double *xreal,
const double *yreal,
const char **xyunit,
const char **zunit,
const char **description,
const char *filename);
66 GwyscanResult gwyscan_save_gwyddion_arrays(
const double *data,
int nchannels,
int xres,
int yres,
double xreal,
double yreal,
const char **xyunit,
const char **zunit,
const char **description,
const char *filename);
70 GwyscanResult gwyscan_add_gwyddion_xyz(
const double *xypos,
const double *zdata,
int n,
int nchannels,
int xres,
int yres,
const char **description,
const char *filename,
const char *tmp_filename,
int *n_total);
95 int gwyscan_create_path_lissajous(
double *xypos,
int a,
double d,
double xreal,
double yreal,
double xoffset,
double yoffset,
double angle,
int *Ncp);
99 int gwyscan_create_path_rosette(
double *xypos,
int a,
double d,
double xreal,
double yreal,
double xoffset,
double yoffset,
double angle,
int *Ncp);
107 int gwyscan_modify_path_insert(
double *xypos_dest,
int *indexes,
int *n_indexes,
const double *xypos_source,
int n_source,
double xpos,
double ypos,
int interval);
122 GWYSCANDLL_API
int gwyscan_refine_path_threshold(
double *xypos,
123 const double *xypos_prev,
124 const double *zdata_prev,
127 const double *xypos_preprev,
128 const double *zdata_preprev,
141 GWYSCANDLL_API
int gwyscan_refine_path_roughness(
double *xypos,
142 const double *xypos_prev,
143 const double *zdata_prev,
156 GWYSCANDLL_API
int gwyscan_refine_path_edges(
double *xypos,
157 const double *xypos_prev,
158 const double *zdata_prev,
178 GwyscanResult gwyscan_preview(
const double *xypos,
const double *zdata,
int n,
int channel,
double *preview_image,
double *preview_mask,
int preview_width,
int preview_height,
double preview_xreal,
double preview_yreal,
double preview_xoffset,
double preview_yoffset,
double preview_angle);
180 GwyscanResult gwyscan_preview_subset(
const double *xypos,
const double *zdata,
int n,
int from,
int len,
int channel_from,
int channel_to,
double **preview_images,
double *preview_mask,
int preview_width,
int preview_height,
double preview_xreal,
double preview_yreal,
double preview_xoffset,
double preview_yoffset,
double preview_angle);
182 GwyscanResult gwyscan_preview_subset_all_channels(
const double *xypos,
const double *zdata,
int n,
int from,
int len,
int nchannels,
double **preview_images,
double *preview_mask,
int preview_width,
int preview_height,
double preview_xreal,
double preview_yreal,
double preview_xoffset,
double preview_yoffset,
double preview_angle);
184 GwyscanResult gwyscan_preview_average(
const double *xypos,
const double *zdata,
int n,
int channel,
double *preview_image,
double *preview_mask,
int preview_width,
int preview_height,
double preview_xreal,
double preview_yreal,
double preview_xoffset,
double preview_yoffset,
double preview_angle);
186 GwyscanResult gwyscan_preview_subset_average(
const double *xypos,
const double *zdata,
int n,
int from,
int len,
int channel_from,
int channel_to,
double **preview_images,
double *preview_mask,
int preview_width,
int preview_height,
double preview_xreal,
double preview_yreal,
double preview_xoffset,
double preview_yoffset,
double preview_angle);
188 GwyscanResult gwyscan_preview_subset_average_all_channels(
const double *xypos,
const double *zdata,
int n,
int from,
int len,
int nchannels,
double **preview_images,
double *preview_mask,
int preview_width,
int preview_height,
double preview_xreal,
double preview_yreal,
double preview_xoffset,
double preview_yoffset,
double preview_angle);
void gwyscan_modify_path_revert(double *xypos_dest, const double *xypos_source, int n)
Reverts existing path.
Definition: gwyscan.c:4168
Forward scan direction, even/odd line block order.
Definition: gwyscan.h:45
int gwyscan_create_path_space_filling(double *xypos, int order, double xreal, double yreal, double xoffset, double yoffset)
Creates scan path for equidistant measurement on a space-filling curve.
Definition: gwyscan.c:1325
void gwyscan_modify_path_flip_vertical(double *xypos_dest, const double *xypos_source, int n)
Flips existing path vertically.
Definition: gwyscan.c:4252
int gwyscan_create_path_wichmann_profiles(double *xypos, int n, int nprofiles, double xreal, double yreal, double xoffset, double yoffset)
Creates Wichmann profile scans on progressive resolutions.
Definition: gwyscan.c:1702
Forward scan direction.
Definition: gwyscan.h:40
GwyscanResult gwyscan_save_gwyddion_arrays_general(const double **data, int nchannels, const int *xres, const int *yres, const double *xreal, const double *yreal, const char **xyunit, const char **zunit, const char **description, const char *filename)
Saves multiple arrays to a Gwyddion file.
Definition: gwyscan.c:512
GwyscanResult gwyscan_preview_subset_all_channels(const double *xypos, const double *zdata, int n, int from, int len, int nchannels, double **preview_images, double *preview_mask, int preview_width, int preview_height, double preview_xreal, double preview_yreal, double preview_xoffset, double preview_yoffset, double preview_angle)
Quickly interpolates non-equidistant data onto a regular grid.
Definition: gwyscan.c:4672
File saving failed.
Definition: gwyscan.h:51
int gwyscan_create_path_spiral(double *xypos, int n, double xreal, double yreal, double xoffset, double yoffset)
Creates spiral scan path incscribed to a rectangle on progressive resolutions.
Definition: gwyscan.c:1488
GwyscanResult gwyscan_preview(const double *xypos, const double *zdata, int n, int channel, double *preview_image, double *preview_mask, int preview_width, int preview_height, double preview_xreal, double preview_yreal, double preview_xoffset, double preview_yoffset, double preview_angle)
Interpolates non-equidistant data onto a regular grid.
Definition: gwyscan.c:4557
int gwyscan_create_path_octave_2d(double *xypos, int order, int noctaves, double xreal, double yreal, double xoffset, double yoffset)
Creates two-dimensional octave profile scan starting from the finest resolution.
Definition: gwyscan.c:2108
GwyscanResult gwyscan_preview_subset(const double *xypos, const double *zdata, int n, int from, int len, int channel_from, int channel_to, double **preview_images, double *preview_mask, int preview_width, int preview_height, double preview_xreal, double preview_yreal, double preview_xoffset, double preview_yoffset, double preview_angle)
Interpolates non-equidistant data onto a regular grid in one channel.
Definition: gwyscan.c:4631
GwyscanDirection
Scan direction.
Definition: gwyscan.h:39
int gwyscan_create_path_octave_profiles(double *xypos, int order, int noctaves, int nprofiles, double xreal, double yreal, double xoffset, double yoffset)
Creates randomized octave profile scans on progressive resolutions.
Definition: gwyscan.c:1608
Scan bidirectional.
Definition: gwyscan.h:43
GwyscanResult gwyscan_generate_xyz_data(double *xypos, double *zdata, int n, double xreal, double yreal, double xoffset, double yoffset, int reserved)
Fills pre-allocated data with a virtual random scan in requested physical range.
Definition: gwyscan.c:5421
GwyscanResult gwyscan_save_gwyddion_array(const double *data, int xres, int yres, double xreal, double yreal, const char *xyunit, const char *zunit, const char *description, const char *filename)
Saves single array as a Gwyddion file.
Definition: gwyscan.c:258
Error in data passed to the function.
Definition: gwyscan.h:50
Forward scan direction, refine line order.
Definition: gwyscan.h:44
int gwyscan_create_path_random(double *xypos, int n, double xreal, double yreal, double xoffset, double yoffset)
Creates completely random path incscribed to a rectangle.
Definition: gwyscan.c:3958
int gwyscan_create_path_space_filling_progressive(double *xypos, int order, int coarse_order, int skip_order, double xreal, double yreal, double xoffset, double yoffset)
Creates scan path for equidistant measurement on a space-filling curve on progressive resolutions...
Definition: gwyscan.c:1403
GwyscanResult gwyscan_save_gwyddion_xyz(const double *xypos, const double *zdata, int n, int nchannels, int xres, int yres, const char **description, const char *filename)
Saves Gwyddion XYZ file.
Definition: gwyscan.c:692
GwyscanResult
Detailed information about an error.
Definition: gwyscan.h:48
Success.
Definition: gwyscan.h:49
GwyscanResult gwyscan_preview_subset_average_all_channels(const double *xypos, const double *zdata, int n, int from, int len, int nchannels, double **preview_images, double *preview_mask, int preview_width, int preview_height, double preview_xreal, double preview_yreal, double preview_xoffset, double preview_yoffset, double preview_angle)
Quickly interpolates non-equidistant data onto a regular grid.
Definition: gwyscan.c:5392
int gwyscan_modify_path_insert(double *xypos_dest, int *indexes, int *n_indexes, const double *xypos_source, int n_source, double xpos, double ypos, int interval)
Inserts points to existing path.
Definition: gwyscan.c:4081
int gwyscan_create_path_lissajous(double *xypos, int a, double d, double xreal, double yreal, double xoffset, double yoffset, double angle, int *Ncp)
Creates Lissajous profile scans.
Definition: gwyscan.c:1890
Reverse scan direction.
Definition: gwyscan.h:41
int gwyscan_create_path_regular(double *xypos, int xres, int yres, double xreal, double yreal, double xoffset, double yoffset, double angle, GwyscanDirection direction)
Creates scan path for regular (equidistant) measurements.
Definition: gwyscan.c:1053
GwyscanResult gwyscan_preview_subset_average(const double *xypos, const double *zdata, int n, int from, int len, int channel_from, int channel_to, double **preview_images, double *preview_mask, int preview_width, int preview_height, double preview_xreal, double preview_yreal, double preview_xoffset, double preview_yoffset, double preview_angle)
Quickly interpolates non-equidistant data onto a regular grid in one channel.
Definition: gwyscan.c:5204
void gwyscan_modify_path_flip_horizontal(double *xypos_dest, const double *xypos_source, int n)
Flips existing path horizontally.
Definition: gwyscan.c:4215
int gwyscan_create_path_cycloid(double *xypos, double d, double xreal, double yreal, double xoffset, double yoffset, double angle)
Creates cycloid profile scans.
Definition: gwyscan.c:1982
GwyscanResult gwyscan_preview_average(const double *xypos, const double *zdata, int n, int channel, double *preview_image, double *preview_mask, int preview_width, int preview_height, double preview_xreal, double preview_yreal, double preview_xoffset, double preview_yoffset, double preview_angle)
Quickly interpolates non-equidistant data onto a regular grid. Uses fast average algorithm.
Definition: gwyscan.c:4594
Scan in both directions.
Definition: gwyscan.h:42
GwyscanResult gwyscan_add_gwyddion_xyz(const double *xypos, const double *zdata, int n, int nchannels, int xres, int yres, const char **description, const char *filename, const char *tmp_filename, int *n_total)
Adds XYZ data to existing Gwyddion XYZ file.
Definition: gwyscan.c:789
GwyscanResult gwyscan_add_gwyddion_array(const double *data, int xres, int yres, double xreal, double yreal, const char *xyunit, const char *zunit, const char *description, const char *filename)
Saves single array as a Gwyddion file, adding it as new channels if the file already exists...
Definition: gwyscan.c:419
GwyscanResult gwyscan_save_gwyddion_arrays(const double *data, int nchannels, int xres, int yres, double xreal, double yreal, const char **xyunit, const char **zunit, const char **description, const char *filename)
Saves multiple arrays having same pixel resolution and same physical range into a Gwyddion file...
Definition: gwyscan.c:590