Hi,
I just came across the post below while doing an ROI analysis using a probability weighted mask. Is what is described true?
Bottom line question . . . is the mask weighting applied to the mean value in output.txt (and the associated value in the output html file) or only to the timeseries data? Just want to be sure the data I'm getting is what I think it is.
Thank you,
Betsy
-------------
Hi Matthew,
Thanks for your answer. That does account for the way featquery operates on integer data type masks, like probability maps. However, it does not account for the more alarming finding that featquery seems to only execute the -w weighting option on its mean_mask_ts.txt output, but not on the mean value that it outputs in output.txt. This is true for whatever data type the input and mask have (also when both are floats). Conversely, calculating percent signal change using the -p option only operates on the mean value in output.txt, but not on the values output in mean_mask_ts.txt. On inspecting the source code of featquery, this seems to be a programming error (either that, or it is undocumented behaviour).
Cheers,
Johannes
On 2 Dec 2011, Matthew Webster wrote:
Hello Johannes,
This seems to be an issue with how some of our lower-level tools preserve or change data types ( e.g. float or int ) which can result in images becoming truncated/binarised. We've made some changes which should result in more sensible behaviour in the next release/patch.
Many Regards
Matthew
Dr Matthew Webster
FMRIB Centre
John Radcliffe Hospital
University of Oxford
On 1 Dec 2011, at 13:53, Johannes wrote:
> OK, so I've been investigating yet a bit longer. Sorry for my previous ramblings, they were mostly incorrect. Of course it is perfectly valid to divide the mask by its mean value (although the issue of doing this on integer images like probability masks still stands). However, from what I can tell there is a much more serious issue with featquery. I've inspected the source code closely and I cannot escape the conclusion that featquery in fact does NOT weight all of its output using the mask weights when so specified by the -w option. That is, although the mean_mask_ts.txt output IS weighted using the mask weights, the mean value that it outputs in report.txt is NOT weighted. Conversely, when specifying that featquery should calculate percent signal change, the output in report.txt IS transformed into percent signal change, but the output in mean_mask_ts.txt is NOT transformed into percent signal change. So different options given to featquery affect different outputs. Maybe this is intended behavour, but as far as I can tell it is not documented in the manual. As it is now, I would consider it a bug, unless I'm missing some important information.
> Even without digging into the source code of featquery, the odd behaviour can easily be verified: take a non-binary mask, create a binary version of it, and run featquery using both masks. The mean values in output.txt are invariably the same. As far as I can tell, the reason is that featquery runs fslstats with the -k option to extract the stat values from the mask, but fails to actually weight stat values using the mask (i.e. it never multiplies the stats with the mask). It does do this early on in the script, where it calculates the output of mean_mask_ts.txt, but this never finds its way into the average that is output into output.txt. Maybe I'm missing something, but that's the best I can make of it. I would be great if somebody from the FSL community could respond, or tell me if I went wrong somewhere.
>
> Thanks!
>
> Johannes
>
|