Skip to content
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

Clarification on Data Format and Slice Dimension in the Project #83

Open
naajeehxe opened this issue Sep 6, 2024 · 1 comment
Open

Comments

@naajeehxe
Copy link

Hi!,

I’m working on a project based on your work and had a quick question about the nii.gz file format. Could you clarify which dimension in your data represents the slice index when training the models?

Specifically, is the slice index in the first dimension (e.g., (250, 512, 512) where 250 is the number of slices), or in the third dimension (e.g., (512, 512, 250) where 250 is the number of slices)?

Thanks for your help! I just want to make sure I’m handling the data correctly.

Best,
Jeehye

@blueyo0
Copy link
Collaborator

blueyo0 commented Sep 13, 2024

Hi!,

I’m working on a project based on your work and had a quick question about the nii.gz file format. Could you clarify which dimension in your data represents the slice index when training the models?

Specifically, is the slice index in the first dimension (e.g., (250, 512, 512) where 250 is the number of slices), or in the third dimension (e.g., (512, 512, 250) where 250 is the number of slices)?

Thanks for your help! I just want to make sure I’m handling the data correctly.

Best, Jeehye

Hi, the answer is the first one, i.e. the slice index in the first dimension (e.g., (250, 512, 512) where 250 is the number of slices), we organized the data in NC DHW format.

Whether the data is organized with the dim order NCHWD or NCDHW depends on how tio.ScalarImage loads them.
you can refer to https://github.com/fepegar/torchio/blob/7c6a5c9d43fc97d8753226699baa66c5ca58d0aa/src/torchio/data/io.py#L33 for details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants