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  

|
December 22, 2009 12:50PM
If you change the assignment of fileList in the foreach loop to:

set fileList = ( $fileList Image.$i )

then fileList will be an array. You can extract the Rescale Slope
from the Dicom header like this:

dicom_hdr $fileList[1] | grep Rescale

---

But get rid of the extra garbage with awk, and use it to set scale:

set scale = `dicom_hdr $fileList[1] | grep Slope | awk -F/ '{print $5}'`

---

Then run to3d and 3dcalc:

3dcalc -a ... -expr "a*$scale" ...

Be sure to use double quotes in the 3dcalc expression, in order
to access the $scale variable.

- rick

Subject Author Posted

Byte-swapping for to3d?

Yisheng Xu December 22, 2009 10:58AM

Re: Byte-swapping for to3d?

rick reynolds December 22, 2009 11:05AM

Re: Byte-swapping for to3d?

Yisheng Xu December 22, 2009 11:09AM

Re: Byte-swapping for to3d?

rick reynolds December 22, 2009 12:05PM

Re: Byte-swapping for to3d?

Yisheng Xu December 22, 2009 12:30PM

Re: Byte-swapping for to3d?

Yisheng Xu December 22, 2009 12:31PM

Re: Byte-swapping for to3d?

rick reynolds December 22, 2009 12:50PM