Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Oneof result #7756

Closed
sharonlee12 opened this issue May 10, 2024 · 2 comments
Closed

Oneof result #7756

sharonlee12 opened this issue May 10, 2024 · 2 comments

Comments

@sharonlee12
Copy link

hello,I want to know what the monai Oneof finally choose?
transforms.OneOf(transforms=[ monai.transforms.RandCropByPosNegLabeld(keys=["image", "label"], label_key="label", spatial_size=(args.roi_x, args.roi_y, args.roi_z), pos=2, neg=1, num_samples=args.num_samples, image_key="image", image_threshold=0), monai.transforms.Resized(keys=["image", "label"], spatial_size=(args.roi_x, args.roi_y, args.roi_z)) ], weights=[1, 1] ),
this is my code,how can i know what it chooses?Crop or resize?
Hope someone will help me!

@Pkaps25
Copy link
Contributor

Pkaps25 commented May 11, 2024

OneOf is a TraceableTransform. The object returned by the transformation has an applied_operations property.

@sharonlee12
Copy link
Author

OneOf is a TraceableTransform. The object returned by the transformation has an applied_operations property.

Thank you,besides may I ask if you know the position of RandCropByPosNegLabel cropping can be returned? Or is there a cropping transform that makes it easier to obtain the cropped position?

@Project-MONAI Project-MONAI locked and limited conversation to collaborators May 13, 2024
@KumoLiu KumoLiu converted this issue into discussion #7762 May 13, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants