X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=cgi-bin%2Fctsim.cgi.in;h=49d94357fc7bac7642dfb38a574dd28baac46ca0;hb=b7519560db07975f7a16cd24d12fe61ba0b4d84c;hp=5571e549b5b60dfbc711e05079d0105ea8b8ce40;hpb=9427b763fb59d2e8b4b2cd3c5f94f621ec86fd3e;p=ctsim.git diff --git a/cgi-bin/ctsim.cgi.in b/cgi-bin/ctsim.cgi.in old mode 100755 new mode 100644 index 5571e54..49d9435 --- 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'}); @@ -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"; @@ -223,17 +224,17 @@ if ($error ne "") { $out .= "\n"; $out .= "\n"; $out .= "\n"; - $out .= "\n"; + $out .= "\n"; $out .= "\n"; $out .= "\n"; $out .= "
Phantom ImageReconstructed Image

$png_gp_out

$png_pjrec_out
Projection SinusoidReconstruction Error
Projection SinogramReconstruction Error

$png_pj_out

$sub_out
$png_sub_out
"; - $out .= "

Execution time: $execution_time seconds\n"; - $out .= "

\nError Measurements
"; + $out .= "

Error Measurements
"; $out .= "$diff_out"; + $out .= "

Execution time: $execution_time seconds\n"; } $out .= "


\n"; -$out .= "Specify another simulation.
"; +$out .= "Specify another simulation.
"; $out .= "Return to CTSim's home.
\n"; $out .= " "; $out .= "\n"; @@ -254,8 +255,6 @@ else if (open(JOBFILES,"> $::jobdir/$tmpid")) { flock(JOBFILES,LOCK_EX); - print JOBFILES "gmt_start=$gmt_start\n"; - print JOBFILES "gmt_end=$gmt_end\n"; print JOBFILES "execution_time=$execution_time\n"; print JOBFILES "Phantom_Name=$Phantom_Name\n"; print JOBFILES "Phantom_Nx=$Phantom_Nx\n"; @@ -303,7 +302,7 @@ sub head sub FilterMetaChars { my $var = pop(@_); - $var =~ /^(\w+)$/; + $var =~ /^([-\w]+)$/; $1; }