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