X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=cgi-bin%2Fctsim.cgi.in;h=49d94357fc7bac7642dfb38a574dd28baac46ca0;hb=22e4f8e81e414b77d209e4aa8972b4e3c870456a;hp=e978881e0ae0d3b3b16e3f49f888b17ffe4f57da;hpb=4d4ceac098a9ca4b78064d1368d0c8538417710a;p=ctsim.git
diff --git a/cgi-bin/ctsim.cgi.in b/cgi-bin/ctsim.cgi.in
index e978881..49d9435 100755
--- a/cgi-bin/ctsim.cgi.in
+++ b/cgi-bin/ctsim.cgi.in
@@ -46,7 +46,7 @@ my $Phantom_NSample = FilterToNumber($in{'Phantom_NSample'});
$error .= "Phantom name must not be blank
" if ($Phantom_Name eq "");
$error .= "Phantom Size must be between 5 and 512
" if ($Phantom_Nx < 5 || $Phantom_Nx > 512 || $Phantom_Ny < 5 || $Phantom_Ny > 512);
$error .= "Phantom NSample must be between 1 and 5
" if ($Phantom_NSample < 1 || $Phantom_NSample > 5);
-$error .= "View Ratio must be between 1 and 100
" if ($Phantom_ViewRatio < 1 || $Phantom_ViewRatio > 100);
+$error .= "View Ratio must be between 0 and 100
" if ($Phantom_ViewRatio <= 0 || $Phantom_ViewRatio > 100);
my $PJ_Geometry = FilterMetaChars($in{'PJ_Geometry'});
my $PJ_NDet = FilterToNumber($in{'PJ_NDet'});
@@ -139,10 +139,10 @@ if ($Disp_Max ne 'auto') {
$window_options .= " --max $Disp_Max";
}
-my $png1_cmd = "$::bindir/ifexport $phantom_fname $phantom_png $window_options --stats --format png";
-my $png2_cmd = "$::bindir/ifexport $ir_fname $ir_png $window_options --stats --format png";
-my $png3_cmd = "$::bindir/ifexport $pj_if_fname $pj_png --auto $auto_window_pj --stats --format png";
-my $png4_cmd = "$::bindir/ifexport $sub_fname $sub_png --auto $auto_window_diff --stats --format png";
+my $png1_cmd = "$::bindir/ifexport $phantom_fname $phantom_png $window_options --stats --format png --center mode";
+my $png2_cmd = "$::bindir/ifexport $ir_fname $ir_png $window_options --stats --format png --center mode";
+my $png3_cmd = "$::bindir/ifexport $pj_if_fname $pj_png --auto $auto_window_pj --stats --format png --center mode";
+my $png4_cmd = "$::bindir/ifexport $sub_fname $sub_png --auto $auto_window_diff --stats --format png --center mode";
my $title = "CTSim Results";
@@ -201,6 +201,7 @@ if ($error ne "") {
if (open(LOGFILE,">> $logfile")) {
flock(LOGFILE,LOCK_EX);
seek(LOGFILE, 0, 2);
+ print LOGFILE "Client Address: $ENV{'REMOTE_ADDR'}\n";
print LOGFILE "Job $tmpid\n";
print LOGFILE $cmdout;
print LOGFILE "----------------------------------------------------\n";
@@ -220,20 +221,20 @@ if ($error ne "") {
$png_pjrec_out_html =~ s/\n/
/gms;
$png_pj_out_html =~ s/\n/
/gms;
$png_sub_out_html =~ s/\n/
/gms;
- $out .= "
Phantom Image | Reconstructed Image |
Phantom Image | Reconstructed Image |
$png_gp_out | \n";
$out .= "$png_pjrec_out |
Projection Sinusoid | Reconstruction Error |
Projection Sinogram | Reconstruction Error |
$png_pj_out | \n";
$out .= "$sub_out $png_sub_out |
\nError Measurements
";
+ $out .= "
Error Measurements
";
$out .= "$diff_out";
+ $out .= "
Execution time: $execution_time seconds\n"; } $out .= "