diff --git a/src/H5ChunkedWriter.cpp b/src/H5ChunkedWriter.cpp index 8e317e6..7f3d293 100644 --- a/src/H5ChunkedWriter.cpp +++ b/src/H5ChunkedWriter.cpp @@ -4,6 +4,7 @@ #include #include "H5ChunkedWriter.hpp" +#include "h5_file_format.hpp" extern "C" { @@ -102,15 +103,8 @@ void HDF5ChunkedWriter::close_file() cout << "[HDF5ChunkedWriter::close_file] Setting dataset attribute image_nr_low=" << image_nr_low << " and image_nr_high=" << image_nr_high << endl; #endif - // H5::IntType int_type(H5::PredType::NATIVE_UINT32); - // H5::DataSpace att_space(H5S_SCALAR); - // auto low_index_attribute = dataset.createAttribute("image_nr_low", int_type, att_space); - - // H5::IntType int_type(H5::PredType::NATIVE_UINT32); - // H5::DataSpace att_space(H5S_SCALAR); - // auto high_index_attribute = dataset.createAttribute("image_nr_high", int_type, att_space); - - // TODO: Populate additional h5 attributes. + h5_utils::write_attribute(dataset, "image_nr_low", image_nr_low); + h5_utils::write_attribute(dataset, "image_nr_high", image_nr_high); // Cleanup. file.close(); @@ -234,3 +228,6 @@ hsize_t HDF5ChunkedWriter::prepare_storage_for_frame(size_t frame_index, size_t* return relative_frame_index; } + +void HDF5ChunkedWriter::write_format(h5_base& format_root, std::map& values) { +} \ No newline at end of file diff --git a/src/H5ChunkedWriter.hpp b/src/H5ChunkedWriter.hpp index c8c4a5a..bb7f029 100644 --- a/src/H5ChunkedWriter.hpp +++ b/src/H5ChunkedWriter.hpp @@ -1,12 +1,17 @@ #ifndef H5CHUNKEDWRITER_H #define H5CHUNKEDWRITER_H +#include #include "config.hpp" +#include "h5_file_format.hpp" +#include hsize_t expand_dataset(const H5::DataSet& dataset, hsize_t frame_index, hsize_t dataset_increase_step); void compact_dataset(const H5::DataSet& dataset, hsize_t max_frame_index); +typedef boost::any h5_value; + class HDF5ChunkedWriter { // Initialized in constructor. @@ -34,6 +39,7 @@ class HDF5ChunkedWriter ~HDF5ChunkedWriter(); void close_file(); void write_data(size_t frame_index, size_t* frame_shape, size_t data_bytes_size, char* data); + void write_format(h5_base& format_root, std::map& values); }; #endif \ No newline at end of file