Repository navigation
Expand file tree
/
Copy pathug04treeview.html
More file actions
executable file
·334 lines (287 loc) · 15.1 KB
/
Copy pathug04treeview.html
File metadata and controls
executable file
·334 lines (287 loc) · 15.1 KB
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
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
<?php
$page_title = "HDFView User's Guide -- Tree Viewer";
include ("../../../links.php");
include ("../../../includes/header.html");
?>
<link href="edit.css" rel="stylesheet" type="text/css" />
<p>
<a href="index.html">[Index]</a>
<a href="ug01introduction.html">[1]</a>
<a href="ug02start.html">[2]</a>
<a href="ug03objects.html">[3]</a>
<a href="ug04treeview.html">[4]</a>
<a href="ug05spreadsheet.html">[5]</a>
<a href="ug06imageview.html">[6]</a>
<a href="ug07textview.html">[7]</a></p>
<fieldset><h1>Chapter 4: The Tree Viewer</h1></fieldset>
<ul class="ul">
<li class="li2"><a href="ug04treeview.html#ug04overview">4.1 Overview</a></li>
<li class="li2"><a href="ug04treeview.html#ug04tree">4.2 Tree Structure</a></li>
<li class="li2"><a href="ug04treeview.html#ug04data">4.3 View Data Content</a></li>
<li class="li2"><a href="ug04treeview.html#ug04metadata">4.4 Display Metadata and Attributes</a></li>
<li class="li2"><a href="ug04treeview.html#ug04edit">4.5 Edit File and File Structure</a>
<ul class="ul">
<li class="li2"><a href="ug04treeview.html#ug04file">4.5.1 Create and Save File</a></li>
<li class="li2"><a href="ug04treeview.html#ug04add">4.5.2 Add and Delete Object</a></li>
<li class="li2"><a href="ug04treeview.html#ug04copy">4.5.3 Copy and Paste Object</a></li>
<li class="li2"><a href="ug04treeview.html#ug04attribute">4.5.4 Add, Delete and Modify Attribute</a></li>
</ul>
</li>
</ul>
<hr noshade="noshade" size="1" />
<p> </p>
<h2> <a name="ug04overview" id="ug04overview"></a>4.1 Overview</h2>
<p>The Tree Viewer (or panel) shows the objects in each open file, and supports the navigation and
editing of those objects. Multiple files can be viewed and edited, and both
HDF4 and HDF5 files can be opened. The viewing and editing operations work
for both HDF4 and HDF5, although some operations cannot be implemented for
HDF4.</p>
<p>Every HDF5 object appears in at least one group. A set of objects can be
stored together in a group. You can use the group object API functions
to create and manipulate the groups. With the groups, you can organize
the data objects in an HDF file. Objects in HDF4 may or may not belong to
a group. An object that does not belong to any group is called a lone object,
such as lone Vdata. To map HDF4 structure to HDF5 structure, a "dummy" root
group is created in the tree view and lone objects are put at the root group.</p>
<p>Since objects can have names in more than one group, the set of all
objects in an HDF file is a directed graph. It is difficult to manipulate
and browse the graph on a 2-D virtual screen. Instead of showing the directed
graph of the HDF file structure, HDFView displays HDF objects in a conventional
structure as a tree of "folders", breaking the "loops" in the graph when
necessary. The tree viewer of HDFView provides users an easy way to browse
and manage HDF data objects in an HDF file. The following icons are used to
represent HDF objects:</p>
<ul class="ul">
<li class="li2"><img src="images/icon_hdf4.gif"> --- HDF4 file</li>
<li class="li2"><img src="images/icon_hdf5.gif"> --- HDF5 file</li>
<li class="li2"><img src="images/icon_folderclose.gif"> --- Collapsed group folder</li>
<li class="li2"><img src="images/icon_folderopen.gif"> --- Expanded group folder</li>
<li class="li2"><img src="images/icon_dataset.gif"> --- HDF4 SDS or HDF5 scalar dataset</li>
<li class="li2"><img src="images/icon_image.gif"> --- HDF4 GR image or HDF5 image</li>
<li class="li2"><img src="images/icon_table.gif"> --- HDF4 Vdata or HDF5 compound dataset</li>
</ul>
<br />
<hr noshade size=1 />
<a name="ug04tree"></a>
<h2>
4.2 Tree Structure</h2>
<p>
Upon opening an HDF file, HDFView displays the tree structure of the HDF
file in the tree viewer, which is the left panel in the HDFView window. Every
HDF file has exactly one root group that is created when the file is created.
The root group is added to the root of the tree. When two or more files are
open, the root groups of the files are listed at the root in the tree view.</p>
<p>Groups are presented as folders in the tree viewer. Opening and closing
folders, you can browse the individual HDF objects in the HDF file. Datasets,
images and tables are leaf objects in the tree. Clicking a leaf object allows you to see the content of the object displayed in the data/document window
in the right panel of the HDFView window. Figure 4.1 illustrates that an HDF4 file, <em>annras.hdf</em>,
and an HDF5 file, <em>hdf5_test.h5</em>, are currently open by the HDFView.</p>
<center>
<p><img src="images/tree_view.gif" />
<br />
<b>Figure 4.1: </b><b>The Tree Viewer</b></p>
</center>
<p>
To select an object in the tree, point the mouse at the object and click once on the
object. You can open the data content of the selected data object from the menu bar
or from the popup menu.</p>
<p>The popup menu appears by clicking the right mouse button on the object
in the tree view. When a command is selected from the popup menu, the command
action will be taken on the object clicked.
<center>
<p><img src="images/menu_popup.gif" />
<br /><b>The Object Popup Menu</b></p></center>
<h2>
<a name="ug04data"></a>4.3 View Data Content</h2>
<p>
The Tree View allows the user to navigate the structure of the HDF file,
to select individual objects, and to view the content of the selected object.</p>
<p>
You can open a data object in the tree by a double-mouse-click or selecting the "Open"
command from the menu bar or the popup menu. By default, data content is displayed as
an image, a table or text based on its datatype. See the following chapters
for a detailed discussion of the data viewers.</p>
<p>
If the data value is not in memory, the "Open" action will load the data from
the file and display it. If the data is already loaded into memory, it will just
display the data. If you want to refresh data in memory or open a dataset with a
different selection (subset or display option), you have to use the "Open As" command.</p>
<p>
Using "Open As", you can select a subset of the dataset to display or change the
default display options. For example, you can display the data values of an image
in a spreadsheet, or show a scalar dataset as an image. For multi-dimension dataset,
you can select any of two dimensions to display. The mouse-drag navigator allows
you to select a subset by dragging the mouse over the preview image. For more details
about how to select a subset and dimensions, read
<a href="ug05spreadsheet.html#ug05subset">5.2 Subset and Dimension Selection</a>.</p>
<p>
The "Start" field(s) determines the starting coordinate of the selected area.
<br />
The "End" field(s) determines the ending coordinate of the selected area.
<br />
The "Stride" field(s) chooses array locations from the dataspace with each value in
the stride array determining how many elements to move in each dimension. Setting
a value in the stride array to 1 moves to each element in that dimension of the
dataspace; setting a value of 2 in the stride array moves to every
other element in that dimension of the dataspace. In other words, the stride
determines the number of elements to move from the start location in each dimension.
Stride values of 0 are not allowed. If the stride parameter is NULL, a contiguous
hyperslab is selected (as if each value in the stride array was set to all 1's).
<center>
<p><img src="images/dataset_open_as.gif" />
<br /><b>The Display Option</b></p></center>
<h2>
<a name="ug04metadata"></a>4.4 Display Metadata and Attributes</h2>
<p>
The metadata dialog box appears by right-clicking the object (icon) in the tree
or by selecting the "Properties" command from the "Object"
menu. The HDF metadata display contains two tabbed panes, showing the
general metadata and the user-defined attributes.</p>
<p>General metadata includes the name, type, and path of the data object.</p>
<p>For groups, general metadata also includes the name, type, and size of all
the members of the group. The following figure shows an example of the general information
of a group.</p>
<center>
<p><img src="images/property_general_group.gif" />
<br />
<b>General Properties of an HDF group.</b></p>
</center>
<p>For a dataset (or image), the general metadata also includes the dataspace
information (rank, current, and maximum size of each dimension), datatype
information (type, size, and order).
The following figure shows an example of the metadata for a dataset.</p>
<center>
<p><img src="images/property_general_dataset.gif" />
<br />
<b>General Properties of a Dataset.</b></p>
</center>
<p>
To see the attributes of an object, click the "Attribute" tab in the object's Properties window. The name, type, size, and value of all attributes
of the selected object are displayed in a table. The following figure shows an example
of the attribute display.</p>
<center>
<p><img src="images/property_attribute.gif" />
<br /><b> HDF Attributes</b></p></center>
<h2>
<a name="ug04edit"></a>4.5 Edit File and File Structure</h2>
<p>
The HDFView allows you to create and save a file and to add and delete objects in the
file.
<b>Users should be aware that all the changes are made to the actual stored
file. This version does not support the undo operation; editing results cannot
be automatically recovered</b>.</p>
<h3>
<a name="ug04file"></a>4.5.1 Create and Save File</h3>
<p>
The file creation dialog box appears when you choose the "New HDF4/5" command from the
File menu. Choose the path and the file name you want to create and click the "Ok" button
from the New File dialog box. A new file will be created with an empty root group.</p>
<center>
<p><img src="images/new_file.gif" />
<br /><b>Create New File</b></p></center>
<p>
Select "Save As" from the File menu to save the currently selected file into a new file
of the same format, i.e. HDF4 to HDF4 or HDF5 to HDF5. (HDFView does not support
HDF4 to HDF5 conversion.)</p>
<p>For HDF5, a new file is written that does not contain the inaccessible
objects, and it packs the unusable space. Thus, the new file may be smaller
than the original. <b>Dataset or attributes values that are object references
can not be updated.</b> For HDF4, a new file is the exact copy, same file
content and file size.</p>
<h3>
<a name="ug04add"></a>4.5.2 Add and Delete Object</h3>
<p>
To create a new group, select the "New Group" command from the Object menu. Then,
give the name of the new group and the parent group to which the new group is to be added.</p>
<center>
<p><img src="images/new_group.gif" />
<br /><b>Create New Group</b></p></center>
<p>
To create a new dataset, select the "New Dataset" command from the Object menu. Then,
specify the name, path, datatype, dataspace, and storage layout and compression of the
new dataset. The current version only supports creating simple datatypes. This version
cannot create an HDF4 VData or an HDF5 compound dataset; however, these objects can be viewed.
Supported datatypes include integers (byte, short, int, long), float, double, and
character. For HDF5, it also includes String and Object references.</p>
<center>
<p><img src="images/new_dataset.gif" />
<br /><b>Create New Dataset</b></p></center>
<p>
The "New Image" command from the Object menu allows you to create an empty image with
default image attributes. The new image does not have any palette attached to it.
You can create two kinds of images: an indexed image with 256 colors and a 24-bit true color image.</p>
<center>
<p><img src="images/new_image.gif" />
<br /><b>Create New Image</b></p></center>
<p>
To delete objects from the tree, you first select the objects, then choose the "Delete"
command from the Object menu. A confirmation dialog appears to verify that you want to
delete the selected objects.</p>
<p>
<b>Deleting an object from an HDF4 file is not supported</b>.
Deleting the HDF5 object calls the H5Gunlink() function of the HDF5 library. The unlink
function removes the link, and when an object has no remaining links, it can be deleted.
However, the HDF5 library does not currently reclaim the space in the file. This means
that the size of the file does not shrink even though objects are removed. (Users are
cautioned that repeatedly creating and deleting objects with H5View can cause the HDF5
file to grow.) To get rid of the inaccessible objects, you have to save the current
file into a new file and rename the new file to the current file.</p>
<h3>
<a name="ug04copy"></a>4.5.3 Copy and Paste Object</h3>
<p>
HDFView allows you to copy an object and paste it in the same file or a different file
of the same type. To copy and paste an HDF5 object from the tree, select
the object and then select the "Copy" command from the Object menu. You then select a group
by a single click on the group to which the object is pasted. After you select the
"Paste" command, the object is copied into the selected group. HDFView does not allow
you to copy/paste an object of different format. The "Paste" command will create a new
object in the selected group instead of making a hard link.</p>
<p>
You can also select multiple objects in the tree and apply the copy/paste action into
the selected objects. Selection can be contiguous and discontiguous. To make a
contiguous selection, hold down the Shift key and click on the first object, then
click on the second object while holding down the Shift key. All the objects between
the two objects will be selected inclusively. To make a discontiguous selection,
hold down the Ctrl key while clicking the objects with the left mouse button. The
objects being clicked will be selected. The rest of the operation of copying/pasting
multiple objects is the same as that of copying/pasting a single object.</p>
<p>
Copying a group will also copy all the descendents of the group. Copying a root
group is not allowed.</p>
<h3>
<a name="ug04attribute"></a>4.5.4 Add, Delete and Modify Attribute</h3>
<p>
To add an attribute, click the "Add" button on the Attribute panel.
You can create an attribute of a string, scalar, and 1D array of simple datatypes.
Attributes of multiple dimensions or a compound datatype are not supported.</p>
<center>
<p><img src="images/new_attribute.gif" />
<br /><b>Create New Attribute</b></p></center>
<p>
To change the value of an attribute, type the new value into the cell. Only
string and scalar attributes can be modified. The new value must be interpretable
as a value of the correct type for the attribute. For a string value, the value
typed will be truncated to the size of the attribute if it is longer than the
declared size of the attribute. A valid data value must follow the rules specified
by the section <a href="ug05spreadsheet.html#ug05change">5.4 Change Data Value</a>.</p>
<p>
To delete an attribute, select the attribute and click the "Delete" button.
<b>Deleting an attribute of an HDF4 object is not supported</b>.</p>
<!-- BEGIN OF FOOTER INFO -->
<hr noshade size=1 />
<p>
<a href="index.html">[Index]</a>
<a href="ug01introduction.html">[1]</a>
<a href="ug02start.html">[2]</a>
<a href="ug03objects.html">[3]</a>
<a href="ug04treeview.html">[4]</a>
<a href="ug05spreadsheet.html">[5]</a>
<a href="ug06imageview.html">[6]</a>
<a href="ug07textview.html">[7]</a></p>
<h5>Last Modified: December 16, 2008</h5>
<!-- END OF FOOTER INFO -->
<!--
<?php
include ("../../../includes/footer.html");
?>
-->