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

New features for config classes #701

Merged

Conversation

thibaultdvx
Copy link
Collaborator

Suggestion of a small adjustments for config class:

  • The config class (eg. RescaleIntensityConfig) will automatically get the default values from the associated class (e.g. torchio. RescaleIntensity) when instantiated:
>>> config = RescaleIntensityConfig(out_min_max=0, in_min_max=12)
>>> config
RescaleIntensityConfig(masking_method=None, out_min_max=0.0, percentiles=(0.0, 100.0), in_min_max=12.0, name='RescaleIntensity')
  • One can easily retrieve the associated object with the method get_object:
>>> config.get_object()
RescaleIntensity(out_min_max=0.0, percentiles=(0.0, 100.0), masking_method=None, in_min_max=12.0)

@camillebrianceau tell me what do you think. If it looks interesting to you I will make the changes for all config classes.

@thibaultdvx thibaultdvx changed the title Transforms config classes New features for config classes Feb 19, 2025
@thibaultdvx thibaultdvx marked this pull request as ready for review February 20, 2025 16:00
@thibaultdvx thibaultdvx added the refactoring ClinicaDL refactoring 2024 label Feb 20, 2025
@thibaultdvx thibaultdvx merged commit d6a9eb4 into aramis-lab:clinicadl_v2 Feb 20, 2025
10 checks passed
@thibaultdvx thibaultdvx deleted the transforms_config_classes branch February 20, 2025 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring ClinicaDL refactoring 2024
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant