mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-11 04:17:15 +02:00
Make a library for writing and reading tiff, added tests (#347)
* removed Makefile for moench and integrated the build in CMake * broke out tiff reading and writing to its own library * moved tiff includes to include/sls * moved tiffio source to src * removed incorrectly used bps * cleanup and tests for tiffio * removed using namespace std from header * some fixing for moench04 * Program for offline processing renamed Co-authored-by: Anna Bergamaschi <anna.bergamaschi@psi.ch>
This commit is contained in:
@ -107,8 +107,8 @@ class moench03T1ReceiverDataNew : public slsDetectorData<uint16_t> {
|
||||
#endif
|
||||
if (dataMap[row][col] < 0 ||
|
||||
dataMap[row][col] >= nSamples * 2 * 32)
|
||||
cout << "Error: pointer " << dataMap[row][col]
|
||||
<< " out of range " << endl;
|
||||
std::cout << "Error: pointer " << dataMap[row][col]
|
||||
<< " out of range " << std::endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -120,7 +120,7 @@ class moench03T1ReceiverDataNew : public slsDetectorData<uint16_t> {
|
||||
ghost[iy][ix] = 0.;
|
||||
|
||||
int ipacket;
|
||||
int ibyte;
|
||||
uint ibyte;
|
||||
int ii = 0;
|
||||
for (ibyte = 0; ibyte < sizeof(sls_detector_header) / 2; ibyte++) {
|
||||
xmap[ibyte] = -1;
|
||||
@ -298,17 +298,17 @@ class moench03T1ReceiverDataNew : public slsDetectorData<uint16_t> {
|
||||
/* return NULL; */
|
||||
/* }; */
|
||||
|
||||
virtual char *readNextFrame(ifstream &filebin) {
|
||||
virtual char *readNextFrame(std::ifstream &filebin) {
|
||||
int ff = -1, np = -1;
|
||||
return readNextFrame(filebin, ff, np);
|
||||
};
|
||||
|
||||
virtual char *readNextFrame(ifstream &filebin, int &ff) {
|
||||
virtual char *readNextFrame(std::ifstream &filebin, int &ff) {
|
||||
int np = -1;
|
||||
return readNextFrame(filebin, ff, np);
|
||||
};
|
||||
|
||||
virtual char *readNextFrame(ifstream &filebin, int &ff, int &np) {
|
||||
virtual char *readNextFrame(std::ifstream &filebin, int &ff, int &np) {
|
||||
char *data = new char[dataSize];
|
||||
char *d = readNextFrame(filebin, ff, np, data);
|
||||
if (d == NULL) {
|
||||
@ -318,17 +318,13 @@ class moench03T1ReceiverDataNew : public slsDetectorData<uint16_t> {
|
||||
return data;
|
||||
}
|
||||
|
||||
virtual char *readNextFrame(ifstream &filebin, int &ff, int &np,
|
||||
virtual char *readNextFrame(std::ifstream &filebin, int &ff, int &np,
|
||||
char *data) {
|
||||
char *retval = 0;
|
||||
int nd;
|
||||
int fnum = -1;
|
||||
|
||||
np = 0;
|
||||
int pn;
|
||||
|
||||
// cout << dataSize << endl;
|
||||
if (ff >= 0)
|
||||
fnum = ff;
|
||||
|
||||
|
||||
if (filebin.is_open()) {
|
||||
if (filebin.read(data, dataSize)) {
|
||||
|
Reference in New Issue
Block a user