Skip to content

Commit

Permalink
enclosed fn within dquotes
Browse files Browse the repository at this point in the history
  • Loading branch information
cgoina committed Nov 23, 2021
1 parent 1ec0fdb commit 1b47aa3
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 36 deletions.
18 changes: 1 addition & 17 deletions colormipsearch-tools/src/main/scripts/pad-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,22 +27,6 @@ NEURON_P2_PARTITIONS=(
90 91 92 93 94 95 96 97 98 99
)

NEURON_P1_PARTITIONS=(
10
)

NEURON_P2_PARTITIONS=(
06
09
10
22
31
57
58
70
93
)

SRCDIR=/nrs/neuronbridge/ppp_imagery/v2.3.0-pre/FlyEM_VNC_v0.6
RESDIR=/nrs/neuronbridge/ppp_imagery/v2.3.0-pre-resized/FlyEM_VNC_v0.6
NCORES=32
Expand Down Expand Up @@ -73,7 +57,7 @@ function runLocal {
createInputParams $p1

for ((jobIndex=${p2From}; jobIndex<=${p2To} && jobIndex<=$((maxJobIndex)); jobIndex++)) ; do
${DIR}/pad-neuron-dirs.sh < ${DIR}/inputs/RESIZE_${p1}_$((jobIndex+1)) > ${DIR}/logs/output_${jobIndex}.out
${DIR}/pad-neuron-dirs.sh < ${DIR}/inputs/RESIZE_${p1}_$((jobIndex+1)) > ${DIR}/logs/output_${p1}_$((jobIndex+1)).out
done
}

Expand Down
4 changes: 2 additions & 2 deletions colormipsearch-tools/src/main/scripts/pad-neuron-dirs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ function process_neuron_dir {

local nfiles=0
for fn in ${neuronDir}/* ; do
echo ${DIR}/pad-single-pppimage.sh ${fn} ${RESDIR}/${neuronPartition}/${neuronName}
${DIR}/pad-single-pppimage.sh ${fn} ${RESDIR}/${neuronPartition}/${neuronName} &
echo ${DIR}/pad-single-pppimage.sh "${fn}" ${RESDIR}/${neuronPartition}/${neuronName}
${DIR}/pad-single-pppimage.sh "${fn}" ${RESDIR}/${neuronPartition}/${neuronName} &
pid=$!
pids=("${pids[@]}" $pid)
npids=${#pids[@]}
Expand Down
32 changes: 15 additions & 17 deletions colormipsearch-tools/src/main/scripts/pad-single-pppimage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,64 +4,62 @@ function process_raw {
fullfn=$1
resdir=$2

fn=`basename ${fullfn}`
fn=`basename "${fullfn}"`
echo "Process raw $fullfn -> $resdir/$fn"

fn=`basename ${fullfn}`
convert $fullfn -background black -splice 0x90 -gravity North ${resdir}/${fn}
convert "$fullfn" -background black -splice 0x90 -gravity North "${resdir}/${fn}"
}

function process_ch {
fullfn=$1
resdir=$2

fn=`basename ${fullfn}`
fn=`basename "${fullfn}"`
echo "Process ch $fullfn -> $resdir/$fn"

convert $fullfn -background black -splice 0x90 -gravity North ${resdir}/${fn}
convert "$fullfn" -background black -splice 0x90 -gravity North "${resdir}/${fn}"
}


function process_skel {
fullfn=$1
resdir=$2

fn=`basename ${fullfn}`
fn=`basename "${fullfn}"`
echo "Process skel $fullfn -> $resdir/$fn"

convert $fullfn -background "rgb(100,100,100)" -splice 0x90 -gravity North ${resdir}/${fn}
convert "$fullfn" -background "rgb(100,100,100)" -splice 0x90 -gravity North "${resdir}/${fn}"
}


function process_ppp_image {
fullfn=$1
resdir=$2

case ${fullfn} in
case "${fullfn}" in
*-ch.png)
process_ch ${fullfn} ${resdir}
process_ch "${fullfn}" ${resdir}
;;
*-ch_skel.png)
process_ch ${fullfn} ${resdir}
process_ch "${fullfn}" ${resdir}
;;
*-masked_raw.png)
process_skel ${fullfn} ${resdir}
process_skel "${fullfn}" ${resdir}
;;
*-skel.png)
process_skel ${fullfn} ${resdir}
process_skel "${fullfn}" ${resdir}
;;
*-raw.png)
process_raw ${fullfn} ${resdir}
process_raw "${fullfn}" ${resdir}
;;
*)
echo "Unsupported file type"
echo "Unsupported file type: ${fullfn}"
exit 1
;;
;;
esac
}

input="$1"
outputdir="$2"

process_ppp_image $input $outputdir

process_ppp_image "$input" $outputdir

0 comments on commit 1b47aa3

Please sign in to comment.