Skip to content

Should there be a permute transformation? #624

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

You must be logged in to vote

I would say the concept of permutation is typically replaced by reorientation in medical imaging. Have you taken a look at ToCanonical?

In [1]: import torchio as tio

In [2]: t1 = tio.datasets.FPG().t1

In [3]: t1.shape, t1.orientation
Out[3]: ((1, 256, 256, 176), ('P', 'I', 'R'))

Thankfully, we can think anatomically to describe better-defined axes names than depth, height, etc. It is typical to normalize all images to have the same orientation during training, normally RAS (I guess sometimes LPS). Instead of figuring out permutations, flipping, etc., you can use ToCanonical to transform all images to RAS, so all dimensions mean the same across the dataset.

In [4]: to_ras = tio.ToCanonical

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@fepegar
Comment options

@fepegar
Comment options

@fepegar
Comment options

@mattwarkentin
Comment options

@fepegar
Comment options

Answer selected by mattwarkentin
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