Skip to content

using Subject metadata in torchio.transforms #698

Answered by fepegar
Jarartur asked this question in Q&A
Discussion options

You must be logged in to vote

Do you need a different desired_shape for each subject? If you do, maybe you can create a custom transform.

def CustomCrop(subject):
    crop_pad = tio.CropOrPad(subject['desired_shape'])
    return crop_pad(subject)

Replies: 1 comment 14 replies

Comment options

You must be logged in to vote
14 replies
@Jarartur
Comment options

@Jarartur
Comment options

@fepegar
Comment options

@Jarartur
Comment options

@Jarartur
Comment options

Answer selected by Jarartur
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants