Commit 2b45237
committed
FIX: Generation of RAS displacements fields from VSMs
After much thought, I have come to the conclusion that the VOX2RAS
affine must be applied in all cases, regardless of whether the dataset
is oblique or not.
After all, the VSM (voxel-shift-map) is no more than a regularly gridded
field of voxel coordinates.
The transformation between voxels and mm is biyective and univocal, and
formalized by the affine matrix of the image.
This PR simplifies the calculation, and theoretically should resolve
most of the issues we are experiencing when resampling data.
Resolves: #218.
Resolves: #236.
Related: nipreps/fmriprep#2210.1 parent 4b464fa commit 2b45237
1 file changed
+18
-26
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
215 | 215 | | |
216 | 216 | | |
217 | 217 | | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
| 218 | + | |
| 219 | + | |
224 | 220 | | |
225 | | - | |
226 | | - | |
227 | | - | |
| 221 | + | |
| 222 | + | |
228 | 223 | | |
229 | | - | |
| 224 | + | |
| 225 | + | |
230 | 226 | | |
231 | | - | |
232 | | - | |
233 | | - | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
234 | 230 | | |
235 | | - | |
| 231 | + | |
236 | 232 | | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
246 | 238 | | |
247 | | - | |
248 | | - | |
249 | | - | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
250 | 242 | | |
251 | 243 | | |
252 | 244 | | |
| |||
0 commit comments