NAME

PDL::IO::HDF5::Dataset - PDL::IO::HDF5 Helper Object representing HDF5 datasets.

DESCRIPTION

This is a helper-object used by PDL::IO::HDF5 to interface with HDF5 format's dataset objects. Information on the HDF5 Format can be found at the NCSA's web site at http://hdf.ncsa.uiuc.edu/ .

SYNOPSIS

See PDL::IO::HDF5

MEMBER DATA

ID

ID number given to the dataset by the HDF5 library

name

Name of the dataset.

parent

Ref to parent object (group) that owns this dateset.

fileObj

Ref to the PDL::IO::HDF5 object that owns this object.

METHODS

####---------------------------------------------------------

new

PDL::IO::HDF5::Dataset Constructor - creates new object

Usage:

This object will usually be created using the calling format detailed in the SYNOPSIS. The following syntax is used by the PDL::IO::HDF5 object to build the object.

   $a = new PDL::IO::HDF5:Dataset( name => $name, parent => $parent, 
   				fileObj => $fileObj);
	Args:
	$name				Name of the dataset
	$parent				Parent Object that owns this dataset
	$fileObj                        PDL::HDF object that owns this dateset.

DESTROY

PDL::IO::HDF5::Dataset Destructor - Closes the dataset object

Usage:

No Usage. Automatically called

set

Write data to the HDF5 dataset

Usage:

$dataset->set($pdl);     # Write the array data in the dataset

get

Get data from a HDF5 dataset to a PDL

Usage:

 $pdl = $dataset->get;     # Read the Array from the HDF5 dataset, create a PDL from it
		       	   #  and put in $pdl

The mapping of HDF5 datatypes in the file to PDL datatypes in memory will be according to the following table.

HDF5 File Type				PDL Type
------------------------               -----------------
PDL::IO::HDF5::H5T_C_S1()	=>      PDL::Char Object    (Special Case for Char Strings)
PDL::IO::HDF5::H5T_STD_I8BE()	=> 	$PDL::Types::PDL_B
PDL::IO::HDF5::H5T_STD_I8LE()	=> 	$PDL::Types::PDL_B,
PDL::IO::HDF5::H5T_STD_I16BE()	=> 	$PDL::Types::PDL_S,
PDL::IO::HDF5::H5T_STD_I16LE()	=> 	$PDL::Types::PDL_S,
PDL::IO::HDF5::H5T_STD_I32BE()	=> 	$PDL::Types::PDL_L,
PDL::IO::HDF5::H5T_STD_I32LE()	=> 	$PDL::Types::PDL_L,
PDL::IO::HDF5::H5T_IEEE_F32BE()=>	$PDL::Types::PDL_F,
PDL::IO::HDF5::H5T_IEEE_F32LE()=>	$PDL::Types::PDL_F,
PDL::IO::HDF5::H5T_IEEE_F64BE()=>	$PDL::Types::PDL_D,
PDL::IO::HDF5::H5T_IEEE_F64LE()=>	$PDL::Types::PDL_D

For HDF5 File types not in this table, this method will attempt to map it to the default PDL type PDL_D.

dims

Get the dims for a HDF5 dataset. For example, a 3 x 4 array would return a perl array (3,4);

Usage:

@pdl = $dataset->dims;    # Get an array of dims. 

attrSet

Set the value of an attribute(s)

Currently the only attribute types supported are null-terminated strings.

Usage:

   $dataset->attrSet( 'attr1' => 'attr1Value',
   		    'attr2' => 'attr2 value', 
		    .
		    .
		    .
		   );

Returns undef on failure, 1 on success.

attrDel

Delete attribute(s)

Usage:

 $dataset->attrDel( 'attr1', 
      		    'attr2',
		    .
		    .
		    .
		   );

Returns undef on failure, 1 on success.

attrs

Get a list of all attribute names associated with a dataset

Usage:

@attrs = $dataset->attrs;

attrGet

Get the value of an attribute(s)

Currently the only attribute types supported are null-terminated strings.

Usage:

my @attrs = $dataset->attrGet( 'attr1', 'attr2');

IDget

Returns the HDF5 library ID for this object

Usage:

my $ID = $dataSetObj->IDget;

nameGet

Returns the HDF5 Dataset Name for this object.

Usage:

my $name = $datasetObj->nameGet;