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  

|
April 10, 2023 03:04PM
Hey,

I have EPI data with three echos. When I load these files into AFNI and open a new controller for each of the three echos, I can clearly reduction in the brightness of the data for each of the three echos. This is clearly shown in this image In this image echo 1 is the first row, echo 2, the second and echo 3 the final row.

I'm making images of each slice (for each orientation : axial, coronal, and sagittal) for each echo. To do this, I'm using AFNI to load the EPI file and open the three image windows. Then in a loop over the number of TRs, I use plugout_drive to set the underlay to the next TR and save three JPEGs, one for each orientation. Subsequent to this, I use ImageMagick to annotate each image with the echo from which it was created.

When all images for the three orientations for the three echos are created and annotated, I use ffmpeg to make a movie, where each frame in the movie consists of the three images, one for each echo, stacked horizontally. The goal of this movie making is to easily see gross movement by the subject.

While I can get all this to work, including making images with AFNI, annotating them and creating the movie, what I cannot replicate is the reduction in brightness over the three echoes shown in the image above. All my images from each echo look very similar in terms of brightness. I think this is because I can't replicate how AFNI maps data values for each slice to the colorbar of the underlay, but am unsure.

The full script is at movie making BASH script

Can any one provide any advice on how I might replicate this reduction in brightness programmatically using AFNI and plugout_drive?

Thanks in advance,

Colm.
Subject Author Posted

replicating AFNI GUI's brightness reduction for each of three echos using plugout_drive

Colm Connolly April 10, 2023 03:04PM

Re: replicating AFNI GUI's brightness reduction for each of three echos using plugout_drive

ptaylor April 10, 2023 03:27PM