Skip to content

Commit

Permalink
Remove hard coded dataset name, add dataset selection from stage options
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan Pals committed Jan 30, 2020
1 parent 929fc3f commit 800712e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions plugins/hdf/io/Hdf5Handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,15 @@ Hdf5Handler::Hdf5Handler()
{ }

void Hdf5Handler::initialize(
const std::string& filename)
const std::string& filename,
const std::string& datasetName)
{
try
{
m_h5File.reset(new H5::H5File(filename, H5F_ACC_RDONLY));

std::cout << "Number of HD5 Objects: " << m_h5File.get()->getObjCount() <<std::endl;
H5::DataSet dset = m_h5File.get()->openDataSet("/autzen");
H5::DataSet dset = m_h5File.get()->openDataSet(datasetName);
H5::DataSpace dspace = dset.getSpace();
m_numPoints = dspace.getSelectNpoints();
std::cout << "--" << m_numPoints << "--" << std::endl;
Expand Down
3 changes: 2 additions & 1 deletion plugins/hdf/io/Hdf5Handler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ class Hdf5Handler
Hdf5Handler();

void initialize(
const std::string& filename);
const std::string& filename,
const std::string& datasetName);
// const std::vector<hdf5::Hdf5ColumnData>& columns);
void close();

Expand Down
2 changes: 1 addition & 1 deletion plugins/hdf/io/HdfReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ void HdfReader::initialize()
{
throwError("Invalid metadata file: '" + m_metadataFile + "'");
}
m_hdf5Handler.initialize(m_filename);
m_hdf5Handler.initialize(m_filename, m_datasetName);

// Data are WGS84 (4326) with ITRF2000 datum (6656)
// See http://nsidc.org/data/docs/daac/icebridge/ilvis2/index.html for
Expand Down

0 comments on commit 800712e

Please sign in to comment.