Skip to content
Snippets Groups Projects
Commit bae6fd88 authored by Andreas Schenk's avatar Andreas Schenk Committed by BIOPZ-Johner Niklaus
Browse files

added buffer to optimize mrc output

parent 318e0801
No related branches found
No related tags found
No related merge requests found
......@@ -739,15 +739,17 @@ void real_dumper(BinaryOStream<CONVERSIONTYPE>& f, header_base& header, const Co
char this_dummy; //create dummy variable to give to Progress as this
Progress::Instance().Register(&this_dummy,header.ns*header.nr,100);
for(int ss=0;ss<header.ns;++ss) {
std::vector<B> buffer(header.nr*header.nc);
pnt[maps]=header.nsstart+ss;
for(int sr=0;sr<header.nr;++sr) {
pnt[mapr]=header.nrstart+sr;
for(int sc=0;sc<header.nc;++sc) {
pnt[mapc]=header.ncstart+sc;
f << static_cast<B>(norm.Convert(isr->Value(pnt)));
buffer[header.nc*sr+sc]=img::Val2Val<Real,B>(norm.Convert(isr->Value(pnt)));
}
Progress::Instance().AdvanceProgress(&this_dummy);
}
f.write(&buffer[0],header.nr*header.nc);
}
Progress::Instance().DeRegister(&this_dummy);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment