PDL::IO::HDF5::tkview - View HDF5 files using perl/tk and PDL::IO::HDF5 modules
This is a experimental object to view HDF5 files the PDL::IO::HDF5 module. The HDF files are displayed in a tree structure using Tk::Tree
use Tk; use PDL::IO::HDF5::tkview use PDL::IO::HDF5; my $mw = MainWindow->new; my $h5 = new PDL::IO::HDF5('datafile.h5'); # open HDF5 file object my $tkview = new PDL::IO::HDF5::tkview( $mw, $h5); MainLoop;
Tk window where the file structure is displayed.
PDL::IO::HDF5 Object
Tk Hlist object
Sub ref to execute when a dataset is double-clicked. This defaults to a print of the dataset. See dataDisplaySubSet for details.
####---------------------------------------------------------
PDL::IO::HDF5::tkview Constructor - creates new object
Usage:
$tkview = new PDL::IO::HDF5::tkview( $mw, $H5obj); Where: $mw Tk window $H5obj PDL::IO::HDF5::Object
Set the dataDisplaySub data member.
# Data Display sub to call when a dataset is double-clicked my $dataDisplay = sub{ my $data = $_[0]; print "I'm Displaying This $data\n";}; $tkview->dataDisplaySubSet($dataDisplay);
The dataDisplaySub data member is a perl sub ref that is called when a dataset is double-clicked. This data member is initially set to just print the dataset's data to the command line. Using the dataDisplaySubSet method, different actions for displaying the data can be "plugged-in".
Internal Display method invoked whenever a tree element is activated (i.e. double-clicked). This method does nothing unless a dataset element has been selected. It that cases it calls $self->dataDisplaySub with the data.
To install PDL::IO::HDF5::Group, copy and paste the appropriate command in to your terminal.
cpanm
cpanm PDL::IO::HDF5::Group
CPAN shell
perl -MCPAN -e shell install PDL::IO::HDF5::Group
For more information on module installation, please visit the detailed CPAN module installation guide.