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 https://i.imgur.com/nSN0ffb.png 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,