File: mincresample-test.sh

package info (click to toggle)
minc-tools 2.3.00%2Bdfsg-16
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 8,720 kB
  • sloc: ansic: 65,674; perl: 7,423; yacc: 1,177; sh: 633; lex: 319; makefile: 224
file content (30 lines) | stat: -rwxr-xr-x 777 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#! /bin/bash

let errors=0;

if [[ ! -x $MINCSTATS_BIN ]]; then
    MINCSTATS_BIN=`which mincstats`;
fi

if [[ ! -x $MINCRESAMPLE_BIN ]]; then
    MINCRESAMPLE_BIN=`which mincresample`;
fi

# Test the standard (no-normalize) case. This has always worked.
$MINCRESAMPLE_BIN -clobber test-rnd.mnc mincresample-out.mnc
r1=`$MINCSTATS_BIN -quiet -sum mincresample-out.mnc`
if [[ $r1 != "250" ]]; then
  echo "Problem with default operation:" $r1
  exit 1;
fi;
# Now test the keep_real_range case. This failed until fixed in Feb 2015.
$MINCRESAMPLE_BIN -keep_real_range -clobber test-rnd.mnc mincresample-out.mnc
r2=`$MINCSTATS_BIN -quiet -sum mincresample-out.mnc`
if [[ $r2 != "250" ]]; then
  echo "Problem with -keep_real_range operation:" $r2
  exit 1;
fi;
echo "OK."
exit 0