[Index] [Prev] [Next] [Bottom]


Chapter 11: Using ASCII HDF Files, or Text Files

In addition to standard HDF files, JHV also reads and writes ASCII files that adhere to the HDF ASCII Interchange Format, HAIF. Such ASCII files are often useful when exchanging data with non-HDF applications.
11.1 Reading, Writing, and Working with ASCII Files
11.2 Converting an ASCII File to an HDF File


11.1 Reading, Writing, and Working with ASCII Files

JHV reads and works with HAIF-compliant ASCII files transparently; as an enduser, you do not need to know whether a file is a standard HDF file or an HAIF-compliant ASCII file.

Like any HDF file, an HAIF-compliant ASCII file may contain multiple data objects. The headers of these objects are read and grouped into a hierarchical tree, and the content of a data object is not loaded until it is selected.

Writing ASCII files is nearly transparent; the only distinct action required is to select Save as HDF or Save As Text from the image window File menu.

JHV saves data to both ASCII and HDF files and converts an ASCII file to an HDF file. The data structure of the ASCII file is preserved in the HDF file and the content of each data object is stored in the HDF file based on its type. Each data object or subset of a data object can be also saved as an ASCII or HDF file.

Saving data in ASCII files allows for export to other programs. For instance, an HDF Vdata table saved in ASCII format can be opened by Microsoft Excel.

11.2 Converting an ASCII File to an HDF File

To convert an HAIF-compliant ASCII file to a standard HDF file, all you need to do is read the ASCII file and write an HDF file.

Select Open Local File from the File menu and open an ASCII file that complies with the specifications of the HDF ASCII Interchange Format. After the text file has been loaded, select Convert To HDF File from the main window File menu to create an HDF file. The data structure of the ASCII file will be preserved in the HDF file and the content of each data object will be stored in the HDF file based on its original type.

Convert To HDF File is disabled when the current working file is an HDF file.


[Index] [Prev] [Next] [Bottom]


NCSA
The National Center for Supercomputing Applications

University of Illinois at Urbana-Champaign

hdfhelp@ncsa.uiuc.edu