I am trying to produce a map of voxels ranked by percentile of local intensity using 3dLocalstat. While the distribution of ‘hot spots’ in the output stats map look correct, the output voxel values are not in terms of percentile (e.g. voxel corresponding to 50th percentile is not 0.5). Am I forgetting to set an additional modifying flag? Any help is appreciated!
This particular use of 3dLocalstat may not be what you expect. The stat parameter here essentially computes a voxel value based on the bin step. Consider this example:
The stat format for the percentile uses “perc:start:stop:step” as its parameters all expressed in percent (not decimal fractions). This command computes the values at the 1%, 26%, 51% and 76%ile in a 5mm radius local neighborhood around each voxel. The output has 4 subbrick volumes. Switch among these with the Overlay panel control.
The median would be computed with either of these commands, and either would have only a single output subbrick volume (the start and stop are equal):
Daniel,
Thanks so much for clarifying the function’s behavior. I think I have a workaround based on your advice. Appreciate your help!
Best,
Jennifer
The
National Institute of Mental Health (NIMH) is part of the National Institutes of
Health (NIH), a component of the U.S. Department of Health and Human
Services.