Javier Pérez de Frutos
commited on
Commit
·
615e62d
1
Parent(s):
3cf2df0
Change extension condition
Browse files- livermask/livermask.py +9 -9
livermask/livermask.py
CHANGED
@@ -54,15 +54,15 @@ def func(path, output, cpu, verbose, vessels, extension):
|
|
54 |
|
55 |
for curr in tqdm(paths, "CT:"):
|
56 |
# check if current file is a nifti file, if not, skip
|
57 |
-
if
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
|
67 |
|
68 |
def main():
|
|
|
54 |
|
55 |
for curr in tqdm(paths, "CT:"):
|
56 |
# check if current file is a nifti file, if not, skip
|
57 |
+
if curr.endswith(".nii") or curr.endswith(".nii.gz"):
|
58 |
+
# perform liver parenchyma segmentation, launch it in separate process to properly clear memory
|
59 |
+
pred = liver_segmenter_wrapper(curr, output, cpu, verbose, multiple_flag, name, extension)
|
60 |
+
|
61 |
+
if vessels:
|
62 |
+
# perform liver vessel segmentation
|
63 |
+
vessel_segmenter(curr, output, cpu, verbose, multiple_flag, pred, name_vessel, extension)
|
64 |
+
else:
|
65 |
+
pass
|
66 |
|
67 |
|
68 |
def main():
|