1#! /bin/sh
2#
3# Test application of concatenated transforms.
4
5set -e
6
7# _t1.xfm is linear transform.
8# _t2.xfm is inverse of _t1
9# _t3.xfm is grid transform.
10# _t4.xfm is inverse of _t3
11
12cp $srcdir/t1.xfm _t1.xfm
13../xfminvert -clobber _t1.xfm _t2.xfm
14dd if=/dev/zero | ../rawtominc -vector 3 -byte -clobber _grid.mnc 8 8 8
15./create_grid_xfm _grid.mnc _t3.xfm
16../xfminvert -clobber _t3.xfm _t4.xfm
17
18
19# Test primary transforms.
20#
21./test_xfm 10000 _t1.xfm
22./test_xfm 10000 _t2.xfm
23./test_xfm 10000 _t3.xfm
24./test_xfm 10000 _t4.xfm
25
26
27# Test concatenations.
28#
29../xfmconcat -clobber _t1.xfm _t3.xfm _t5.xfm
30./test_xfm 10000 _t5.xfm
31
32../xfmconcat -clobber _t1.xfm _t4.xfm _t6.xfm
33./test_xfm 10000 _t6.xfm
34
35../xfmconcat -clobber _t5.xfm _t6.xfm _t7.xfm
36./test_xfm 10000 _t7.xfm
37
38../xfminvert -clobber _t7.xfm _t8.xfm
39./test_xfm 10000 _t8.xfm
40
41../xfmconcat -clobber _t8.xfm _t2.xfm _t4.xfm _t7.xfm _t9.xfm
42./test_xfm 10000 _t9.xfm
43