E.1NCSA HDF Calling Interfaces and Utilities Routine ListsE.1 National Center for Supercomputing Applications November 1989 November 1989 Appendix ERoutine Lists Raster Image Routines DFR8addimaged8aimgappends the RIS8 for the image to the file. DFR8getdimsd8gdimsretrieves the dimensions of the image and indicates whether a palette is associated and stored with the image. DFR8getimaged8gimgretrieves the image and any associated palette, and stores them in arrays. DFR8puTimaged8pimgwrites out the RIS8 for the image as the first image in the file. DFR8restartd8firstsets the next get command to read from the first RIS8 in the file, rather than the next. DFR8setpaletted8spalsets the default palette to be used for subsequent images. DF24addimaged2iaimgappends the RIS24 for the image to the file. DF24getdimsd2igdimsretrieves the dimensions and interlace of the image. DF24getimaged2igimgretrieves the image and stores it in an array. DF24reqild2reqilspecifies an interlace to be used in place of the interlace indicated in the file when the next raster image is read. DF24setild2setilsets the interlace to be used when writing out the RIS24 for the image. Palette Routines DFPaddpaldpapalappends a palette to a file. DFPgetpaldpgpalreads in the next palette in the file. DFPlastrefdplrefreturns the value of the reference number most recently read or written. DFPnpalsdpnpalsindicates number of palettes in a file. DFPputpaldpppalwrites a palette to a file. DFPreadrefdprrefsets the reference number of the next palette to be retrieved. DFPrestartdprestspecifies that the next call to DFPgetpal reads the first palette in the file, rather than the next. DFPwriterefdpwrefsets the reference number of the next palette to be written. Annotation Routines DFANgetdescdagdescgets description of tag/ref. DFANgetdesclendagdlen gets length of description of tag/ref. DFANgetlabeldaglabgets label of tag/ref.. DFANgetlablendagllengets length of label of tag/ref. DFANlablistdallistgets list of labels for a particular tag. DFANlastrefreturns ref of last annotation read or written. DFANputdescdapdescputs description of tag/ref. DFANputlabeldaplabputs label of tag/ref Scientific Data Set Routines DFSDadddatadsadataappends the data to the file, not overwriting other file contents. DFSDcleardsclearclears all possible set values. DFSDendslicedseslcindicates write completion for part of a dataset. DFSDgetdatadsgdatareads the next dataset in the file. DFSDgetdatastrsdsgdastreads the label, unit, and format specification for the data. DFSDgetdimsdsgdimsgets the number of dimensions of the dataset and the sizes of the dimensions for the next SDS in the file. DFSDgetdimscaledsgdiscreads the scale for a dimension. DFSDgetdimstrsdsgdistreads the label, unit, and format for a dimension and its scale. DFSDgetmaxmindsgmaxmreads the maximum and minimum values. DFSDgetslicedsgslcreads part of a dataset. DFSDputdatadspdatawrites the data to the file, overwriting other file contents. DFSDputslicedspslcwrites part of a dataset to a file. DFSDrestartdsfirstsets the next get command to read from the first SDS in the file, rather than the next. DFSDsetdatastrsdissdastsets label, unit, and format specifications for the data. DFSDsetdimsdssdimssets the default rank and dimension sizes for succeeding files. DFSDsetdimscaledssdiscsets the scale for a dimension. DFSDsetdimstrsdssdistsets label, unit, and format specifications for a dimension and its scale. DFSDsetlengthsdsslenssets maximum lengths for strings that will hold labels, units, formats, and the name of the coordinate system. DFSDsetmaxmindssmaxmsets maximum and minimum data values. DFSDsettypedsstypespecifies data attributes-data type and representation, system type, and array order. DFSDstartslicedssslcprepares system to write part of a dataset to a file. General Purpose Routines DFopenprovides an access path to the file named in filename with the access given in access. DFcloseupdates the DD blocks, then closes the access path to the file referred to by dfile. DFsetfinddfsfindinitializes searches for elements using tags or reference numbers. DFfinddffindlocates the data descriptor needed for the next read from the file. DFgetelementdfgetextracts the data referred to by the tag/ref and places the data in the array storage. DFputelementdfput adds or replaces elements in dfile. DFaccessinititiates a read or write on the data element with the specified tag/ref combination. DFreadreads a portion of a data element. DFwriteappends data to a data element. DFseeksets the read pointer to an offset within a data element. DFupdatewrites out the DD blocks necessary to update the file. DFdupgenerates a DD whose offset and length are the same as those of another tag/ref. DFdeldeletes a tag/ref From the list of DDs. DFerrnoreports the value of DFerror. DFishdftells if a file is an HDF file DFnewrefgenerates an unused reference number DFstatprovides status information about an HDF file. Utility Routines hdflsdisplays the tags, ref numbers, and (optionally) lengths of data elements. hdfedlets you browse in an HDF file and manipulate some of the data. fptohdfconverts floating-point data to HDF floating point data and/or 8-bit raster images. r8tohdfconverts one or more raw 8-bit images to HDF RIS8 format and writes them to a file, possibly with palettes. hdftor8converts images and or palettes from HDF format to raw format and stores them in two corresponding sets of files. r24tohdfconverts a raw RGB 24-bit image to an 8-bit RIS8 with a palette. paltohdfconverts a raw palette to hdf format. hdftopalconverts palette in an hdf file to raw format. hdfseq/hdfrseqdisplays sequences of images directly to the screen from HDF files containing raster images.