hdf4

package
v0.0.0-...-29bbcf2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 1, 2012 License: BSD-2-Clause Imports: 6 Imported by: 0

Documentation

Overview

Package hdf4 provides access to Hierarchical Data Format (HDF) version 4 files.

The specification can be found here: http://www.hdfgroup.org/ftp/HDF/Documentation/HDF42r3_SpecDG.pdf

Index

Constants

View Source
const (
	DFTAG_AR       = 312  // Aspect ratio
	DFTAG_CAL      = 731  // Calibration information
	DFTAG_CCN      = 310  // Color correction
	DFTAG_CFM      = 311  // Color format
	DFTAG_CI8      = 203  // Compressed image-8
	DFTAG_DIA      = 105  // Data identifier annotation
	DFTAG_DIL      = 104  // Data identifier label
	DFTAG_DRAW     = 400  // Draw
	DFTAG_FD       = 101  // File description
	DFTAG_FID      = 100  // File identifier
	DFTAG_FV       = 732  // Fill value
	DFTAG_GREYJPEG = 14   // 8-bit JPEG compression information
	DFTAG_ID       = 300  // Image dimension
	DFTAG_ID8      = 200  // Image dimension-8
	DFTAG_II8      = 204  // IMCOMP image-8
	DFTAG_IMC      = 12   // IMCOMP compressed data
	DFTAG_IP8      = 201  // Image palette-8
	DFTAG_JPEG     = 13   // 24-bit JPEG compression
	DFTAG_LD       = 307  // LUT dimension
	DFTAG_LUT      = 301  // Lookup table
	DFTAG_MA       = 309  // Matte channel
	DFTAG_MD       = 308  // Matte channel dimension
	DFTAG_MT       = 107  // Machine type
	DFTAG_NDG      = 720  // Numeric data group
	DFTAG_NT       = 106  // Number type
	DFTAG_NULL     = 1    // No data
	DFTAG_RI       = 302  // Raster image
	DFTAG_RI8      = 202  // Raster image-8
	DFTAG_RIG      = 306  // Raster image group
	DFTAG_RLE      = 11   // Run length encoded data
	DFTAG_SD       = 702  // Scientific data
	DFTAG_SDC      = 708  // Scientific data coordinates
	DFTAG_SDD      = 701  // Scientific data dimension
	DFTAG_SDF      = 706  // Scientific data format
	DFTAG_SDG      = 700  // Scientific data group
	DFTAG_SDL      = 704  // Scientific data labels
	DFTAG_SDLNK    = 710  // Scientific data set link
	DFTAG_SDM      = 707  // Scientific data max/min
	DFTAG_SDS      = 703  // Scientific data scales
	DFTAG_SDT      = 709  // Scientific data transpose
	DFTAG_SDU      = 705  // Scientific data units
	DFTAG_T105     = 603  // Tektronix 4105
	DFTAG_T14      = 602  // Tektronix 4014
	DFTAG_TD       = 103  // Tag description
	DFTAG_TID      = 102  // Tag identifier
	DFTAG_VERSION  = 30   // Library version number
	DFTAG_VG       = 1965 // Vgroup
	DFTAG_VH       = 1962 // Vdata description
	DFTAG_VS       = 1963 // Vdata
	DFTAG_XYP      = 500  // X-Y position
)

Record.Tag

View Source
const (
	DFNT_NONE    = 0 //indicates that number type not set
	DFNT_VERSION = 1 // current version of NT info

	DFNT_FLOAT32 = 5
	DFNT_FLOAT64 = 6

	DFNT_INT8   = 20
	DFNT_UINT8  = 21
	DFNT_INT16  = 22
	DFNT_UINT16 = 23
	DFNT_INT32  = 24
	DFNT_UINT32 = 25
	DFNT_INT64  = 26
	DFNT_UINT64 = 27
)

NumType.Type

View Source
const (
	// floating point
	DFNTF_NONE   = 0 // indicates subclass is not set
	DFNTF_IEEE   = 1 // IEEE format
	DFNTF_VAX    = 2 // Vax format
	DFNTF_CRAY   = 3 // Cray format
	DFNTF_PC     = 4 // PC floats - flipped IEEE
	DFNTF_CONVEX = 5 // CONVEX native format

	// integer
	DFNTI_MBO = 1 // Motorola byte order 2's compl
	DFNTI_IBO = 2 // Intel byte order 2's compl
	DFNTI_VBO = 4 // Vax byte order 2's compl

	// character
	DFNTC_ASCII  = 1 // ASCII
	DFNTC_EBCDOC = 2 // EBCDIC
	DFNTC_BYTE   = 0 // bitwise/numeric field
)

NumType.Class

Variables

This section is empty.

Functions

This section is empty.

Types

type File

type File struct {
	Records []Record
	Version *Version
	// contains filtered or unexported fields
}

func Open

func Open(filename string) (*File, error)

func (*File) Close

func (file *File) Close()

func (*File) LookupRecord

func (file *File) LookupRecord(tag, ref int) (*Record, error)

LookupRecord returns the first record matching tag and ref, which uniquely identifies a record. If ref < 0, first record matching tag is returns.

type NDG

type NDG struct {
	Records []*Record
}

Numeric Data Group

type NumType

type NumType struct {
	Type, Class uint8
	// contains filtered or unexported fields
}

type Record

type Record struct {
	Tag, Ref uint16

	Info interface{}
	// contains filtered or unexported fields
}

type SDD

type SDD struct {
	Dim     []uint32
	DataNT  *NumType
	ScaleNT []*NumType
}

Scientific Data Dimension

type VGroup

type VGroup struct {
	Records     []*Record
	Name, Class string
	// contains filtered or unexported fields
}

type VHField

type VHField struct {
	// contains filtered or unexported fields
}

type VHeader

type VHeader struct {
	// contains filtered or unexported fields
}

type Version

type Version struct {
	Major, Minor, Release uint32
	Description           string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL