/usr/share/gtk-doc/html/libgwymodule/gwymodule-tutorial-overview.html is in libgwyddion20-doc 2.34-3ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Gwyddion Module Library Reference Manual: Gwyddion Module Overview</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
<link rel="home" href="index.html" title="Gwyddion Module Library Reference Manual">
<link rel="up" href="ModuleTutorial.html" title="Gwyddion Module Tutorial">
<link rel="prev" href="ModuleTutorial.html" title="Gwyddion Module Tutorial">
<link rel="next" href="gwymodule-tutorial-minimal.html" title="Minimal Module">
<meta name="generator" content="GTK-Doc V1.19 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="10"><tr valign="middle">
<td width="100%" align="left"></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="ModuleTutorial.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="ModuleTutorial.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="gwymodule-tutorial-minimal.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="gwymodule-tutorial-overview"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle">Gwyddion Module Overview</span></h2>
<p>Gwyddion Module Overview —
Overview of <span class="application">Gwyddion</span> modules
</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="id-1.3.2.3"></a><h2>Module Types</h2>
<p>
<span class="application">Gwyddion</span> is quite a modular application. In
fact, most of its basic functionallity is provided by modules. Modules
allow to easily extend <span class="application">Gwyddion</span> without the
need to recompile. However, it is currently impossible to load, unload
and change modules while <span class="application">Gwyddion</span> is running,
therefore it has to be restarted when the set of modules change. Modules
are then automatically detected, registered and the functions provided by
modules are added to <span class="application">Gwyddion</span> menus and/or
toolboxes.
</p>
<p>
There are several distinct module types:
</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem"><p>
<a class="link" href="gwymodule-tutorial-process.html" title="Data Processing Modules">data processing
modules</a> that provide functions for processing of
two-dimensional data arrays (e.g. <span class="emphasis"><em>Fast Fourier
Transform</em></span> module), or changing the graphical presentation
of data (e.g. <span class="emphasis"><em>shading</em></span> module). Data processing
modules usually get data (i.e. two-dimensional field of SPM data),
possibly ask for processing options and do the requested data
processing. More interactive functions are typically better
implemented as tool modules.
</p></li>
<li class="listitem"><p>
<a class="link" href="gwymodule-tutorial-file.html" title="File Modules">file loading and saving
modules</a> that handle import and export of foreign file formats,
also the <span class="application">Gwyddion</span> native file format is
handled by a module.
</p></li>
<li class="listitem"><p>
<a class="link" href="gwymodule-tutorial-graph.html" title="Graph Modules">graph modules</a> that
operate on one-dimensional data (graphs), e.g. profiles obtained by
<span class="emphasis"><em>Profile selection</em></span> tool. An example is
<span class="emphasis"><em>Function fit</em></span> module.
</p></li>
<li class="listitem"><p>
<a class="link" href="gwymodule-tutorial-tool.html" title="Tool Modules">tool modules</a> that
provide tools operating on two-dimensional data directly in
application data windows. They have typically more interactive
interface than processing modules and allow to select objects on the
data with mouse. Examples include <span class="emphasis"><em>Read value</em></span> or
<span class="emphasis"><em>Three-point leveling</em></span> tools.
</p></li>
<li class="listitem"><p>
<a class="link" href="gwymodule-tutorial-layer.html" title="Layer Modules">layer modules</a> that
implement two-dimensional data selections as <span class="emphasis"><em>rectangular
selection</em></span> or <span class="emphasis"><em>line selection</em></span>.
Selections are mostly employed in tool modules, however several data
processing modules use them too.
</p></li>
</ul></div>
<p>
</p>
<p>
The above types are in fact <span class="emphasis"><em>function</em></span> types, not
module types. One module often provides a single function, but it can
also provide a whole bunch of completely unrelated functions, even of
different types. However, it is usual to group functions containing
considreable amount of common code to one module (to allow sharing), and
use separate modules for unrelated functions.
</p>
<p>
More precisely, a file (i.e., a shared/dynamically linked library) always
corresponds to a one <span class="application">Gwyddion</span> module.
A module can register zero or more functions (features) of arbitrary
type.
</p>
</div>
<div class="refsect1">
<a name="id-1.3.2.4"></a><h2>Data Representation</h2>
<p>
The object representing a data file in Gwyddion is <a href="../libgwyddion/GwyContainer.html"><span class="type">GwyContainer</span></a>.
It is a general container that can hold values of mixes types: atomic,
strings or objects. Its items are identified with <a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Quarks.html#GQuark"><span class="type">GQuark</span></a>s,
that is either by strings or by integers associated with the strings.
</p>
<p>
Two-dimensional data arrays (represented with <a href="../libgwyprocess/GwyDataField.html"><span class="type">GwyDataField</span></a>) or
one-dimensional curve data (represented with <a href="../libgwydgets/GwyGraphModel.html"><span class="type">GwyGraphModel</span></a> and
<a href="../libgwydgets/GwyGraphCurveModel.html"><span class="type">GwyGraphCurveModel</span></a>) and auxiliary data are stored at keys resembling
Unix file paths and forming a kind of hierarchical structure.
For instance the data of the zeroth channel and its title can be
obtained with
</p>
<div class="informalexample">
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="listing_lines" align="right"><pre>1
2</pre></td>
<td class="listing_code"><pre class="programlisting"><span class="normal">data_field </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="../libgwyddion/GwyContainer.html#gwy-container-get-object-by-name">gwy_container_get_object_by_name</a></span><span class="symbol">(</span><span class="normal">container</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"/0/data"</span><span class="symbol">);</span>
<span class="normal">title </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="../libgwyddion/GwyContainer.html#gwy-container-get-string-by-name">gwy_container_get_string_by_name</a></span><span class="symbol">(</span><span class="normal">container</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"/0/data/title"</span><span class="symbol">);</span></pre></td>
</tr>
</tbody>
</table>
</div>
<p>
The location of certain items is given by historical reasons and do not
always make much sense. Fortunately a module author is rarely forced to
resort to this low-level interface. The
<a href="../libgwyapp/libgwyapp-data-browser.html">data browser</a> provides
high-level view of the file and means to perform all common operations.
</p>
<p>
In the high-level view, channels and graphs in a file are simply numbered
by small integers (each data type has its own numbering) and to uniquely
identify an object one uses the (container, id) couple.
The id number an object does not change during its lifetime (however,
it can change when the file is saved, closed and then opend again).
There are also functions with similar interface, operating on auxiliary
data.
</p>
<p>
For example to add a new data field to a container (file) we call
</p>
<div class="informalexample">
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="listing_lines" align="right"><pre>1</pre></td>
<td class="listing_code"><pre class="programlisting"><span class="normal">new_id </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="../libgwyapp/libgwyapp-data-browser.html#gwy-app-data-browser-add-data-field">gwy_app_data_browser_add_data_field</a></span><span class="symbol">(</span><span class="normal">data_field</span><span class="symbol">,</span><span class="normal"> container</span><span class="symbol">,</span><span class="normal"> <a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Standard-Macros.html#TRUE:CAPS">TRUE</a></span><span class="symbol">);</span></pre></td>
</tr>
</tbody>
</table>
</div>
<p>
The function <a href="../libgwyapp/libgwyapp-data-browser.html#gwy-app-data-browser-add-data-field"><code class="function">gwy_app_data_browser_add_data_field()</code></a> takes care of finding
a free id, storing the data field at the right key and even creation of
a window showing the new data field.
</p>
</div>
</div>
<div class="footer">
<hr>
Generated by GTK-Doc V1.19</div>
</body>
</html>
|