|
@@ -116,7 +116,9 @@ run_reconstruction (Params *params)
|
|
guint xl, xr, yt, yb;
|
|
guint xl, xr, yt, yb;
|
|
guint padded_width;
|
|
guint padded_width;
|
|
guint padded_height;
|
|
guint padded_height;
|
|
|
|
+ gdouble theta_rad;
|
|
gdouble angle_step;
|
|
gdouble angle_step;
|
|
|
|
+ guint fwidth;
|
|
gdouble time = 0.0;
|
|
gdouble time = 0.0;
|
|
UfoPluginManager *pm = NULL;
|
|
UfoPluginManager *pm = NULL;
|
|
UfoTaskGraph *graph = NULL;
|
|
UfoTaskGraph *graph = NULL;
|
|
@@ -157,21 +159,27 @@ run_reconstruction (Params *params)
|
|
g_object_set (fft2, "dimensions", 2, NULL);
|
|
g_object_set (fft2, "dimensions", 2, NULL);
|
|
g_object_set (ifft, "dimensions", 2, NULL);
|
|
g_object_set (ifft, "dimensions", 2, NULL);
|
|
|
|
|
|
- padded_width = next_power_of_two ((guint32) params->width);
|
|
|
|
- padded_height = next_power_of_two ((guint32) params->height);
|
|
|
|
|
|
+ fwidth = ((guint) params->px) * 2;
|
|
|
|
+ padded_width = next_power_of_two (fwidth) * 2;
|
|
|
|
+ padded_height = next_power_of_two ((guint32) params->height + 1);
|
|
|
|
+
|
|
|
|
+ xl = params->px - params->width / 2;
|
|
|
|
+ xr = padded_width - params->width - xl;
|
|
|
|
+ yt = params->py - params->height / 2;
|
|
|
|
+ yb = padded_height - params->height - yt;
|
|
|
|
|
|
- xl = (padded_width - params->width) / 2;
|
|
|
|
- xr = xl;
|
|
|
|
- yt = (padded_height - params->height) / 2;
|
|
|
|
- yb = yt;
|
|
|
|
angle_step = (G_PI * 2.0) / params->num_radios;
|
|
angle_step = (G_PI * 2.0) / params->num_radios;
|
|
|
|
+ theta_rad = params->theta / 360. * G_PI * 2;
|
|
|
|
+
|
|
|
|
+ info ("Axis: x=%.1f y=%.1f\n",
|
|
|
|
+ params->px, params->py);
|
|
|
|
+
|
|
|
|
+ info ("Lamino: theta=%.3f tau=%.3f step=%.5f fwidth=%d\n",
|
|
|
|
+ theta_rad, params->tau, angle_step, fwidth);
|
|
|
|
|
|
info ("Padding: size=[%d %d] (xl=%d xr=%d yt=%d yb=%d)\n",
|
|
info ("Padding: size=[%d %d] (xl=%d xr=%d yt=%d yb=%d)\n",
|
|
padded_width, padded_height, xl, xr, yt, yb);
|
|
padded_width, padded_height, xl, xr, yt, yb);
|
|
|
|
|
|
- info ("Parameters: theta=%.3f tau=%.3f step=%.5f\n",
|
|
|
|
- params->theta, params->tau, angle_step);
|
|
|
|
-
|
|
|
|
info ("Volume: origin=[%.1f %.1f %.1f] size=[%d %d %d]\n",
|
|
info ("Volume: origin=[%.1f %.1f %.1f] size=[%d %d %d]\n",
|
|
params->v_origin[0], params->v_origin[1], params->v_origin[2],
|
|
params->v_origin[0], params->v_origin[1], params->v_origin[2],
|
|
params->v_size[0], params->v_size[1], params->v_size[2]);
|
|
params->v_size[0], params->v_size[1], params->v_size[2]);
|
|
@@ -185,19 +193,20 @@ run_reconstruction (Params *params)
|
|
g_object_set (ramp,
|
|
g_object_set (ramp,
|
|
"width", padded_width,
|
|
"width", padded_width,
|
|
"height", padded_height,
|
|
"height", padded_height,
|
|
- "theta", G_PI * 2 / params->theta,
|
|
|
|
|
|
+ "theta", theta_rad,
|
|
"tau", params->tau,
|
|
"tau", params->tau,
|
|
|
|
+ "fwidth", fwidth,
|
|
NULL);
|
|
NULL);
|
|
|
|
|
|
g_object_set (reco,
|
|
g_object_set (reco,
|
|
"angle-step", angle_step,
|
|
"angle-step", angle_step,
|
|
- "theta", G_PI * 2 / params->theta,
|
|
|
|
|
|
+ "theta", theta_rad,
|
|
"psi", params->psi,
|
|
"psi", params->psi,
|
|
- "proj-ox", params->px + xl,
|
|
|
|
|
|
+ "proj-ox", params->px,
|
|
"proj-oy", params->py,
|
|
"proj-oy", params->py,
|
|
- "vol-ox", params->v_origin[0],
|
|
|
|
- "vol-oy", params->v_origin[1],
|
|
|
|
- "vol-oz", params->v_origin[2],
|
|
|
|
|
|
+ "vol-ox", params->v_size[0] / 2 + params->v_origin[0],
|
|
|
|
+ "vol-oy", params->v_size[1] / 2 + params->v_origin[1],
|
|
|
|
+ "vol-oz", params->v_size[2] / 2 + params->v_origin[2],
|
|
"vol-sx", params->v_size[0],
|
|
"vol-sx", params->v_size[0],
|
|
"vol-sy", params->v_size[1],
|
|
"vol-sy", params->v_size[1],
|
|
"vol-sz", params->v_size[2],
|
|
"vol-sz", params->v_size[2],
|
|
@@ -278,8 +287,8 @@ parse_params (Params *params, int argc, char **argv)
|
|
{ "flats", 0, 0, G_OPTION_ARG_STRING, ¶ms->flats, "Flats", "" },
|
|
{ "flats", 0, 0, G_OPTION_ARG_STRING, ¶ms->flats, "Flats", "" },
|
|
{ "output", 0, 0, G_OPTION_ARG_STRING, ¶ms->output, "Output", "" },
|
|
{ "output", 0, 0, G_OPTION_ARG_STRING, ¶ms->output, "Output", "" },
|
|
{ "theta", 0, 0, G_OPTION_ARG_DOUBLE, ¶ms->theta, "Tilt (theta)", "" },
|
|
{ "theta", 0, 0, G_OPTION_ARG_DOUBLE, ¶ms->theta, "Tilt (theta)", "" },
|
|
- { "tau", 0, 0, G_OPTION_ARG_DOUBLE, ¶ms->theta, "Pixel size (theta)", "" },
|
|
|
|
- { "psi", 0, 0, G_OPTION_ARG_DOUBLE, ¶ms->theta, "Misalignment (psi)", "" },
|
|
|
|
|
|
+ { "tau", 0, 0, G_OPTION_ARG_DOUBLE, ¶ms->tau, "Pixel size (theta)", "" },
|
|
|
|
+ { "psi", 0, 0, G_OPTION_ARG_DOUBLE, ¶ms->psi, "Misalignment (psi)", "" },
|
|
{ "px", 0, 0, G_OPTION_ARG_DOUBLE, ¶ms->px, "X coordinate of axis", "" },
|
|
{ "px", 0, 0, G_OPTION_ARG_DOUBLE, ¶ms->px, "X coordinate of axis", "" },
|
|
{ "py", 0, 0, G_OPTION_ARG_DOUBLE, ¶ms->py, "Y coordinate of axis", "" },
|
|
{ "py", 0, 0, G_OPTION_ARG_DOUBLE, ¶ms->py, "Y coordinate of axis", "" },
|
|
{ "vx", 0, 0, G_OPTION_ARG_DOUBLE, ¶ms->v_origin[0], "X coordinate of box origin", "" },
|
|
{ "vx", 0, 0, G_OPTION_ARG_DOUBLE, ¶ms->v_origin[0], "X coordinate of box origin", "" },
|