mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-16 23:07:13 +02:00
fixed last frame with subframes
This commit is contained in:
@ -379,30 +379,32 @@ int main(int argc, char *argv[]) {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
else {
|
else {
|
||||||
if (subframes>0 && insubframe>0) {
|
if (subframes>0 ) {
|
||||||
sprintf(ofname,"%s_sf%ld_%ld.tiff",fname,nnsubframe,fileindex);
|
if (insubframe>0) {
|
||||||
// mt->writeImage(ofname);
|
sprintf(ofname,"%s_sf%ld_%ld.tiff",fname,nnsubframe,fileindex);
|
||||||
doutf= new float[nnx*nny];
|
// mt->writeImage(ofname);
|
||||||
if (subframes>0 && insubframe!=subframes && insubframe>0)
|
doutf= new float[nnx*nny];
|
||||||
subnorm=((double)subframes)/((double)insubframe);
|
if (subframes>0 && insubframe!=subframes && insubframe>0)
|
||||||
else
|
subnorm=((double)subframes)/((double)insubframe);
|
||||||
subnorm=1.;
|
else
|
||||||
for (int ix=0; ix<nnx*nny; ix++) {
|
subnorm=1.;
|
||||||
|
for (int ix=0; ix<nnx*nny; ix++) {
|
||||||
doutf[ix]=detimage[ix]*subnorm;
|
doutf[ix]=detimage[ix]*subnorm;
|
||||||
if (doutf[ix]<0) doutf[ix]=0;
|
if (doutf[ix]<0) doutf[ix]=0;
|
||||||
}
|
}
|
||||||
|
|
||||||
cout << "Writing image to " << ofname << endl;
|
cout << "Writing image to " << ofname << endl;
|
||||||
|
|
||||||
WriteToTiff(doutf,ofname ,nnx, nny);
|
WriteToTiff(doutf,ofname ,nnx, nny);
|
||||||
|
|
||||||
if (doutf)
|
if (doutf)
|
||||||
delete [] doutf;
|
delete [] doutf;
|
||||||
doutf=NULL;
|
doutf=NULL;
|
||||||
|
|
||||||
nsubframes++;
|
nsubframes++;
|
||||||
insubframe=0;
|
insubframe=0;
|
||||||
send_something=1;
|
send_something=1;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
sprintf(ofname,"%s_%ld.tiff",fname,fileindex);
|
sprintf(ofname,"%s_%ld.tiff",fname,fileindex);
|
||||||
mt->writeImage(ofname);
|
mt->writeImage(ofname);
|
||||||
|
Reference in New Issue
Block a user