WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit d6a94bf

Browse files
committed
removed raise for cc analysis
1 parent 5cfdf46 commit d6a94bf

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

DLICV/utils.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,9 @@ def analyze_connected_components_for_icv(binary_mask):
8686
f"Roundness={comp['roundness']:.3f}")
8787

8888
if len(components_info) == 0:
89-
raise("Failed to identify the true ICV mask based on connected component analysis.")
89+
# raise("Failed to identify the true ICV mask based on connected component analysis.")
90+
print("No connected component detected")
91+
return None, None
9092
elif len(components_info) == 1:
9193
return sitk.Equal(cc_image,components_info[0]['label']), components_info[0]['label']
9294

@@ -119,6 +121,7 @@ def analyze_connected_components_for_icv(binary_mask):
119121
except:
120122
#raise("Failed to identify the true ICV mask based on connected component analysis.")
121123
# print("CC analysis failed. Keeping the original mask")
124+
print("CC analysis failed. Keeping the original mask")
122125
return None, None
123126

124127

0 commit comments

Comments
 (0)