Skip to content

Commit 0080739

Browse files
committed
Import updates.
1 parent a2cfd86 commit 0080739

3 files changed

Lines changed: 9 additions & 9 deletions

File tree

qap/qap_utils.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def read_nifti_image(nifti_infile):
2323
"""
2424

2525
import nibabel as nb
26-
from qap_utils import raise_smart_exception
26+
from qap.qap_utils import raise_smart_exception
2727

2828
try:
2929
nifti_img = nb.load(nifti_infile)
@@ -45,7 +45,7 @@ def write_nifti_image(nifti_img, file_path):
4545
"""
4646

4747
import nibabel as nb
48-
from qap_utils import raise_smart_exception
48+
from qap.qap_utils import raise_smart_exception
4949

5050
try:
5151
nb.save(nifti_img, file_path)
@@ -66,7 +66,7 @@ def read_json(json_filename):
6666

6767
import os
6868
import json
69-
from qap_utils import raise_smart_exception
69+
from qap.qap_utils import raise_smart_exception
7070

7171
if not os.path.exists(json_filename):
7272
err = "\n\n[!] The JSON file provided does not exist.\nFilepath: " \
@@ -135,7 +135,7 @@ def load_image(image_file):
135135

136136
import nibabel as nib
137137
import numpy as np
138-
from qap_utils import raise_smart_exception
138+
from qap.qap_utils import raise_smart_exception
139139

140140
try:
141141
img = nib.load(image_file)
@@ -180,7 +180,7 @@ def load_mask(mask_file, ref_file):
180180
import nibabel as nib
181181
import numpy as np
182182

183-
from qap_utils import raise_smart_exception
183+
from qap.qap_utils import raise_smart_exception
184184

185185
try:
186186
mask_img = nib.load(mask_file)
@@ -229,7 +229,7 @@ def create_anatomical_background_mask(anatomical_data, fg_mask_data,
229229
:return bg_mask_data: Background mask data in Nibabel format.
230230
"""
231231

232-
from qap_utils import raise_smart_exception
232+
from qap.qap_utils import raise_smart_exception
233233

234234
# invert the foreground mask
235235
try:

qap/script_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def csv_to_pandas_df(csv_file):
6363
"""
6464

6565
import pandas as pd
66-
from qap_utils import raise_smart_exception
66+
from qap.qap_utils import raise_smart_exception
6767

6868
try:
6969
data = pd.read_csv(csv_file, dtype={"Participant": str})
@@ -432,7 +432,7 @@ def json_to_csv(json_dict, csv_output_dir=None):
432432

433433
import os
434434
import pandas as pd
435-
from qap_utils import raise_smart_exception
435+
from qap.qap_utils import raise_smart_exception
436436

437437
qap_types = ["anatomical_spatial",
438438
"functional_spatial",

scripts/qap_jsons_to_csv.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ def main():
66
import os
77
import argparse
88
from qap.script_utils import gather_json_info, json_to_csv
9-
from qap.workflow_utils import raise_smart_exception
9+
from qap.qap_utils import raise_smart_exception
1010

1111
parser = argparse.ArgumentParser()
1212
parser.add_argument("output_dir", type=str,

0 commit comments

Comments
 (0)