Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix (pipeline): catch error when there are no suitable segmentation types in the imgtools csv #13

Merged
merged 1 commit into from
Mar 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions src/readii/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,13 @@ def main():
raise FileNotFoundError("Output for med-imagetools not found for this image set. Check the data_directory argument or run med-imagetools.")

print("Getting segmentation type...")
# Get segType from imageFileList to generate the image metadata file and set up feature extraction
segType = getSegmentationType(imageFileListPath)
try:
# Get segType from imageFileList to generate the image metadata file and set up feature extraction
segType = getSegmentationType(imageFileListPath)
except RuntimeError as e:
print(str(e))
print("Feature extraction not complete.")


# Check if image metadata file has already been created
imageMetadataPath = os.path.join(outputDir, "ct_to_seg_match_list_" + datasetName + ".csv")
Expand Down
Loading