mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-23 06:50:02 +02:00
including stride and block for selecting hyperslab
This commit is contained in:
parent
20f3fb19af
commit
f228fde6f7
@ -213,8 +213,9 @@ void DataProcessor::CreateVirtualFile(
|
||||
if (virtualFile_) {
|
||||
delete virtualFile_;
|
||||
}
|
||||
gotthard25um = ((detectorType_ == GOTTHARD || detectorType_ == GOTTHARD2) &&
|
||||
(numModX * numModY) == 2);
|
||||
bool gotthard25um =
|
||||
((detectorType_ == GOTTHARD || detectorType_ == GOTTHARD2) &&
|
||||
(numModX * numModY) == 2);
|
||||
virtualFile_ = new HDF5VirtualFile(hdf5Lib, gotthard25um);
|
||||
|
||||
uint64_t numImagesProcessed = GetProcessedIndex() + 1;
|
||||
|
@ -103,19 +103,35 @@ void HDF5VirtualFile::CreateVirtualFile(
|
||||
((numImagesCaught - framesSaved) > maxFramesPerFile)
|
||||
? maxFramesPerFile
|
||||
: (numImagesCaught - framesSaved);
|
||||
// starting location
|
||||
hsize_t start[3] = {framesSaved, 0, 0};
|
||||
hsize_t count[3] = {nDimx, nDimy, nDimz};
|
||||
// number of elements separating each block
|
||||
hsize_t stride[3] = {1, 1, 1};
|
||||
// number of blocks
|
||||
hsize_t count[3] = {1, 1, 1};
|
||||
// block size
|
||||
hsize_t block[3] = {nDimx, nDimy, nDimz};
|
||||
|
||||
// starting location
|
||||
hsize_t startPara[2] = {framesSaved, 0};
|
||||
hsize_t countPara[2] = {nDimx, 1};
|
||||
// loop through readouts
|
||||
// number of elements separating each block
|
||||
hsize_t stridePara[3] = {1, 1};
|
||||
// number of blocks
|
||||
hsize_t countPara[2] = {1, 1};
|
||||
// block size
|
||||
hsize_t blockPara[3] = {nDimx, 1};
|
||||
|
||||
// loop through readouts (image)
|
||||
for (unsigned int i = 0; i < numModY * numModZ; ++i) {
|
||||
|
||||
// setect data hyperslabs
|
||||
vdsDataSpace.selectHyperslab(H5S_SELECT_SET, count, start);
|
||||
vdsDataSpace.selectHyperslab(H5S_SELECT_SET, count, start,
|
||||
stride, block);
|
||||
|
||||
// select parameter hyperslabs
|
||||
vdsDataSpacePara.selectHyperslab(H5S_SELECT_SET, countPara,
|
||||
startPara);
|
||||
startPara, stridePara,
|
||||
blockPara);
|
||||
|
||||
// source file name
|
||||
std::ostringstream os;
|
||||
|
Loading…
x
Reference in New Issue
Block a user