Commit bbfbdcce authored by David Rohr's avatar David Rohr
Browse files

adept new reading scheme for MRC files to work with dynamic map memory...

adept new reading scheme for MRC files to work with dynamic map memory allocation introduced in parallel git branch
parent 4cd7499b
......@@ -288,7 +288,6 @@ int bioem_RefMap::read_MRC(const char* filename,bioem_param& param)
n_range_viol0 = test_mrc(filename,0);
n_range_viol1 = test_mrc(filename,1);
if (n_range_viol0 < n_range_viol1) { //* guess endianism
swap = 0;
if (n_range_viol0 > 0) {
......@@ -367,12 +366,20 @@ int bioem_RefMap::read_MRC(const char* filename,bioem_param& param)
exit(1);
}
if (ntotRefMap == 0)
{
maps = (myfloat_t*) mallocchk(refMapSize * sizeof(myfloat_t) * ns);
}
else
{
maps = (myfloat_t*) reallocchk(maps, refMapSize * sizeof(myfloat_t) * (ntotRefMap + ns));
}
if(mode!=2)
{
cout << "ERROR with MRC mode " << mode << "\n";
cout << "Currently mode 2 is the only one allowed" << "\n";
exit(1);
}
else
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment