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  

|
January 02, 2017 09:43AM
I have never used Sleuth or Brainmap, so I don't know how chopping up your data will affect performance of the tool.

Two ideas that come to mind:
1) if you know where your region is, you could use 3dcalc commands with i,j,k or x,y,z values to divide the brain into quadrants, and then select those. In the following, the "i", "j" and "k" letters are literally those, but you would have to put in some number values for X0 and Y0, which would represent (integer) slice numbers:
3dcalc -a ROI_SET -expr 'a*step(X0 - i)*step(Y0 -j)' -prefix my_ROI_01.nii.gz
3dcalc -a ROI_SET -expr 'a*(1-step(X0-i))*step(Y0 -j)' -prefix my_ROI_02.nii.gz
3dcalc -a ROI_SET -expr 'a*(1-step(X0-i))*(1-step(Y0 -j))' -prefix my_ROI_03.nii.gz
3dcalc -a ROI_SET -expr 'a*step(X0-i)*(1-step(Y0 -j))' -prefix my_ROI_04.nii.gz
... and be sure to check visually3dcalc-ically that all parts are accounted for, i.e., the sum of these gives your original set. This would involve knowing the center of mass of your ROI, probably, for putting X0 and Y0 values that are useful; you could get that with 3dCM.

2) You could make a random data set of four values, and then assign those overlaps to carry your volumes:
# Makes a data set of size ROI_SET whose integer voxel values are uniformly sampled from the inclusive interval [0..3]. 
3dcalc -a ROI_SET -expr 'iran(3)' -prefix RANDOM.nii.gz -overwrite
# now use those to parcellate the dset/region:
3dcalc -a ROI_SET -b RANDOM.nii.gz -expr 'a*equals(b,0)' -prefix my_ROI_01 -overwrite
3dcalc -a ROI_SET -b RANDOM.nii.gz -expr 'a*equals(b,1)' -prefix my_ROI_02 -overwrite
3dcalc -a ROI_SET -b RANDOM.nii.gz -expr 'a*equals(b,2)' -prefix my_ROI_03 -overwrite
3dcalc -a ROI_SET -b RANDOM.nii.gz -expr 'a*equals(b,3)' -prefix my_ROI_04 -overwrite
The benefit of this method is that your regions should be roughly the same sized by random luck (theoretically), regardless of your data set's placement in space. Also, you don't need to know its center of mass. (And again, you should doublecheck that everything went well by summing up your parcels and subtracting the result from the original, making sure that you get zero everywhere.)

Again, how either method could affect your output results, I have absolutely no idea.

--pt



Edited 2 time(s). Last edit at 01/02/2017 10:14AM by ptaylor.
Subject Author Posted

Splitting ROI image

willsnyder January 02, 2017 12:28AM

Re: Splitting ROI image

ptaylor January 02, 2017 09:43AM

Re: Splitting ROI image

willsnyder January 02, 2017 10:30AM

Re: Splitting ROI image

Daniel Glen January 04, 2017 04:12PM