Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] Change to Linear for upsampling #820

Merged
merged 2 commits into from
Sep 16, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 13 additions & 5 deletions docs/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,14 @@ One way to process these data would be to call ``qsiprep`` like this::

qsiprep \
/path/to/inputs /path/to/outputs participant \
--output-resolution 1.2 \
--output-resolution X \
--fs-license-file /path/to/license.txt

.. warning::
The above example sets the ``--output-resolution`` to ``X``, where in
real usage this number should be set to a value in millimeters.
See :ref:`output_resolution` for specifics.


Grouping scans
==============
Expand Down Expand Up @@ -53,15 +58,14 @@ Specifying outputs
==================

.. note::
This section covers ``--output-resolution 1.2``, and
This section covers ``--output-resolution X``, and
``--skip-t1-based-spatial-normalization``.

Unlike with fMRI, which can be coregistered to a T1w image and warped to a
template using the T1w image's spatial normalization, the T1w images do not
contain enough contrast to accurately align white matter structures to a
template. For this reason, spatial normalization is typically done *after*
models are fit. Therefore we omit the ``--output-spaces`` argument from
preprocessing: i.e. **no template warping takes place by default**.
models are fit.

All outputs will be registered to the T1w image (or the
AC-PC aligned b=0 template if ``--dwi-only`` was specified) but will have
Expand All @@ -79,6 +83,10 @@ brain graphs. If you want to save ~20 minutes of computation time, this
normalization can be disabled with the
``--skip-t1-based-spatial-normalization`` option.

.. _output_resolution:
Output Resolution and Resampling
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

The ``--output-resolution`` argument determines the spatial resolution of the
preprocessed dwi series. You can specify the resolution of the original data
or choose to upsample the dwi to a higher spatial resolution. Some
Expand All @@ -87,7 +95,7 @@ your output to at least 1.3mm resolution. By choosing this resolution here,
it means your data will only be interpolated once: head motion correction,
susceptibility distortion correction, coregistration and upsampling will be
done in a single step. If your are upsampling your data by more than 10%,
mattcieslak marked this conversation as resolved.
Show resolved Hide resolved
QSIPrep will use BSpline interpolation instead of Lanczos windowed sinc
QSIPrep will use Linear interpolation instead of Lanczos windowed Sinc
interpolation.


Expand Down
4 changes: 2 additions & 2 deletions qsiprep/interfaces/images.py
Original file line number Diff line number Diff line change
Expand Up @@ -501,8 +501,8 @@ def _run_interface(self, runtime):
resolution_cutoff = 0.9 * np.array(nb.load(input_file).header.get_zooms()[:3])
print(output_resolution, resolution_cutoff)
if np.any(output_resolution < resolution_cutoff):
interpolator = "BSpline"
LOGGER.warning("Using BSpline interpolation for upsampling")
interpolator = "Linear"
LOGGER.warning("Using Linear interpolation for upsampling")
break
self._results["interpolation_method"] = interpolator
return runtime
Expand Down