Changeset 23637 for trunk/ippScripts/scripts/magic_process.pl
- Timestamp:
- Mar 31, 2009, 2:19:43 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/ippScripts/scripts/magic_process.pl (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/magic_process.pl
r23295 r23637 30 30 my $missing_tools; 31 31 my $magictool = can_run('magictool') or (warn "Can't find magictool" and $missing_tools = 1); 32 my $ removestreaks = can_run('RemoveStreaks') or (warn "Can't find RemoveStreaks" and $missing_tools = 1);32 my $detectstreaks = can_run('DetectStreaks') or (warn "Can't find DetectStreaks" and $missing_tools = 1); 33 33 if ($missing_tools) { 34 34 warn("Can't find required tools."); … … 63 63 $ipprc->redirect_output($logfile) or my_die( "Unable to redirect output", $magic_id, $node, $PS_EXIT_SYS_ERROR ) if $logfile; 64 64 65 # RemoveStreaks doesn't know about nebulous. It expects to be able to append strings to outroot65 # DetectStreaks doesn't know about nebulous. It expects to be able to append strings to outroot 66 66 # to form valid file names. 67 # So forbid nebulous path in outroot. We could relax this by change RemoveStreaks to take all68 # of the file names as arguments 67 # So forbid nebulous path in outroot. We could relax this by change DetectStreaks to take all 68 # of the file names as arguments or by teaching it aoubt Nebulous 69 69 if ($outroot =~ 'neb:/') { 70 &my_die(" RemoveStreaks does not support nebulous paths in outroot", $magic_id, $node, $PS_EXIT_CONFIG_ERROR);70 &my_die("DetectStreaks does not support nebulous paths in outroot", $magic_id, $node, $PS_EXIT_CONFIG_ERROR); 71 71 } 72 72 … … 100 100 { 101 101 my $command; # Command to execute 102 $command = "$ removestreaks --outroot $outroot";102 $command = "$detectstreaks --outroot $outroot"; 103 103 $command .= " --verbose" if $verbose; 104 104 105 # added per Paul Sydney's Jan 6, 2009 106 $command .= " -D 3"; 105 # added per Paul Sydney's request Jan 6, 2009 106 # removed per Paul Sydney March 30, 2009 107 # $command .= " -D 3"; 107 108 108 109 … … 118 119 if (scalar @$inputs == 1 and $node ne "root") { 119 120 # 120 # RemoveStreak--detect --image filename --mask maskname --weight weightname --outroot path_base121 # DetectStreaks --detect --image filename --mask maskname --weight weightname --outroot path_base 121 122 # 122 123 # Leaf node: 'detect' stage … … 131 132 } 132 133 my ($image, $mask, $weight) = resolve_inputs($innode); 134 if (!defined($image) or !defined($mask) or !defined($weight)) { 135 &my_die("failed to resolve inputs", $magic_id, $node, $PS_EXIT_DATA_ERROR); 136 } 133 137 134 138 $command .= " --detect --image $image --mask $mask --weight $weight"; 135 139 136 140 # set threshold to 4 sigma 137 $command .= ' -t 4 ';141 $command .= ' -t 4 -S'; 138 142 139 143 # create the list of inputs used at this stage. At higher levels the … … 156 160 } else { 157 161 # 158 # RemoveStreak--merge --inputs input.list --images image0_1.list \162 # DetectStreaks --merge --inputs input.list --images image0_1.list \ 159 163 # --masks mask0_1.list --weight weights0_1.list 160 164 # --outroot outroot … … 202 206 203 207 unless ($no_op) { 204 # RemoveStreaks fails if an output file already exists208 # DetectStreaks fails if an output file already exists 205 209 foreach my $output (@outputs) { 206 210 unlink($output) if -e $output; … … 211 215 unless ($success) { 212 216 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 213 &my_die("Unable to perform RemoveStreaks: $error_code", $magic_id, $node, $error_code);217 &my_die("Unable to perform DetectStreaks: $error_code", $magic_id, $node, $error_code); 214 218 } 215 219
Note:
See TracChangeset
for help on using the changeset viewer.
