Skip to content
Discussion options

You must be logged in to vote

Hi, @sarthakpati.

I was curious which attributes other than shape does torchio.Subject check for?

You can take a look at the code for Subject:

https://github.com/fepegar/torchio/blob/8b8791af3e9cd7e6bc45cc3bde3c124a3354c87b/torchio/data/subject.py#L218-L229

Specifically, does it check for the spacing attribute?

It can:

https://github.com/fepegar/torchio/blob/8b8791af3e9cd7e6bc45cc3bde3c124a3354c87b/torchio/data/subject.py#L121-L135

For example, if shapes of 2 modalities in a subject are same but spacing is different, will that trigger an exception?

If that's what you're checking for, yes.

In [1]: import torch

In [2]: import torchio as tio

In [3]: import numpy as np

In [4]: x = torch

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@sarthakpati
Comment options

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