[ismrmrd] 213/281: fix a bug for multiple runs with the same group name
Ghislain Vaillant
ghisvail-guest at moszumanska.debian.org
Wed Jan 14 20:01:16 UTC 2015
This is an automated email from the git hooks/post-receive script.
ghisvail-guest pushed a commit to annotated tag ismrmrd0.5
in repository ismrmrd.
commit 33d9f2daabd2091d5137dbd5d4abdee180915e94
Author: Hui Xue <hui.xue at nih.gov>
Date: Mon Mar 17 19:08:18 2014 -0400
fix a bug for multiple runs with the same group name
---
ismrmrd_hdf5.cpp | 19 +++++++++++++------
1 file changed, 13 insertions(+), 6 deletions(-)
diff --git a/ismrmrd_hdf5.cpp b/ismrmrd_hdf5.cpp
index 37654f7..e5b41bc 100644
--- a/ismrmrd_hdf5.cpp
+++ b/ismrmrd_hdf5.cpp
@@ -632,7 +632,18 @@ int IsmrmrdDataset::appendImageAttrib(std::string& a, const char* varname)
return -1;
}
- DataSpace mspace1 = dataset->getSpace();
+ std::vector<hsize_t> dims(1,1);
+ std::vector<hsize_t> max_dims(1,1);
+ DataSpace mspace2( dims.size(), &dims[0] );
+
+ DataSpace mspace1( dims.size(), &dims[0], &max_dims[0]);
+ mspace1 = dataset->getSpace();
+
+ std::vector<hsize_t> offset(dims.size());
+ mspace1.selectHyperslab(H5S_SELECT_SET, &dims[0], &offset[0]);
+ dataset->write( a, *datatype, mspace2, mspace1 );
+
+ /*DataSpace mspace1 = dataset->getSpace();
int rank = mspace1.getSimpleExtentNdims();
std::vector<hsize_t> ddims(rank,0);
mspace1.getSimpleExtentDims(&ddims[0], NULL);
@@ -646,16 +657,12 @@ int IsmrmrdDataset::appendImageAttrib(std::string& a, const char* varname)
std::vector<hsize_t> offset(rank, 0);
offset[0] = ddims[0];
- ddims[0]++;
-
- dataset->extend(&ddims[0]);
-
DataSpace fspace2 = dataset->getSpace();
fspace2.selectHyperslab( H5S_SELECT_SET, &dims[0], &offset[0] );
DataSpace mspace2( rank, &dims[0] );
- dataset->write( a, *datatype, mspace2, fspace2 );
+ dataset->write( a, *datatype, mspace2, fspace2 );*/
}
catch( FileIException& not_found_error)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/ismrmrd.git
More information about the debian-science-commits
mailing list