| Top |
| #define | GWY_FILE_PREFIX_IMAGE |
| #define | GWY_FILE_PREFIX_GRAPH |
| #define | GWY_FILE_PREFIX_SPECTRA |
| #define | GWY_FILE_PREFIX_VOLUME |
| #define | GWY_FILE_PREFIX_XYZ |
| #define | GWY_FILE_PREFIX_CMAP |
| #define | GWY_FILE_ID_NONE |
| enum | GwyDataKind |
| enum | GwyFilePiece |
| enum | GwyFileItemFlags |
| GwyFileKeyParsed | |
| struct | GwyFile |
| struct | GwyFileClass |
GwyFile is a subclass of GwyContainer, assuming a specific organisation of items inside to represent scanning probe microscopy data, more specifically a Gwyddion GWY file.
The class implements GwySerializable copy() and assign() methods. A convenience wrapper gwy_file_copy() is
provided only for the first one. Assigning files by value is less efficient than simply destroying the existing
GwyFile and creating a new data file. It also generates lots of signals about changed items. So, generally, do not
do it.
GwyFile *
gwy_file_new_in_construction (void);
Creates a new GwyFile and marks is as being in construction.
This is a convenience function calling gwy_container_start_construction() on the newly created file.
[constructor]
GwyFile *
gwy_file_copy (GwyFile *file);
Create a new data file as a copy of an existing one.
This function is a convenience gwy_serializable_copy() wrapper.
gint gwy_file_add_image (GwyFile *file,GwyField *field);
Adds a data field representing an image to a file data container.
The file cannot be in construction (see gwy_container_start_construction()). In particular, this function is not
suitable for the import of data from third party file formats, use gwy_file_pass_image().
A new unused id is assigned to the image and returned. Generally, it is the lowest integer larger than any existing image id (however, there are no specific guarantees).
The image is not immediately shown in a new window when the GUI is running. Use gwy_file_set_visible() to show it,
preferrably after setting or synchronising visualisation settings like the colour mapping.
gint gwy_file_add_graph (GwyFile *file,GwyGraphModel *graph);
Adds a graph model representing a graph to a file data container.
The file cannot be in construction (see gwy_container_start_construction()). In particular, this function is not
suitable for the import of data from third party file formats, use gwy_file_pass_graph().
A new unused id is assigned to the graph and returned. Generally, it is the lowest integer larger than any existing graph id (however, there are no specific guarantees).
The graph is not immediately shown in a new window when the GUI is running. Use gwy_file_set_visible() to show it,
preferrably after setting or synchronising other settings.
gint gwy_file_add_spectra (GwyFile *file,GwySpectra *spectra);
Adds a spectra representing a single point spectra to a file data container.
The file cannot be in construction (see gwy_container_start_construction()). In particular, this function is not
suitable for the import of data from third party file formats, use gwy_file_pass_spectra().
A new unused id is assigned to the spectra and returned. Generally, it is the lowest integer larger than any existing spectra id (however, there are no specific guarantees).
The spectra are not immediately shown in a new window when the GUI is running. Use gwy_file_set_visible() to show it,
preferrably after setting or synchronising other settings.
gint gwy_file_add_volume (GwyFile *file,GwyBrick *brick,GwyField *preview);
Adds a data brick representing an volume data to a file data container.
The file cannot be in construction (see gwy_container_start_construction()). In particular, this function is not
suitable for the import of data from third party file formats, use gwy_file_pass_volume().
A new unused id is assigned to the volume data and returned. Generally, it is the lowest integer larger than any existing volume data id (however, there are no specific guarantees).
The volume data is not immediately shown in a new window when the GUI is running. Use gwy_file_set_visible() to
show it, preferrably after setting or synchronising visualisation settings like the colour mapping.
gint gwy_file_add_xyz (GwyFile *file,GwySurface *surface);
Adds a data surface representing an XYZ data to a file data container.
The file cannot be in construction (see gwy_container_start_construction()). In particular, this function is not
suitable for the import of data from third party file formats, use gwy_file_pass_xyz().
A new unused id is assigned to the XYZ data and returned. Generally, it is the lowest integer larger than any existing XYZ data id (however, there are no specific guarantees).
The XYZ data is not immediately shown in a new window when the GUI is running. Use gwy_file_set_visible() to
show it, preferrably after setting or synchronising visualisation settings like the colour mapping.
gint gwy_file_add_cmap (GwyFile *file,GwyLawn *lawn,GwyField *preview);
Adds a data lawn representing an curve map data to a file data container.
The file cannot be in construction (see gwy_container_start_construction()). In particular, this function is not
suitable for the import of data from third party file formats, use gwy_file_pass_cmap().
A new unused id is assigned to the curve map data and returned. Generally, it is the lowest integer larger than any existing curve map data id (however, there are no specific guarantees).
The curve map data is not immediately shown in a new window when the GUI is running. Use gwy_file_set_visible() to
show it, preferrably after setting or synchronising visualisation settings like the colour mapping.
void gwy_file_remove (GwyFile *file,GwyDataKind data_kind,gint id);
Removes a data object from a file data contained together with all auxiliary information.
The function can be used with files in construction (see gwy_container_new_in_construction()), although usually
there is no reason for it.
guint gwy_file_get_ndata (GwyFile *file,GwyDataKind data_kind);
Gets the number of data objects of a given kind in a file.
This is the preferred function for checking whether there are any data of given kind at all.
The file must not be in construction.
gint * gwy_file_get_ids (GwyFile *file,GwyDataKind data_kind);
Gets the list of ids of all objects of given kind in a file.
When there are no data objects of given kind, a non-NULL array is still returned. It contains the single value -1.
The file must not be in construction.
gint * gwy_file_get_idsv (GwyFile *file,GwyDataKind data_kind,guint *n);
Gets the list of ids of all objects of given kind in a file.
The returned pointer remains valid only as long as file
exists and data objects of kind data_kind
are not added
or removed. The array is not −1-terminated so unless you obtain the number of data objects by other means you need
to get n
.
The file must not be in construction.
void gwy_file_sync_items (GwyFile *source,GwyDataKind src_data_kind,gint from_id,GwyFile *destination,GwyDataKind dest_data_kind,gint to_id,GwyFileItemFlags items,gboolean delete_too);
Synchronizes auxiliary data items between data file containers.
The most common use is with dest_data_kind
= src_data_kind
. Nevertheless, some items make sense for multiple data
kinds and can be used with dest_data_kind
≠ src_data_kind
. For example, the false colour gradient can be
synchronised between an image and volume data.
source |
Source data file container. |
|
src_data_kind |
Type of source data object. |
|
from_id |
Source numerical id of data object. |
|
destination |
Destination data file container. |
|
dest_data_kind |
Type of destination data object. |
|
to_id |
Destination numerical id of data object. |
|
items |
Flags indicating the items to synchronise. |
|
delete_too |
|
gint gwy_file_copy_data (GwyFile *source,GwyDataKind data_kind,gint id,GwyFile *destination);
Completely duplicates data in a data file container including all auxiliary information.
The source and destination files may be the same file. Visibility is not copied; the new data object is created as not visible.
See also gwy_data_browser_copy_data() for somewhat a more high-level function.
void gwy_file_merge (GwyFile *file,GwyFile *otherfile);
Merges a data file container into another.
The caller passes its reference on otherfile
to the function. The function releases the reference when it is
finished. The underlying assumption is that otherfile
is then destroyed. This enables an efficient merge as
objects in otherfile
can be simply added to file
and expensive copying is avoided. Keeping otherfile
around
after merging is not recommended.
Use gwy_file_copy() on otherfile
if you want a merge with data duplication.
void gwy_file_set_link_quark (GwyFile *file,GQuark key,GQuark value);
Creates a link in a data file container, specified using quarks.
The link value is always a string. Use this function instead of gwy_file_set_link() for convenience when
you already have quarks. See its description for remarks.
void gwy_file_set_link (GwyFile *file,const gchar *key,const gchar *value);
Creates a link in a data file container, specified using string keys.
Link is a string which holds the key of some other data in the file. Its value can be obtained using
gwy_container_get_string() or gwy_container_gis_string(). The difference between links and plain strings is that
when data are moved around or merged, they can be automatically updated to point to the new location.
Modifying the value by a GwyContainer function, even to another string, makes it a non-link. Therefore, do not do
it. It makes little sense to have links and non-links at the same key
.
gboolean gwy_file_value_is_link (GwyFile *file,const gchar *key);
Checks if a value in a data file container is a link.
It is not an error to call this function with keys which do not corresponds to strings at all. It will return
FALSE.
GObject * gwy_file_get_data (GwyFile *file,GwyDataKind data_kind,gint id);
Gets the primary data object of specified type and id.
The type of the returned object is whatever is appropriate for given data kind. This function is mainly useful
when you need to check generically a data object for some data management purpose. For data processing, usually
functions such as gwy_file_get_image() or gwy_file_get_volume() are preferred as they return a specific type.
It is not an error to ask for an object which does not exist in the file. The function returns NULL in such case.
However, data_kind
and id
must be valid in principle.
void gwy_file_set_image (GwyFile *file,gint id,GwyField *field);
Sets a data field as the image in a data file container with no ownership transfer.
void gwy_file_pass_image (GwyFile *file,gint id,GwyField *field);
Sets a data field as the image in a data file container passing the ownership to the file.
GwyField * gwy_file_get_image (GwyFile *file,gint id);
Gets a data field representing an image in a data file container.
It is not an error to ask for an image which does not exist in the file. The function returns NULL in such case.
However, id
must be valid (non-negative).
void gwy_file_set_image_mask (GwyFile *file,gint id,GwyField *field);
Sets a data field as the image mask in a data file container with no ownership transfer.
void gwy_file_pass_image_mask (GwyFile *file,gint id,GwyField *field);
Sets a data field as the image mask in a data file container passing the ownership to the file.
GwyField * gwy_file_get_image_mask (GwyFile *file,gint id);
Gets a data field representing the image mask in a data file container.
It is not an error to ask for a mask which does not exist in the file. The function returns NULL in such case.
However, id
must be valid (non-negative).
void gwy_file_set_graph (GwyFile *file,gint id,GwyGraphModel *gmodel);
Sets a graph model as the graph in a data file container with no ownership transfer.
void gwy_file_pass_graph (GwyFile *file,gint id,GwyGraphModel *gmodel);
Sets a graph model as the graph in a data file container passing the ownership to the file.
GwyGraphModel * gwy_file_get_graph (GwyFile *file,gint id);
Gets a graph model representing a graph in a data file container.
It is not an error to ask for a graph which does not exist in the file. The function returns NULL in such case.
However, id
must be valid (non-negative).
void gwy_file_set_volume (GwyFile *file,gint id,GwyBrick *brick);
Sets a data brick as the volume data in a data file container with no ownership transfer.
void gwy_file_pass_volume (GwyFile *file,gint id,GwyBrick *brick);
Sets a data brick as the volume data in a data file container passing the ownership to the file.
GwyBrick * gwy_file_get_volume (GwyFile *file,gint id);
Gets a data brick representing volume data in a data file container.
It is not an error to ask for volume data which does not exist in the file. The function returns NULL in such case.
However, id
must be valid (non-negative).
void gwy_file_set_spectra (GwyFile *file,gint id,GwySpectra *spectra);
Sets a spectra object as the single point spectra in a data file container with no ownership transfer.
void gwy_file_pass_spectra (GwyFile *file,gint id,GwySpectra *spectra);
Sets a spectra object as the single point spectra in a data file container passing the ownership to the file.
GwySpectra * gwy_file_get_spectra (GwyFile *file,gint id);
Gets a spectra object representing single point spectra in a data file container.
It is not an error to ask for single point spectra which does not exist in the file. The function returns NULL in
such case. However, id
must be valid (non-negative).
void gwy_file_set_xyz (GwyFile *file,gint id,GwySurface *surface);
Sets a surface object as the XYZ data in a data file container with no ownership transfer.
void gwy_file_pass_xyz (GwyFile *file,gint id,GwySurface *surface);
Sets a surface object as the XYZ data in a data file container passing the ownership to the file.
GwySurface * gwy_file_get_xyz (GwyFile *file,gint id);
Gets a surface object representing XYZ data in a data file container.
It is not an error to ask for XYZ data which does not exist in the file. The function returns NULL in such case.
However, id
must be valid (non-negative).
void gwy_file_set_cmap (GwyFile *file,gint id,GwyLawn *lawn);
Sets a data lawn as the a curve map in a data file container with no ownership transfer.
void gwy_file_pass_cmap (GwyFile *file,gint id,GwyLawn *lawn);
Sets a data lawn as the a curve map in a data file container passing the ownership to the file.
GwyLawn * gwy_file_get_cmap (GwyFile *file,gint id);
Gets a data lawn representing a curve map in a data file container.
It is not an error to ask for a curve map which does not exist in the file. The function returns NULL in such case.
However, id
must be valid (non-negative).
void gwy_file_set_title (GwyFile *file,GwyDataKind data_kind,gint id,const gchar *name,gboolean numbered);
Sets the title of a data object in a file data container.
This is a convenience wrapper, abstracting setting the title for different data types.
Depending on numbered
, the id is possibly appended to the name. When name
is NULL, id is always appended,
regardless of numbered
.
Passing numbered
as TRUE is generally recommended for derived data computed in modules with generic names such as
‘Drift-corrected’. Without numbering there would be lots of data with the same name, making it difficult to
distinguish them.
For channels in imported files, which generally carry file-unique names, it is fine to not append numbers. See also
gwy_file_pass_title() which may be more useful on file import.
The function can be used with files in construction (see gwy_container_new_in_construction()), provided that the
tiltle is set after the primary data object.
void gwy_file_pass_title (GwyFile *file,GwyDataKind data_kind,gint id,gchar *name);
Sets the title of a data object in a file data container, passing string ownership.
This is a convenience wrapper, abstracting setting the title for different data types.
Unlike in gwy_file_set_title(), name
is always used unmodified and may not be NULL. Uts ownership is passed to
the file (or other object).
The function can be used with files in construction (see gwy_container_new_in_construction()), provided that the
tiltle is set after the primary data object.
gchar * gwy_file_get_display_title (GwyFile *file,GwyDataKind data_kind,gint id);
Gets a suitable title of a data object in a file data container.
The function returns a non-NULL string even if no data title has been set or is empty. It is something like
‘Untitled 123’ in such case. It makes it useful for having at least some identifying label for all data objects,
regardless if they have any title set. However, if you really need to know whether a title has been set use
gwy_file_get_title().
const gchar * gwy_file_get_title (GwyFile *file,GwyDataKind data_kind,gint id);
Gets the title of a data object in a file data container.
If no title is set this function can return NULL. Use gwy_file_get_display_title() if you want to always get
some useful identifying string.
gint * gwy_file_find_by_title (GwyFile *file,GwyDataKind data_kind,const gchar *titleglob);
Gets the list of all data objects in a data file container whose titles match the specified pattern.
If titleglob is NULL the function is identical to gwy_file_get_ids().
For data objects with no title the synthetic title produced by gwy_file_get_display_title() is used.
void gwy_file_set_visible (GwyFile *file,GwyDataKind data_kind,gint id,gboolean visible);
Sets the visibility of a data item in a data file container.
The function can be used to either just mark the visibility status of data objects in files or actually control the visibility in files open in the GUI. Closing the last window displaying any data of a particular file can close the file entirely.
The function can be used with files in construction (see gwy_container_new_in_construction()).
gboolean gwy_file_get_visible (GwyFile *file,GwyDataKind data_kind,gint id);
Gets the visivility status of a data object in a data file container.
The function returning TRUE does not mean the data object is actually displayed in some window. It simply returns
the value of the flag and can be used with standalone files with no GUI running.
void gwy_file_pass_meta (GwyFile *file,GwyDataKind data_kind,gint id,GwyContainer *meta);
Sets the metadata for a data object in a data file container.
This is a convenience wrapper for gwy_container_pass_object() with slightly more checking. It can be used with
files in construction (see gwy_container_new_in_construction()) and is most useful in file import modules.
If meta
has still the in-construction flag set, the function calls gwy_container_finish_construction() on it.
Preferably set the metadata after meta
has been filled with values.
Analogous function gwy_file_set_meta() is missing intentionally. It creates too big temptation to use the same
object as metadata for multiple data, which is an error. Use GwyFile functions to get the key and GwyContainer
functions to set the object if you really need to keep the metadata around after puttng it to the file. The useful
idioms are the following.
With a function which creates metadata:
1 |
gwy_file_pass_meta(file, GWY_FILE_IMAGE, id, create_metadata(...)); |
With the same metadata for many data items:
1 2 3 4 5 6 7 |
meta = create_metadata(...); ... gwy_file_pass_meta(file, GWY_FILE_IMAGE, id1, gwy_container_copy(meta)); gwy_file_pass_meta(file, GWY_FILE_IMAGE, id2, gwy_container_copy(meta)); gwy_file_pass_meta(file, GWY_FILE_IMAGE, id3, gwy_container_copy(meta)); ... g_object_unref(meta); |
With optional metadata:
1 2 3 4 5 6 |
meta = gwy_container_new(); ... if (gwy_container_get_n_items(meta)) gwy_file_pass_meta(file, GWY_FILE_IMAGE, id, meta)); else g_object_unref(meta); |
GwyContainer * gwy_file_get_meta (GwyFile *file,GwyDataKind data_kind,gint id);
Gets the metadata for a data object in a data file container.
void gwy_file_set_palette (GwyFile *file,GwyDataKind data_kind,gint id,const gchar *name);
Sets the gradient name for data visualisation in a data file container.
const gchar * gwy_file_get_palette (GwyFile *file,GwyDataKind data_kind,gint id);
Gets the gradient name for data visualisation in a data file container.
void gwy_file_set_color_mapping (GwyFile *file,GwyDataKind data_kind,gint id,GwyColorMappingType mapping);
Sets the colour mapping type for data visualisation in a data file container.
GwyColorMappingType gwy_file_get_color_mapping (GwyFile *file,GwyDataKind data_kind,gint id);
Gets the colour mapping type for data visualisation in a data file container.
If no mapping is set, the current default mapping type from user settings is returned.
void gwy_file_set_fixed_range (GwyFile *file,GwyDataKind data_kind,gint id,gdouble min,gdouble max);
Sets the fixed colour mapping range for data visualisation in a data file container.
gboolean gwy_file_get_fixed_range (GwyFile *file,GwyDataKind data_kind,gint id,gdouble *min,gdouble *max);
Gets the fixed colour mapping range for data visualisation in a data file container.
It is possible (although unusual) to request just one of the values, or even none.
void gwy_file_remove_selections (GwyFile *file,GwyDataKind data_kind,gint id);
Removes all selections associated with image-like data from a file.
This is the preferred selection handling after in-place changes in data geometry as they have generally unpredictable effects on selections. The currently active tool generally needs a selection and will be forced to re-create it.
The function can be used with files in construction (see gwy_container_new_in_construction()), although usually
there is no reason for it.
void
gwy_file_remove_logs (GwyFile *file);
Removes all data processing logs from a file.
const gchar *
gwy_file_get_format_name (GwyFile *file);
Gets the file format name for a data file container.
The file format name is the name of file import function used to import the data.
const gchar *
gwy_file_get_filename_sys (GwyFile *file);
Gets the file name corresponding to a data file container.
The file name is set on two ocasions: file load and successful file save. File export does not set it.
gint
gwy_file_get_id (GwyFile *file);
Gets the numerical identifier of a file.
Only files managed by the data browser have an id. GWY_FILE_ID_NONE is returned for free-standing files. You can
check whether a file is managed by calling this function and comparing the returned id to GWY_FILE_ID_NONE.
The identifier is not reused and does not change during program's lifetime. See also gwy_data_browser_get_file().
For convenience, NULL can be also passed. The function then returns a negative value (GWY_FILE_ID_NONE).
GQuark
gwy_file_key_filename (void);
Returns the file name quark identifier.
GQuark gwy_file_key_data (GwyDataKind data_kind,gint id);
Constructs the quark identifier for a data kind and numerical id.
GQuark
gwy_file_key_image (gint id);
Constructs image data quark identifier from its id.
GQuark
gwy_file_key_image_mask (gint id);
Constructs image mask data quark identifier from its id.
GQuark
gwy_file_key_image_picture (gint id);
Constructs image presentation data quark identifier from its id.
GQuark
gwy_file_key_graph (gint id);
Constructs graph model quark identifier from its id.
GQuark
gwy_file_key_spectra (gint id);
Constructs spectra quark identifier from its id.
GQuark
gwy_file_key_volume (gint id);
Constructs data brick quark identifier from its id.
GQuark
gwy_file_key_volume_mask (gint id);
Constructs volume mask data quark identifier from its id.
GQuark
gwy_file_key_xyz (gint id);
Constructs XYZ surface quark identifier from its id.
GQuark
gwy_file_key_cmap (gint id);
Constructs GwyLawn curve map quark identifier from its id.
GQuark
gwy_file_key_image_title (gint id);
Constructs data field title quark identifier from its id.
GQuark
gwy_file_key_image_color_mapping (gint id);
Constructs data field color mapping quark identifier from its id.
The quark key identifying GwyColorMappingType false colour mapping type of image with number id
.
GQuark
gwy_file_key_image_range_min (gint id);
Constructs data field fixed range minimum quark identifier from its id.
GQuark
gwy_file_key_image_range_max (gint id);
Constructs data field fixed range maximum quark identifier from its id.
GQuark
gwy_file_key_image_palette (gint id);
Constructs data field palette quark identifier from its id.
GQuark
gwy_file_key_image_meta (gint id);
Constructs data field metadata quark identifier from its id.
GQuark
gwy_file_key_image_real_square (gint id);
Constructs data field real-square quark identifier from its id.
GQuark gwy_file_key_image_selection (gint id,const gchar *name);
Constructs data field selection quark identifier from its id and selection name.
If name
is NULL or empty the base selections key is constructed, with no suffix for a specific selection.
GQuark
gwy_file_key_image_mask_color (gint id);
Constructs image mask color quark identifier from its id.
GQuark
gwy_file_key_volume_mask_color (gint id);
Constructs volume mask color quark identifier from its id.
GQuark
gwy_file_key_volume_title (gint id);
Constructs data brick title quark identifier from its id.
GQuark
gwy_file_key_volume_picture (gint id);
Constructs data brick preview quark identifier from its id.
GQuark
gwy_file_key_volume_palette (gint id);
Constructs data brick palette quark identifier from its id.
GQuark
gwy_file_key_volume_meta (gint id);
Constructs data brick title quark identifier from its id.
GQuark
gwy_file_key_xyz_title (gint id);
Constructs data surface title quark identifier from its id.
GQuark
gwy_file_key_xyz_palette (gint id);
Constructs XYZ surface palette quark identifier from its id.
GQuark
gwy_file_key_xyz_meta (gint id);
Constructs XYZ surface title quark identifier from its id.
GQuark
gwy_file_key_xyz_picture (gint id);
Constructs XYZ surface preview quark identifier from its id.
GQuark
gwy_file_key_cmap_title (gint id);
Constructs GwyLawn curve map title quark identifier from its id.
GQuark
gwy_file_key_cmap_palette (gint id);
Constructs GwyLawn curve map palette quark identifier from its id.
GQuark
gwy_file_key_cmap_meta (gint id);
Constructs GwyLawn curve map title quark identifier from its id.
GQuark
gwy_file_key_cmap_picture (gint id);
Constructs GwyLawn curve map preview quark identifier from its id.
GQuark
gwy_file_key_cmap_real_square (gint id);
Constructs GwyLawn curve map real-square quark identifier from its id.
The quark key identifying boolean controlling real-square setting of GwyLawn curve map with number id
.
gboolean gwy_file_parse_key (const gchar *strkey,GwyFileKeyParsed *parsed);
Parses a data file container key.
The parsing usually identifies the data kind, id and the specific setting or property for the data (if applicable).
If a specific combination is impossible, for instance mask colour with graphs, the function returns FALSE even
though the key may seem syntactically valid.
Upon successful parsing all fields are always set (possibly to values meaning ‘none’). There are some special
cases. The piece GWY_FILE_PIECE_FILENAME is file-global and has neither data kind nor id.
When parsed.suffix
is not set to NULL will generally point inside strkey
. Since GwyContainer keys are backed by
GQuark, the corresponding string key is a constant string which always exists. Hence, the pointer will be always
valid. However, if you use gwy_file_parse_key() with an arbitrary string, be aware that modifying or freeing it
invalidates the suffix.
See also gwy_file_form_key() for constructing the key back.
GQuark
gwy_file_form_key (const GwyFileKeyParsed *parsed);
Constructs a data file quark key from its broken down representation.
Although the function does not accept complete nonsense, it can form keys corresponding to data type and piece
combinations which do not actually exists. In other words, if parsed
was obtained using gwy_file_parse_key(), this
function can be used to construct the string (quark) key back. However, a key constructed by this function is not
guaranteed to be parseable using gwy_file_parse_key().
See gwy_file_form_string_key() for a string version.
const gchar *
gwy_file_form_string_key (const GwyFileKeyParsed *parsed);
Constructs a data file string key from its broken down representation.
See gwy_file_form_key() for a quark version and remarks.
#define GWY_FILE_PREFIX_IMAGE "/image"
Prefix of image string keys in Gwyddion data files.
#define GWY_FILE_PREFIX_GRAPH "/graph"
Prefix of graph string keys in Gwyddion data files.
#define GWY_FILE_PREFIX_SPECTRA "/sps"
Prefix of single point spectra string keys in Gwyddion data files.
#define GWY_FILE_PREFIX_VOLUME "/volume"
Prefix of volume data string keys in Gwyddion data files.
#define GWY_FILE_PREFIX_XYZ "/xyz"
Prefix of XYZ data string keys in Gwyddion data files.
#define GWY_FILE_PREFIX_CMAP "/cmap"
Prefix of curve map string keys in Gwyddion data files.
Basic kind of data which can be found in Gwyddion data files.
|
No data. Often meaning an error, sometimes also special data keys not related to any specific data. |
||
|
An image, primarily represented as GwyField. |
||
|
A graph, primarily represented as GwyGraphModel. |
||
|
Single point spectra, primarily represented as GwySpectra. |
||
|
Volume data, primarily represented as GwyBrick. |
||
|
XYZ data, primarily represented as GwySurface. |
||
|
A curve map, primarily represented as GwyLawn. |
Type of auxiliary data in a Gwyddion data file.
|
False colour mapping gradient. |
||
|
False colour mapping range. |
||
|
False colour mapping type. |
||
|
Pixel/real aspect ratio. |
||
|
Image mask. |
||
|
Mask colour. |
||
|
Image selections. |
||
|
Data item metadata. |
||
|
Object representing the visualisation or preview of the data. |
||
|
Window size or scaling. |
||
|
Data item title. |
||
|
Log of operations on the data item. |
||
|
Data item visibility. |
||
|
Name of the file. |
||
|
No data piece. It can indicate an invalid data piece, but also the main data object. |
typedef struct {
gint id;
GwyDataKind data_kind;
GwyFilePiece piece;
const gchar *suffix;
} GwyFileKeyParsed;
Broken down representation of a piece of information in a data file container.
Numerical id of a data in file, -1 for no data item. |
||
GwyDataKind |
Type of the data object, |
|
GwyFilePiece |
Particular piece related or belonging to the data, |
|
Remaning part of the key (pointer to |
struct GwyFile;
The GwyFile struct contains private data only and should be accessed using the functions below.