Skip to content

Commit

Permalink
now the voxel width in the output tomogram equals the number passed t…
Browse files Browse the repository at this point in the history
…o the "-w" argument
  • Loading branch information
jewettaij committed Mar 7, 2022
1 parent cd46796 commit 5e7e8a1
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions bin/filter_mrc/filter_mrc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ using namespace std;


string g_program_name("filter_mrc");
string g_version_string("0.29.20");
string g_date_string("2021-11-28");
string g_version_string("0.29.21");
string g_date_string("2022-3-06");



Expand Down Expand Up @@ -407,6 +407,17 @@ int main(int argc, char **argv) {
throw VisfdErr("Error in tomogram header: Invalid voxel width(s).\n"
"Use the -w argument to specify the voxel width.");

// If the user customized the voxel width (using the "-w" argument,
// for example), then include this information in the header portion
// of the output tomogram.
if (voxel_width[0] != tomo_in.header.cellA[0]/image_size[0])
tomo_out.header.cellA[0] = image_size[0] * voxel_width[0];
if (voxel_width[1] != tomo_in.header.cellA[1]/image_size[1])
tomo_out.header.cellA[1] = image_size[1] * voxel_width[1];
if (voxel_width[2] != tomo_in.header.cellA[2]/image_size[2])
tomo_out.header.cellA[2] = image_size[2] * voxel_width[2];




// ---- Select the primary operation we will perform on the image ----
Expand Down

0 comments on commit 5e7e8a1

Please sign in to comment.