Skip to content

Commit

Permalink
Add DSIQ5 extrapolation option (#214)
Browse files Browse the repository at this point in the history
* Add DSIQ5 extrapolation option.

* Update shm.py
  • Loading branch information
tsalo authored Mar 11, 2025
1 parent 4f7dbde commit cae58e0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions qsirecon/interfaces/dipy.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class DipyReconInputSpec(BaseInterfaceInputSpec):
write_fibgz = traits.Bool(True)
write_mif = traits.Bool(True)
# To extrapolate
extrapolate_scheme = traits.Enum("HCP", "ABCD")
extrapolate_scheme = traits.Enum("HCP", "ABCD", "DSIQ5")


class DipyReconOutputSpec(TraitedSpec):
Expand Down Expand Up @@ -148,7 +148,7 @@ def _write_external_formats(self, runtime, fit_obj, mask_img, suffix):
self._results["fod_sh_mif"] = output_mif_file

def _extrapolate_scheme(self, scheme_name, runtime, fit_obj, mask_img):
if scheme_name not in ("ABCD", "HCP"):
if scheme_name not in ("ABCD", "HCP", "DSIQ5"):
return
output_dwi_file = fname_presuffix(
self.inputs.dwi_file, suffix=scheme_name, newpath=runtime.cwd, use_ext=True
Expand Down Expand Up @@ -344,7 +344,7 @@ class BrainSuiteShoreReconstruction(DipyReconInterface):
output_spec = BrainSuiteShoreReconstructionOutputSpec

def _extrapolate_scheme(self, scheme_name, runtime, fit_obj, mask_array, mask_img):
if scheme_name not in ("ABCD", "HCP"):
if scheme_name not in ("ABCD", "HCP", "DSIQ5"):
return
output_dwi_file = fname_presuffix(
self.inputs.dwi_file, suffix=scheme_name, newpath=runtime.cwd, use_ext=True
Expand Down
2 changes: 1 addition & 1 deletion qsirecon/utils/shm.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
""" Tools for using spherical harmonic models to fit diffusion data
"""Tools for using spherical harmonic models to fit diffusion data
References
----------
Expand Down
2 changes: 1 addition & 1 deletion qsirecon/workflows/recon/dipy.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ def init_dipy_brainsuite_shore_recon_wf(
name="recon_scalars",
run_without_submitting=True,
)
doing_extrapolation = params.get("extrapolate_scheme") in ("HCP", "ABCD")
doing_extrapolation = params.get("extrapolate_scheme") in ("HCP", "ABCD", "DSIQ5")

workflow.connect([
(inputnode, recon_shore, [
Expand Down

0 comments on commit cae58e0

Please sign in to comment.