-
Notifications
You must be signed in to change notification settings - Fork 6
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
dcm2mha preprocessing #5
Conversation
@@ -36,6 +37,8 @@ def __init__( | |||
input_path: PathLike, | |||
output_path: PathLike, | |||
settings_path: PathLike, | |||
verify_dicom_filenames: bool = True, | |||
scan_postprocess_func: Optional[Callable[[sitk.Image], sitk.Image]] = None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Request to minimize the number of complicated non-obvious parameters of the constructor, and instead plop these in a **kwargs. so kwargs.get('verify_dicom_filenames', True)
instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Furthermore, if put in a self.kwargs
for example, these can be consumed at an arbitrary point during processing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, but better to make a settings class for it. That way, the available settings are clear and can be checked upon initialisation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's tackle this in the Item refactoring?
|
||
self.info(f"Collected {plural(total, 'DICOM file')} from {self.valid_items_str()}.", self.get_history_report()) | ||
|
||
@staticmethod |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why? Only one usage.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Stacked functions make it difficult to follow what's going on, so it there is no benefit, better to keep it simple.
Implemented: