File tree 2 files changed +10
-11
lines changed
2 files changed +10
-11
lines changed Original file line number Diff line number Diff line change @@ -54,13 +54,13 @@ mid_sagittal_align = function(
54
54
flipped = flip_lr(img )
55
55
56
56
omat = tempfile(fileext = " .mat" )
57
- tfile = tempfile(fileext = " .nii.gz" )
58
57
flirt(infile = img ,
59
58
reffile = flipped ,
60
- omat = omat , dof = 6 ,
59
+ omat = omat ,
60
+ dof = 6 ,
61
61
opts = opts ,
62
62
retimg = FALSE ,
63
- outfile = tfile ,
63
+ outfile = outfile ,
64
64
verbose = verbose )
65
65
66
66
parsed = fsl_avscale(file = omat , parsed = TRUE )
@@ -84,14 +84,14 @@ mid_sagittal_align = function(
84
84
initmat = new_omat ,
85
85
verbose = verbose ,
86
86
retimg = FALSE ,
87
- outfile = tfile )
87
+ outfile = outfile )
88
88
if (force_rpi ) {
89
89
centered = reverse_rpi_orient_file(
90
- file = tfile ,
90
+ file = outfile ,
91
91
orientation = rp $ orientation ,
92
92
convention = rp $ convention )
93
93
} else {
94
- centered = tfile
94
+ centered = outfile
95
95
}
96
96
if (retimg ) {
97
97
centered = readnii(centered )
@@ -132,22 +132,21 @@ apply_mid_sagittal_align = function(
132
132
133
133
flipped = flip_lr(img )
134
134
135
- tfile = tempfile(fileext = " .nii.gz" )
136
135
flirt_apply(
137
136
infile = img ,
138
137
reffile = flipped ,
139
138
initmat = file_mat ,
140
139
verbose = verbose ,
141
140
opts = apply_opts ,
142
141
retimg = FALSE ,
143
- outfile = tfile )
142
+ outfile = outfile )
144
143
if (force_rpi ) {
145
144
centered = reverse_rpi_orient_file(
146
- file = tfile ,
145
+ file = outfile ,
147
146
orientation = rp $ orientation ,
148
147
convention = rp $ convention )
149
148
} else {
150
- centered = tfile
149
+ centered = outfile
151
150
}
152
151
if (retimg ) {
153
152
centered = readnii(centered )
You can’t perform that action at this time.
0 commit comments