You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to get an inverse transform after composing a transform with a Mask(masking_method='mymask'), the masking_method is not saved as argument (like it's the case with ZNormalization for example).
Then, when trying to get the inverse transform, I get:
File "/scratch/02/lchauvin/workspace/miniconda3/envs/VntrcNet/lib/python3.9/site-packages/torchio/data/subject.py", line 212, in apply_inverse_transform
inverse_transform = self.get_inverse_transform(**kwargs)
File "/scratch/02/lchauvin/workspace/miniconda3/envs/VntrcNet/lib/python3.9/site-packages/torchio/data/subject.py", line 198, in get_inverse_transform
history_transform = self.get_composed_history(
File "/scratch/02/lchauvin/workspace/miniconda3/envs/VntrcNet/lib/python3.9/site-packages/torchio/data/subject.py", line 176, in get_composed_history
transforms = self.get_applied_transforms(
File "/scratch/02/lchauvin/workspace/miniconda3/envs/VntrcNet/lib/python3.9/site-packages/torchio/data/subject.py", line 160, in get_applied_transforms
transform = name_to_transform[transform_name](**arguments)
TypeError: __init__() missing 1 required positional argument: 'masking_method'
Traceback (most recent call last):
File "/scratch/02/lchauvin/workspace/projects/VntrcNet/predict.py", line 115, in <module>
main(hp, name=args.name)
File "/scratch/02/lchauvin/workspace/projects/VntrcNet/predict.py", line 70, in main
subject_data_inverse = subject_data.apply_inverse_transform()
File "/scratch/02/lchauvin/workspace/miniconda3/envs/VntrcNet/lib/python3.9/site-packages/torchio/data/subject.py", line 207, in apply_inverse_transform
inverse_transform =self.get_inverse_transform(**kwargs)
File "/scratch/02/lchauvin/workspace/miniconda3/envs/VntrcNet/lib/python3.9/site-packages/torchio/data/subject.py", line 193, in get_inverse_transform
history_transform =self.get_composed_history(
File "/scratch/02/lchauvin/workspace/miniconda3/envs/VntrcNet/lib/python3.9/site-packages/torchio/data/subject.py", line 171, in get_composed_history
transforms =self.get_applied_transforms(
File "/scratch/02/lchauvin/workspace/miniconda3/envs/VntrcNet/lib/python3.9/site-packages/torchio/data/subject.py", line 154, in get_applied_transforms
transform = name_to_transform[transform_name](**arguments)
TypeError: __init__() missing 1 required positional argument: 'masking_method'
Expected outcome
The inverted transform
System info
No response
The text was updated successfully, but these errors were encountered:
Is there an existing issue for this?
Problem summary
When trying to get an inverse transform after composing a transform with a Mask(masking_method='mymask'), the masking_method is not saved as argument (like it's the case with ZNormalization for example).
Then, when trying to get the inverse transform, I get:
Code for reproduction
Actual outcome
TypeError: init() missing 1 required positional argument: 'masking_method'
Error messages
Expected outcome
The inverted transform
System info
No response
The text was updated successfully, but these errors were encountered: