diff --git a/src/H5Writer.cpp b/src/H5Writer.cpp index 6dd41ba..759215a 100644 --- a/src/H5Writer.cpp +++ b/src/H5Writer.cpp @@ -83,30 +83,37 @@ void H5Writer::close_file() void H5Writer::write_data(const string& dataset_name, const size_t data_index, const char* data, const std::vector& data_shape, const size_t data_bytes_size, const string& data_type, const string& endianness) { - // Define the ofset of the currently received image in the file. - hsize_t relative_data_index = prepare_storage_for_data(dataset_name, data_index, data_shape, data_type, endianness); + try { - // Define the offset where to write the data. - size_t data_rank = data_shape.size(); - hsize_t offset[data_rank+1]; - - offset[0] = relative_data_index; - for (uint index=0; index