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

Parameter to reduce the error to a warning #63 #64

Merged
merged 8 commits into from
Jan 8, 2023

Conversation

Zhack47
Copy link
Contributor

@Zhack47 Zhack47 commented Dec 14, 2022

Pull request for issue #63

Comment on lines 84 to 90
f"Loaded RTStruct references image(s) that are not contained in input series data. "
+ f"Problematic image has SOP Instance Id: {contour_image.ReferencedSOPInstanceUID}"
)
else:
raise Exception(
f"Loaded RTStruct references image(s) that are not contained in input series data. "
+ f"Problematic image has SOP Instance Id: {contour_image.ReferencedSOPInstanceUID}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets extract the message in a common variable and reuse within the two cases

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Absolutely! Done here 41aa821

rt_utils/rtstruct_builder.py Outdated Show resolved Hide resolved
@@ -12,9 +12,10 @@ class RTStruct:
Wrapper class to facilitate appending and extracting ROI's within an RTStruct
"""

def __init__(self, series_data, ds: FileDataset, ROIGenerationAlgorithm=0):
def __init__(self, series_data, ds: FileDataset, ROIGenerationAlgorithm=0, warn_only: bool = False):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same thing as other comment, do we need this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above 7798fde

rt_utils/rtstruct_builder.py Outdated Show resolved Hide resolved
@@ -20,18 +20,18 @@ def create_new(dicom_series_path: str) -> RTStruct:

series_data = image_helper.load_sorted_image_series(dicom_series_path)
ds = ds_helper.create_rtstruct_dataset(series_data)
return RTStruct(series_data, ds)
return RTStruct(series_data, ds, warn_only=warn_only)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets remove warn_only here (causing build failures)

Try running pytest in the root directory to see if failures persist

Copy link
Contributor Author

@Zhack47 Zhack47 Jan 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, pytest ran with no error

@asim-shrestha asim-shrestha merged commit bc31474 into qurit:main Jan 8, 2023
asim-shrestha pushed a commit that referenced this pull request Jan 8, 2023
asim-shrestha pushed a commit that referenced this pull request Jan 8, 2023
@asim-shrestha
Copy link
Contributor

Thanks for making all of the changes!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants