@@ -68,16 +68,53 @@ def check_nib_ls_example4d(opts=[], hdrs_str="", other_str=""):
68
68
69
69
def check_nib_diff_examples (opts = [], hdrs_str = "" , other_str = "" ):
70
70
# test nib-diff script
71
- fnames = ['spmT_0001.nii.gz' , 'spmT_0001_2.nii.gz' ]
72
- fnames2 = ['spmT_0001.nii.gz' , 'spmT_0001.nii.gz' ]
71
+ fnames = [pjoin (DATA_PATH , f )
72
+ for f in ('example4d.nii.gz' , 'standard.nii.gz' )]
73
+ fnames2 = [pjoin (DATA_PATH , f )
74
+ for f in ('example4d.nii.gz' , 'example4d.nii.gz' )]
73
75
code , stdout , stderr = run_command (['nib-diff' ] + fnames , check_code = False )
74
- assert_equal (stdout , "Field spmT_0001.nii.gz spmT_0001_2.nii.gz "
75
- " " + "\n " + "descrip b'SPM{T_[1066.0]} - contrast 1: AA-GG' b'SPM{T_[1092.0]}"
76
- " - contrast 1: gg-tt' " + "\n " + "DATA: These files are identical!" )
76
+ assert_equal (stdout , "Field /Users/chrischeng/nibabel/nibabel/tests/data/example4d.nii.gz/Users/chrischeng/"
77
+ "nibabel/nibabel/tests/data/standard.nii.gz"
78
+ + "\n " + "regular b'r' b'' "
79
+ " " + "\n " + "dim_info 57 "
80
+ " 0 "
81
+ " "
82
+ " " + "\n "
83
+ "dim [4, 128, 96, 24, 2, 1, 1, 1] [3, 4, 5, 7, 1, 1, 1, 1] "
84
+ + "\n " + "datatype 4 2 "
85
+ " " + "\n " + "bitpix 16 8 "
86
+ " " + "\n " + "pixdim [-1.0, 2.0, 2.0, "
87
+ "2.1999991, 2000.0, 1.0, 1.0,"
88
+ " 1.0][1.0, 1.0, 3.0, 2.0, "
89
+ "1.0, 1.0, 1.0, 1.0] " +
90
+ "\n " + "slice_end 23 0 "
91
+ " " + "\n " + "xyzt_units 10 0 "
92
+ " " + "\n " + "cal_max 1162.0 "
93
+ " 0.0 "
94
+ " " + "\n " +
95
+ "descrip b'FSL3.3\\ x00 v2.25 NIfTI-1 Single file format'b'' "
96
+ " \n " + "qform_code 1 0 "
97
+ " " + "\n " + "sform_code 1 2 "
98
+ " \n " + "quatern_b -1.9451068140294884e-26 "
99
+ " 0.0 "
100
+ " " + "\n " +
101
+ "quatern_c -0.9967085123062134 0.0 "
102
+ + "\n " + "quatern_d -0.0810687392950058 0.0 "
103
+ " " + "\n " + "qoffset_x 117.8551025390625 0.0 "
104
+ " " + "\n " + "qoffset_y -35.72294235229492"
105
+ " 0."
106
+ "0 "
107
+ " " + "\n " +
108
+ "qoffset_z -7.248798370361328 0.0 "
109
+ + "\n " + "srow_x [-2.0, 6.7147157e-19, 9.0810245e-18, 117.8551][1.0, 0.0, 0.0, 0.0] "
110
+ " " + "\n " + "srow_y [-6.7147157e-19, 1.9737115, -0.35552824, -35.722942][0.0, 3"
111
+ ".0, 0.0, 0.0] " + "\n " +
112
+ "srow_z [8.2554809e-18, 0.32320762, 2.1710818, -7.2487984][0.0, 0.0, 2.0, 0.0] "
113
+ " " + "\n " + "DATA: These files are different." )
77
114
78
115
code , stdout , stderr = run_command (['nib-diff' ] + fnames2 , check_code = False )
79
- assert_equal (stdout , "Field spmT_0001 .nii.gz spmT_0001 .nii.gz "
80
- " " + "\n " + "DATA: These files are identical!" )
116
+ assert_equal (stdout , "Field /Users/chrischeng/nibabel/nibabel/tests/data/example4d .nii.gz/Users/chrischeng/nibabel/nibabel/tests/data/example4d .nii.gz"
117
+ + "\n " + "DATA: These files are identical!" )
81
118
82
119
83
120
0 commit comments