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 22, 2009 01:57PM
Hello folks,

I am having trouble using 3drefit or to3d to read statistical parameters back into GLT output files. I suspect that the problems occur because I have stripped important fields from the headers of these files, through a number of file-type changes and other processing steps using AFNI and FSL tools. Can you advise me how to make these images interpretable as fitt files again? Below are an overview of the processing steps my files have been through, as well as a summary of what I've tried already.

My input files are GLM buckets, and I am interested in specific GLTs within them. Beginning with those files, I have...

1. ...resampled to 1x1x1 mm voxels.
2. ...converted to .nii format.
3. ...saved out the coefficient and t-stat sub-bricks of interest as separate files using nifti_tool.
4. ...swapped image dimensions and removed orientation information using fslswapdim and fslorient.
5. ...applied a previously-computed spatial transform using FLIRT.
6. ...re-merged coefficient and t-stat files using fslmerge.
7. ...intersected with gray-matter mask using 3dcalc.

I'm sure you'll chastize me for mixing software haphazardly--but this processing stream is not entirely my own decision, and it may not be feasible to redo all of the processing to date using only AFNI tools. From reading the message boards, it seems like the usual ways to replace statistical parameters involve 3drefit or to3d. I have tried both, with the following results:

> 3drefit -substatpar 0 fitt 190 brain0_line_111_dwi_gm.nii
++ 3drefit: AFNI version=AFNI_2008_07_18_1710 (Jan 5 2009) [64-bit]
++ Authored by: RW Cox
++ Processing AFNI dataset brain0_line_111_dwi_gm.nii
++ 3drefit processed 1 datasets

This appears to work, but doesn't actually change the header (except for adding a line to the history indicating that I ran 3drefit). I also tried to3d; as you can see below, the program crashes and prints a suggestion that I contact the message board! At the end of this message, I have also copied in the output of 3dinfo -verb on the file in question. I would appreciate any ideas you have about persuading AFNI that this is, in fact, GLT output.

Thanks,

Jeff


> to3d -fitt -statpar 190 -prefix brain0_line_111_dwi_gm_stats_restored.nii brain0_line_111_dwi_gm.nii
++ to3d: AFNI version=AFNI_2008_07_18_1710 (Jan 5 2009) [64-bit]
++ Authored by: RW Cox
++ Counting images: total=1 2D slices
++ Each 2D slice is 128 X 128 pixels
++ Image data type = float
++ Reading images: .
Fatal Signal 11 (SIGSEGV) received
mri_free
T3D_read_images
to3d:main
Bottom of Debug Stack
** AFNI version = AFNI_2008_07_18_1710 Compile date = Jan 5 2009
** [[Precompiled binary linux_xorg7_64: Jan 5 2009]]
** Program Abort **
** If you report this crash to the AFNI message board,
** please copy the error messages EXACTLY, and give
** the command line you used to run the program, and
** any other information needed to repeat the problem.
** You may later be asked to upload data to help debug.

3dinfo -verb output:

++ 3dinfo: AFNI version=AFNI_2008_07_18_1710 (Jan 5 2009) [64-bit]

Dataset File: brain0_line_111_dwi_gm.nii
Identifier Code: XYZ_VRqoonvPm9gfXanTsMVU9g Creation Date: Wed May 20 13:38:04 2009
Dataset Type: Echo Planar (-epan)
Byte Order: LSB_FIRST {assumed} [this CPU native = LSB_FIRST]
Storage Mode: NIFTI file
Storage Space: 8912896 (8.9 million) bytes
Geometry String: "MATRIX(-2,0,0,0,0,-2,0,0,0,0,2,0):128,128,68"
Data Axes Tilt: Plumb
Data Axes Orientation:
first (x) = Left-to-Right
second (y) = Posterior-to-Anterior
third (z) = Inferior-to-Superior [-orient LPI]
R-to-L extent: -254.000 [R] -to- 0.000 -step- 2.000 mm [128 voxels]
A-to-P extent: -254.000 [A] -to- 0.000 -step- 2.000 mm [128 voxels]
I-to-S extent: 0.000 -to- 134.000 [S] -step- 2.000 mm [ 68 voxels]
Number of time steps = 2 Time step = 1.000s Origin = 0.000s
-- At sub-brick #0 '?' datum type is float: -5.52621 to 30.1141
-- At sub-brick #1 '?' datum type is float: -14.2699 to 27.9411

----- HISTORY -----
[jeffreyp@thinking.lrdc.pitt.edu: Wed May 20 13:38:04 2009] ===================================
[jeffreyp@thinking.lrdc.pitt.edu: Wed May 20 13:38:04 2009] === History of inputs to 3dcalc ===
[jeffreyp@thinking.lrdc.pitt.edu: Wed May 20 13:38:04 2009] === Input a:
[jeffreyp@thinking.lrdc.pitt.edu: Wed May 20 13:38:04 2009] [jeffreyp@thinking.lrdc.pitt.edu: Wed May 20 13:38:04 2009] 3dcopy temp.hdr brain0_line_111_dwi.nii
[jeffreyp@thinking.lrdc.pitt.edu: Wed May 20 13:38:04 2009] === Input b:
[jeffreyp@thinking.lrdc.pitt.edu: Wed May 20 13:38:04 2009] [jeffreyp@thinking.lrdc.pitt.edu: Tue May 19 14:04:03 2009] 3dcopy brain0_asegonB0.hdr brain0_asegonB0.nii
[jeffreyp@thinking.lrdc.pitt.edu: Wed May 20 13:38:04 2009] ===================================
[jeffreyp@thinking.lrdc.pitt.edu: Wed May 20 13:38:04 2009] 3dcalc -a brain0_line_111_dwi.nii -b brain0_asegonB0.nii -expr 'a*equals(b,42)+a*equals(b,3)' -prefix brain0_line_111_dwi_gm.nii
[jeffreyp@thinking.lrdc.pitt.edu: Thu May 21 15:48:57 2009] 3drefit -substatpar 0 fitt 288 brain0_line_111_dwi_gm.nii
[jeffreyp@thinking.lrdc.pitt.edu: Fri May 22 13:53:57 2009] 3drefit -substatpar 0 fitt 190 brain0_line_111_dwi_gm.nii
Subject Author Posted

reinstating stats parameters after extensive out-of-AFNI processing

Jeff Phillips May 22, 2009 01:57PM

Re: reinstating stats parameters after extensive out-of-AFNI processing

ziad May 22, 2009 02:42PM

Re: reinstating stats parameters after extensive out-of-AFNI processing

Jeff Phillips May 22, 2009 02:59PM