Skip to content

Commit

Permalink
be consistent
Browse files Browse the repository at this point in the history
Signed-off-by: neuronflow <[email protected]>
  • Loading branch information
neuronflow committed Dec 15, 2023
1 parent 65f063b commit fc92336
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions ereg/functional.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def registration_function(
target_image: Union[str, sitk.Image],
moving_image: Union[str, sitk.Image],
output_image: str,
config_file: str,
configuration: str,
transform_file: str = None,
log_file: str = None,
**kwargs,
Expand All @@ -28,14 +28,14 @@ def registration_function(
Returns:
float: The structural similarity index.
"""
if isinstance(config_file, str):
assert os.path.isfile(config_file), "Config file does not exist."
elif isinstance(config_file, dict):
if isinstance(configuration, str):
assert os.path.isfile(configuration), "Config file does not exist."
elif isinstance(configuration, dict):
pass
else:
raise ValueError("Config file must be a string or dictionary.")

registration_obj = RegistrationClass(config_file)
registration_obj = RegistrationClass(configuration)
registration_obj.register(
target_image=target_image,
moving_image=moving_image,
Expand Down

0 comments on commit fc92336

Please sign in to comment.