xnatqa 0.0.6__py3-none-any.whl → 0.0.8__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- xnatqa/tag/__init__.py +1 -1
- xnatqa/xnatqa.py +29 -0
- {xnatqa-0.0.6.dist-info → xnatqa-0.0.8.dist-info}/METADATA +1 -1
- xnatqa-0.0.8.dist-info/RECORD +10 -0
- xnatqa-0.0.8.dist-info/entry_points.txt +2 -0
- xnatqa-0.0.6.dist-info/RECORD +0 -9
- xnatqa-0.0.6.dist-info/entry_points.txt +0 -2
- {xnatqa-0.0.6.dist-info → xnatqa-0.0.8.dist-info}/WHEEL +0 -0
- {xnatqa-0.0.6.dist-info → xnatqa-0.0.8.dist-info}/licenses/LICENSE +0 -0
- {xnatqa-0.0.6.dist-info → xnatqa-0.0.8.dist-info}/top_level.txt +0 -0
xnatqa/tag/__init__.py
CHANGED
|
@@ -22,7 +22,7 @@ def generate_tagger_config(dicom_dir):
|
|
|
22
22
|
os.system(f"dcm2niix -s y -a y -b o -o $PWD -f 'output_%s_%d' -w 0 -m 1 -i y {dicom_dir} &>>log.txt")
|
|
23
23
|
|
|
24
24
|
# idenfity all of these text files
|
|
25
|
-
jsonFiles = glob('output*.json')
|
|
25
|
+
jsonFiles = glob('./output*.json')
|
|
26
26
|
|
|
27
27
|
# sort the found files so that they are in decensing order by series_number
|
|
28
28
|
# this is probably unnecssary
|
xnatqa/xnatqa.py
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import os
|
|
2
|
+
import argparse
|
|
3
|
+
from xnatqa.tag import tag_scans
|
|
4
|
+
from xnatqa.launch import launch
|
|
5
|
+
|
|
6
|
+
# parse input arguments
|
|
7
|
+
parser = argparse.ArgumentParser(description="Auto Labeler")
|
|
8
|
+
parser.add_argument("--dicom_dir", default="/input", help = "where the DICOMs are located", required=True)
|
|
9
|
+
parser.add_argument("--host", default="https://xnat2.bu.edu", help="BU XNAT host", required=True)
|
|
10
|
+
parser.add_argument("--user", help="BU XNAT2 username", required=True)
|
|
11
|
+
parser.add_argument("--password", help="BU XNAT2 Password", required=True)
|
|
12
|
+
parser.add_argument("--experiment", default = "", required=True)
|
|
13
|
+
|
|
14
|
+
args, unknown_args = parser.parse_known_args()
|
|
15
|
+
dicom_dir = os.path.join(args.dicom_dir, 'SCANS')
|
|
16
|
+
host = args.host
|
|
17
|
+
user = args.user
|
|
18
|
+
password = args.password
|
|
19
|
+
experiment = args.experiment
|
|
20
|
+
|
|
21
|
+
# run xnat authentication for this container. writes an ~/.xnat_auth file to the home directory
|
|
22
|
+
# this file is used in all subsequent calls to XNAT
|
|
23
|
+
os.system(f'xnat_auth --alias xnat --url {host} --username {user} --password {password}')
|
|
24
|
+
|
|
25
|
+
# tag all scans in this session
|
|
26
|
+
tag_scans(dicom_dir, experiment)
|
|
27
|
+
|
|
28
|
+
# launch all QA jobs for this session
|
|
29
|
+
launch(experiment)
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
xnatqa/__init__.py,sha256=RIG_ihjfFD1upKlhlxI-9Fs4ISf0lIW4Zg7CaFirV4A,644
|
|
2
|
+
xnatqa/xnatqa.py,sha256=UoX74fhC5I3Cj4nyc1ORtH8P5sGApySvQ2UmeO2kpHM,1157
|
|
3
|
+
xnatqa/launch/__init__.py,sha256=zT6XGXWBHOtHZ_TVmlN9vp3V8JqUAYscxMBUZJJBlgo,1178
|
|
4
|
+
xnatqa/tag/__init__.py,sha256=kjdB9zSA_YHGOPmG_BDM0HtSK6thmBt0Awd4Zj6NN5A,8921
|
|
5
|
+
xnatqa-0.0.8.dist-info/licenses/LICENSE,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
|
+
xnatqa-0.0.8.dist-info/METADATA,sha256=VrY4Obk0gvF8Ryk6gGQGL_DXv5GlIa71Itx6c0pUxSM,1199
|
|
7
|
+
xnatqa-0.0.8.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
|
8
|
+
xnatqa-0.0.8.dist-info/entry_points.txt,sha256=UqPAByHiJTqwkT0UBymn6EOIGBlPsb9mEZK86HIahs8,46
|
|
9
|
+
xnatqa-0.0.8.dist-info/top_level.txt,sha256=FmRWgO6ww0FwyNs5ccyhP9FcAxI129qSJqLs2OKOxJw,7
|
|
10
|
+
xnatqa-0.0.8.dist-info/RECORD,,
|
xnatqa-0.0.6.dist-info/RECORD
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
xnatqa/__init__.py,sha256=RIG_ihjfFD1upKlhlxI-9Fs4ISf0lIW4Zg7CaFirV4A,644
|
|
2
|
-
xnatqa/launch/__init__.py,sha256=zT6XGXWBHOtHZ_TVmlN9vp3V8JqUAYscxMBUZJJBlgo,1178
|
|
3
|
-
xnatqa/tag/__init__.py,sha256=xo9FVN7uXk4SLo6vvk6952TMYkQxZxCxR1l_Nz6IFtU,8919
|
|
4
|
-
xnatqa-0.0.6.dist-info/licenses/LICENSE,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
|
-
xnatqa-0.0.6.dist-info/METADATA,sha256=fS4mtDUVMOQW2kg7caohnIGbM_YtdxVHUzt0DFvGKlk,1199
|
|
6
|
-
xnatqa-0.0.6.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
|
7
|
-
xnatqa-0.0.6.dist-info/entry_points.txt,sha256=G30HgsnWfJ_xIDqEe6A_ArQaCyautyQCvoBPYM2DlFc,47
|
|
8
|
-
xnatqa-0.0.6.dist-info/top_level.txt,sha256=FmRWgO6ww0FwyNs5ccyhP9FcAxI129qSJqLs2OKOxJw,7
|
|
9
|
-
xnatqa-0.0.6.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|