Skip to content

Commit

Permalink
Merge pull request #1327 from nipreps/fix/1315-revised
Browse files Browse the repository at this point in the history
FIX: Revise bugfix #1324
  • Loading branch information
oesteban authored Aug 19, 2024
2 parents 164be35 + 99b82f1 commit 14120ad
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions mriqc/interfaces/diffusion.py
Original file line number Diff line number Diff line change
Expand Up @@ -662,17 +662,8 @@ def _run_interface(self, runtime):
self.inputs.full_epi, suffix='_nodriftfull', newpath=runtime.cwd
)
full_img = nb.load(self.inputs.full_epi)

# Read slope and intercept (see #1315)
slope, intercept = full_img.header.get_slope_inter()
slope = slope if slope is not None else 1.0
intercept = intercept if intercept is not None else 0.0
corrected = (
full_img.get_fdata() * fitted[np.newaxis, np.newaxis, np.newaxis, :] / slope
- intercept
)
full_img.__class__(
corrected.astype(full_img.header.get_data_dtype()),
full_img.get_fdata() * fitted[np.newaxis, np.newaxis, np.newaxis, :],
full_img.affine,
full_img.header,
).to_filename(self._results['out_full_file'])
Expand Down

0 comments on commit 14120ad

Please sign in to comment.