File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -159,17 +159,19 @@ def _run_interface(self, runtime):
159
159
160
160
for j , corr in enumerate (corr_run ):
161
161
self ._out_file_path .append (os .path .abspath ('corr_%s.nii.gz' %
162
- (split_filename (self .inputs .in_file [j ])[1 ])))
162
+ (split_filename (self .inputs .in_file [j ])[1 ])))
163
163
save_image (corr , self ._out_file_path [j ])
164
164
165
165
self ._par_file_path .append (os .path .abspath ('%s.par' %
166
166
(os .path .split (self .inputs .in_file [j ])[1 ])))
167
167
mfile = open (self ._par_file_path [j ], 'w' )
168
168
motion = R ._transforms [j ]
169
- #output a .par file that looks like fsl.mcflirt's .par file
169
+ # nipy does not encode euler angles. return in original form of
170
+ # translation followed by rotation vector see:
171
+ # http://en.wikipedia.org/wiki/Rodrigues'_rotation_formula
170
172
for i , mo in enumerate (motion ):
171
- params = ['%.10f' % item for item in np .hstack ((mo .rotation ,
172
- mo .translation ))]
173
+ params = ['%.10f' % item for item in np .hstack ((mo .translation ,
174
+ mo .rotation ))]
173
175
string = ' ' .join (params ) + '\n '
174
176
mfile .write (string )
175
177
mfile .close ()
You can’t perform that action at this time.
0 commit comments