Skip to content
This repository was archived by the owner on Dec 27, 2022. It is now read-only.

Commit fbeadf8

Browse files
committed
fix: changed around a few imports
1 parent 5da14e1 commit fbeadf8

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

docker/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ RUN conda install -y -q --name preafq \
9494
python=3.6 \
9595
nipype \
9696
dipy \
97+
boto3 \
9798
&& sync && conda clean -tipsy && sync
9899

99100
RUN sed -i '$isource activate preafq' $ND_ENTRYPOINT

preafq/run_1.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,19 @@
22
from glob import glob
33
from shutil import copyfile
44

5-
import nibabel as nib
65
import nipype.interfaces.freesurfer as fs
76
import nipype.interfaces.fsl as fsl
87
import nipype.interfaces.io as nio
98
import nipype.interfaces.utility as niu
109
import nipype.pipeline.engine as pe
11-
import numpy as np
1210
from nipype.algorithms.rapidart import ArtifactDetect
1311
from nipype.interfaces.dipy import DTI
14-
from nipype.utils.filemanip import fname_presuffix
1512
from nipype.workflows.dmri.fsl.artifacts import all_fsl_pipeline
1613

1714

1815
def get_flirt_motion_parameters(eddy_params):
16+
import numpy as np
17+
import os.path as op
1918
data = np.genfromtxt(eddy_params)
2019
translations = data[:, :3]
2120
rotations = data[:, 3:6]
@@ -108,6 +107,9 @@ def run_preAFQ(dwi_file, dwi_file_AP, dwi_file_PA, bvec_file, bval_file,
108107
vt3 = voltransform.clone("transform_orig")
109108

110109
def binarize_aparc(aparc_aseg):
110+
import nibabel as nib
111+
from nipype.utils.filemanip import fname_presuffix
112+
import os.path as op
111113
img = nib.load(aparc_aseg)
112114
data, aff = img.get_data(), img.affine
113115
outfile = fname_presuffix(

preafq/run_data.1.py renamed to run_data.1.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
from os.path import abspath
22

3-
from . import run_1
3+
from preafq.run_1 import run_preAFQ
44

5-
output = run_1.run_preAFQ(
5+
output = run_preAFQ(
66
abspath("./sub-NDARBA507GCT/dwi/sub-NDARBA507GCT_acq-64dir_dwi.nii.gz"),
77
abspath("./sub-NDARBA507GCT/fmap/"
88
"sub-NDARBA507GCT_dir-AP_acq-dwi_epi.nii.gz"),

0 commit comments

Comments
 (0)