Skip to content

Commit

Permalink
add back chen
Browse files Browse the repository at this point in the history
  • Loading branch information
mattcieslak committed Jan 13, 2025
1 parent 9e05a57 commit 02797a4
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ orbs:

.dockersetup: &dockersetup
docker:
- image: pennlinc/qsirecon_build:24.10.3
- image: pennlinc/qsirecon_build:25.1.0
working_directory: /src/qsirecon

runinstall: &runinstall
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ RUN pip install build
RUN apt-get update && \
apt-get install -y --no-install-recommends git

FROM pennlinc/qsirecon_build:24.10.3
FROM pennlinc/qsirecon_build:25.1.0

# Install qsirecon
COPY . /src/qsirecon
Expand Down
14 changes: 14 additions & 0 deletions qsirecon/interfaces/dsi_studio.py
Original file line number Diff line number Diff line change
Expand Up @@ -775,6 +775,20 @@ def _list_outputs(self):
return outputs


class _ChenAutoTrackInputSpec(_AutoTrackInputSpec):
pass


class _ChenAutoTrackOutputSpec(_AutoTrackOutputSpec):
pass


class ChenAutoTrack(AutoTrack):
input_spec = _ChenAutoTrackInputSpec
output_spec = _ChenAutoTrackOutputSpec
_cmd = "dsi_studio_chen --action=atk"


class _AggregateAutoTrackResultsInputSpec(BaseInterfaceInputSpec):
expected_bundles = InputMultiObject(traits.Str())
trk_files = InputMultiObject(File(exists=True))
Expand Down
13 changes: 11 additions & 2 deletions qsirecon/workflows/recon/dsi_studio.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
DSI_STUDIO_VERSION,
AggregateAutoTrackResults,
AutoTrack,
ChenAutoTrack,
DSIStudioAtlasGraph,
DSIStudioCreateSrc,
DSIStudioExport,
Expand Down Expand Up @@ -306,9 +307,13 @@ def init_dsi_studio_autotrack_registration_wf(
omp_nthreads = config.nipype.omp_nthreads
workflow = Workflow(name=name)

dsi_studio_version = params.pop("dsi_studio_version", "hou")

_AutoTrack = AutoTrack if dsi_studio_version == "hou" else ChenAutoTrack

# Run autotrack on only one bundle. The important part is getting the map.gz
registration_atk = pe.Node(
AutoTrack(num_threads=omp_nthreads, track_id="Association_ArcuateFasciculusL"),
_AutoTrack(num_threads=omp_nthreads, track_id="Association_ArcuateFasciculusL"),
name="registration_atk",
n_procs=omp_nthreads,
)
Expand Down Expand Up @@ -402,9 +407,13 @@ def init_dsi_studio_autotrack_wf(
workflow = Workflow(name=name)
workflow.__desc__ = desc + bundle_desc

dsi_studio_version = params.pop("dsi_studio_version", "hou")

_AutoTrack = AutoTrack if dsi_studio_version == "hou" else ChenAutoTrack

# Run autotrack!
actual_trk = pe.Node(
AutoTrack(num_threads=omp_nthreads, **params), name="actual_trk", n_procs=omp_nthreads
_AutoTrack(num_threads=omp_nthreads, **params), name="actual_trk", n_procs=omp_nthreads
) # An extra thread is needed

# Create a single output
Expand Down

0 comments on commit 02797a4

Please sign in to comment.