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  

|
May 11, 2017 07:44PM
Hello AFNI,

I encountered some strange behavior involving sub-brick selection and the program 3dExtrema. The data file I am analyzing has 7 sub-bricks. The conventional way to select said sub-bricks via AFNI commands is by using file_name.nii'[n]', where n would range from 0-6 (since that is where AFNI begins counting at 0). However, here are some examples from 3dExtrema that have me scratching my head:

3dExtrema -volume -sep_dist 20 AMYG-LME-001-cluster.nii

++ 3dExtrema: AFNI version=AFNI_16.0.10 (Feb 25 2016) [64-bit]
++ Authored by: B. Douglas Ward
Reading input dataset: AMYG-LME-001-cluster.nii
Reading input dataset: AMYG-LME-001-cluster.nii
Reading volume #0
Reading volume #1
Reading volume #2
Reading volume #3
Reading volume #4
Reading volume #5
Reading volume #6
Number of volumes = 7

Maxima for Volume #0 (Coordinates Order = RAI):
Index Intensity RL[mm] AP[mm] IS[mm] Count Dist[mm]
----- --------- ------ ------ ------ ----- --------
1 1.650 15.00 3.00 -17.00 5 21.541
2 1.102 3.00 11.00 -1.00 3 21.541
3 0.875 39.00 15.00 -29.00 2 29.394
4 0.770 15.00 -13.00 -1.00 1 22.627

Maxima for Volume #1 (Coordinates Order = RAI):

Maxima for Volume #2 (Coordinates Order = RAI):

Maxima for Volume #3 (Coordinates Order = RAI):
Index Intensity RL[mm] AP[mm] IS[mm] Count Dist[mm]
----- --------- ------ ------ ------ ----- --------
1 252.880 3.00 7.00 43.00 4 48.826
2 247.490 -41.00 23.00 23.00 2 21.541
3 228.340 -29.00 15.00 7.00 3 21.541

Maxima for Volume #4 (Coordinates Order = RAI):
Index Intensity RL[mm] AP[mm] IS[mm] Count Dist[mm]
----- --------- ------ ------ ------ ----- --------
1 0.025 43.00 35.00 55.00 4

Maxima for Volume #5 (Coordinates Order = RAI):

Maxima for Volume #6 (Coordinates Order = RAI):
Index Intensity RL[mm] AP[mm] IS[mm] Count Dist[mm]
----- --------- ------ ------ ------ ----- --------
1 0.576 23.00 -1.00 -13.00 2 25.923
2 0.418 -17.00 3.00 -9.00 5 22.978
3 0.295 19.00 -17.00 -33.00 3 25.923
4 0.278 7.00 -25.00 -1.00 3 31.241
5 0.224 -25.00 -25.00 -29.00 2 25.612
6 0.204 -1.00 -41.00 27.00 2 33.226
7 0.185 -49.00 -1.00 -13.00 1 20.000
8 0.171 -33.00 79.00 23.00 5 26.833
9 0.168 -1.00 11.00 11.00 2 21.909
10 0.168 -33.00 67.00 47.00 1 26.833
11 0.145 23.00 87.00 15.00 3 20.785
12 0.141 19.00 83.00 35.00 3 20.785
13 0.138 19.00 27.00 -1.00 1 28.284
14 0.134 3.00 3.00 31.00 2 21.909
15 0.123 -9.00 91.00 11.00 2 29.394
16 0.120 -21.00 -13.00 55.00 3 24.331
17 0.114 -1.00 47.00 35.00 2 39.598
18 0.111 -37.00 51.00 11.00 3 30.725
19 0.109 3.00 -17.00 55.00 2 24.331
20 0.100 -33.00 -1.00 -25.00 1 20.000
21 0.088 -25.00 71.00 -17.00 1 36.442
22 0.062 -25.00 -25.00 7.00 1 32.985
23 -0.098 51.00 -5.00 11.00 1 37.094


Everything looks good when I run the command and do not specify a sub-brick. However, when I specifically target 0 and 1, I get the same exact output, which is obviously incorrect and not consistent with the above, or the data as I know it:

awdpt800wg3:UNC_AAL_GROWTH salzwedelap$ 3dExtrema -volume -sep_dist 20 AMYG-LME-001-cluster.nii'[0]'
++ 3dExtrema: AFNI version=AFNI_16.0.10 (Feb 25 2016) [64-bit]
++ Authored by: B. Douglas Ward
Reading input dataset: AMYG-LME-001-cluster.nii[0]
Reading input dataset: AMYG-LME-001-cluster.nii[0]
Reading volume #0
Number of volumes = 1

Maxima for Volume #0 (Coordinates Order = RAI):
Index Intensity RL[mm] AP[mm] IS[mm] Count Dist[mm]
----- --------- ------ ------ ------ ----- --------
1 1.650 15.00 3.00 -17.00 5 21.541
2 1.102 3.00 11.00 -1.00 3 21.541
3 0.875 39.00 15.00 -29.00 2 29.394
4 0.770 15.00 -13.00 -1.00 1 22.627
awdpt800wg3:UNC_AAL_GROWTH salzwedelap$ 3dExtrema -volume -sep_dist 20 AMYG-LME-001-cluster.nii'[1]'
++ 3dExtrema: AFNI version=AFNI_16.0.10 (Feb 25 2016) [64-bit]
++ Authored by: B. Douglas Ward
Reading input dataset: AMYG-LME-001-cluster.nii[1]
Reading input dataset: AMYG-LME-001-cluster.nii[1]
Reading volume #0
Number of volumes = 1

Maxima for Volume #0 (Coordinates Order = RAI):
Index Intensity RL[mm] AP[mm] IS[mm] Count Dist[mm]
----- --------- ------ ------ ------ ----- --------
1 1.650 15.00 3.00 -17.00 5 21.541
2 1.102 3.00 11.00 -1.00 3 21.541
3 0.875 39.00 15.00 -29.00 2 29.394
4 0.770 15.00 -13.00 -1.00 1 22.627

To make matters more confusing I have to use sub-brick selection = 7 to get the final volume...

awdpt800wg3:UNC_AAL_GROWTH salzwedelap$ 3dExtrema -volume -sep_dist 20 AMYG-LME-001-cluster.nii'[7]'
++ 3dExtrema: AFNI version=AFNI_16.0.10 (Feb 25 2016) [64-bit]
++ Authored by: B. Douglas Ward
Reading input dataset: AMYG-LME-001-cluster.nii[7]
Reading input dataset: AMYG-LME-001-cluster.nii[7]
Reading volume #0
Number of volumes = 1

Maxima for Volume #0 (Coordinates Order = RAI):
Index Intensity RL[mm] AP[mm] IS[mm] Count Dist[mm]
----- --------- ------ ------ ------ ----- --------
1 0.576 23.00 -1.00 -13.00 2 25.923
2 0.418 -17.00 3.00 -9.00 5 22.978
3 0.295 19.00 -17.00 -33.00 3 25.923
4 0.278 7.00 -25.00 -1.00 3 31.241
5 0.224 -25.00 -25.00 -29.00 2 25.612
6 0.204 -1.00 -41.00 27.00 2 33.226
7 0.185 -49.00 -1.00 -13.00 1 20.000
8 0.171 -33.00 79.00 23.00 5 26.833
9 0.168 -1.00 11.00 11.00 2 21.909
10 0.168 -33.00 67.00 47.00 1 26.833
11 0.145 23.00 87.00 15.00 3 20.785
12 0.141 19.00 83.00 35.00 3 20.785
13 0.138 19.00 27.00 -1.00 1 28.284
14 0.134 3.00 3.00 31.00 2 21.909
15 0.123 -9.00 91.00 11.00 2 29.394
16 0.120 -21.00 -13.00 55.00 3 24.331
17 0.114 -1.00 47.00 35.00 2 39.598
18 0.111 -37.00 51.00 11.00 3 30.725
19 0.109 3.00 -17.00 55.00 2 24.331
20 0.100 -33.00 -1.00 -25.00 1 20.000
21 0.088 -25.00 71.00 -17.00 1 36.442
22 0.062 -25.00 -25.00 7.00 1 32.985
23 -0.098 51.00 -5.00 11.00 1 37.094


AFNI-wan-kenobi you are my only hope, please help.

-Andy
Subject Author Posted

3dExtrema Strange Behavior

Andrew Salzwedel May 11, 2017 07:44PM

Re: 3dExtrema Strange Behavior

rick reynolds May 12, 2017 08:55AM

Re: 3dExtrema Strange Behavior

Andrew Salzwedel May 12, 2017 11:50AM