AFNI Message Board

Dear AFNI users-

We are very pleased to announce that the new AFNI Message Board framework is up! Please join us at:

https://discuss.afni.nimh.nih.gov

Existing user accounts have been migrated, so returning users can login by requesting a password reset. New users can create accounts, as well, through a standard account creation process. Please note that these setup emails might initially go to spam folders (esp. for NIH users!), so please check those locations in the beginning.

The current Message Board discussion threads have been migrated to the new framework. The current Message Board will remain visible, but read-only, for a little while.

Sincerely, AFNI HQ

History of AFNI updates  

|
September 21, 2020 05:28AM
Hi!

I have a large set of T1-scans from different sites which I have skull-stripped GM-extracted (i.e. I have a set of GM-maps) that are all in native space, no warping has been preformed. That means that some of the brains are pretty far of the matrix-space center.

I am going to run augmentations on these so it is important that they somewhat overlap in space and since I will run rotational augmentations they will also be clipped if they are not in the center of space. I tried this:

1) I wanted the template to have dimensions divisible by 32 for deep learning purposes :
3dZeropad -RL 192 -AP 224 -IS 192 -prefix new_template.nii.gz MNI152_2009_template_SSW.nii.gz

Since the template has the dims 193, 229, 193 the zero-padding doesn't change much and the the template brain is pretty much in the center after this operation which is fine

2) Now I want my data to have the same dimensions so I ran:
3dAllineate -cmass -warp shift_only -base ../new_template.nii.gz -source 28336_1_MR_T1_struc_GM.nii.gz -prefix ../test_out/test.nii.gz

The data now has dims 192,224,192, the brains are centered and it looks good. But the file-size is 3 times larger so i suspect there is some interpolation going on. Is my command as simple as it can be for my purpose or should I add some flags if my goal is to change the resolution and have the brain at the center of volume?

Because I don't want them to be aligned and matched, just to move each subject's T1 so that the center of mass-overlap and give it the same 192,224,192 grid. If that makes sense.

Thanks!



Edited 6 time(s). Last edit at 09/23/2020 09:10AM by Robin.
Subject Author Posted

How to simply move the brain to center of matrix-space

Robin September 21, 2020 05:28AM

Re: How to simply move the brain to center of matrix-space

Colm Connolly September 22, 2020 09:30AM

Re: How to simply move the brain to center of matrix-space Attachments

Robin September 23, 2020 04:23AM

Re: How to simply move the brain to center of matrix-space

Daniel Glen September 24, 2020 11:19AM

Re: How to simply move the brain to center of matrix-space

Robin September 28, 2020 06:44AM

Re: How to simply move the brain to center of matrix-space

Daniel Glen September 28, 2020 11:25AM

Re: How to simply move the brain to center of matrix-space

Robin September 29, 2020 05:26AM