Hello all.
I just though the following might be of interest to someone out there.
I wanted an easy way to inspect a group of data which was processed
with SPM5 at the first level to see who would be a limiting factor in
group analyses due to individual variability in signal drop out. So I
came up with the following steps using UNIX and FSL commands to do it.
I hope this is helpful to someone,
Jason.
# The following is all done within a unix shell
# To find all mask images within the results folder:
# 1) Enter the study folder
# 2) Execute this command:
find . -print0 | grep -FzZ results_OneBlockDesign/mask.img
# This will look for all 'mask.img' files within folders having the name:
# 'results_OneBlockDesign'
# My result starts looking like:
# ./P01604/S00813/results_OneBlockDesign/mask.img./P01605/S00814/results_OneBlockDesign/mask.img
#
# The output of this can be highlighted and pasted into TWO text files.
# Then the './P' at the begining of each "find"
# needs to be replaced with ' P'. The P is the result of my having all
# Participant folders within my Study folder starting with the letter 'P'
# This will create a long string of paths to the mask images.
# Then use this as entry to fslmerge by adding the
# 'fslmerge -t OUTPUT_NAME' to the front of this line:
fslmerge -t GroupMask P01604/S00813/results_OneBlockDesign/mask.img
(LOTS OF FILES)...
#
# Then find out how many images were found:
fslinfo GroupMask
# Look for the dim4 value.
# Then create a summary image where each voxel contains the number of voxels
# included in the mask.
fslmaths GroupMask -Tmean -mul 49 GroupMaskSum
# Here the number 49 is what I found from fslinfo
# Then load up the 'GroupMask' mask image into fslview and load the
'GroupMaskSum'
# image on top of it.
# I changed the Lookup table for the Summary image to 'Random Rainbow'.
# I also display the 'Time-series' for the 'GroupMask' image.
# Then in the second text file containing the output of the initial
'find' command
# do a find/replace with: "./" to "\n" (no quotes) so that each mask path has
# its own line.
# Then click around the locations that do not have all subjects these
# are the voxels with values LESS THAN 49 in my case.
# From looking at the time-series I can see which subject in the list does not
# have data at a location. Then I can reference my text file list to find out
# who it is.
# Just be careful to note that FSL starts indexing from POINT 0 and the text
# editor probably indexes from POINT 1.
--
Jason Steffener, Ph.D.
Department of Neurology
Columbia University
http://www.cumc.columbia.edu/dept/sergievsky/cnd/steffener.html
|