JiscMail Logo
Email discussion lists for the UK Education and Research communities

Help for FSL Archives


FSL Archives

FSL Archives


FSL@JISCMAIL.AC.UK


View:

Message:

[

First

|

Previous

|

Next

|

Last

]

By Topic:

[

First

|

Previous

|

Next

|

Last

]

By Author:

[

First

|

Previous

|

Next

|

Last

]

Font:

Proportional Font

LISTSERV Archives

LISTSERV Archives

FSL Home

FSL Home

FSL  June 2010

FSL June 2010

Options

Subscribe or Unsubscribe

Subscribe or Unsubscribe

Log In

Log In

Get Password

Get Password

Subject:

Re: bug in featquery's treatment of zeros?

From:

Michael Harms <[log in to unmask]>

Reply-To:

FSL - FMRIB's Software Library <[log in to unmask]>

Date:

Thu, 17 Jun 2010 10:35:07 -0500

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (256 lines)

Hi Steve,

Yes, if you parse the text of the featquery web page very carefully, the
phrase "non-zero" is only directly mentioned in regards to the count,
but will a typical user assume that it is "implied" to apply to the
other measures as well?  To us, it certainly was implied, simply because
why report the number of non-zero voxels within the mask, but then
report the mean based on all voxels (including zeros)?  That dichotomy
just doesn't make sense to me, and is certainly not what I would have
expected beforehand.  

Now that we've clarified that this isn't considered a "bug", I still
suggest that you state explicitly that the mean/median/percentile calcs
include zeros, and thus the count value is NOT necessarily the number of
voxels that went into computing the mean/median/percentile outputs.  

Perhaps an option to exclude zero values would be a useful addition to
featquery?

In our particular case, the masks were situated in MNI152 standard space
and one was a sphere that got centered (based on a priori activation
coordinates) at the edge of the brain.  Thus for that mask (ROI), a fair
number of the stat values were 0, due to the brain mask applied during
FEAT.  But more generally, a mask may be defined on the MNI152 standard
template that appears to fully cover brain on the template, yet due to
movement, or just limited slice coverage, that mask might have many
zeros in the actual statistic image of interest.

cheers,
-MH
 

On Thu, 2010-06-17 at 15:50 +0100, Stephen Smith wrote:
> Hi Michael,
> 
> 
> Yes - the script is correct and in keeping with the manual:   The
> manual says "For each of these in turn, Featquery will calculate
> various quantities within the selected mask, for example, the number
> of non-zero voxels within the mask, the mean and max values of the
> stats image within the mask, and the co-ordinates of the max image
> value within the mask."
> 
> 
> And so the number of non-zero voxels in the mask is correctly counted
> (this is using the -V option in the call to fslstats that you quoted
> before), whilst the rest of the quantities are estimated for ALL
> voxels in the mask. The phrase "non-zero" is only applying to that
> first quantity - the non-zero count.   It is not *in general* the
> intended behaviour in FSL that zero voxels will get ignored (except in
> mask images, etc) - that would not be safe or robust.
> 
> 
> Maybe it might be worth expanding on the scenario that gave rise to
> the problem at your end?   In my experience people don't end up
> zeroing images in this context that would leave zeros in the data but
> still inside the mask?
> 
> 
> Cheers.
> 
> 
> 
> 
> 
> 
> 
> On 17 Jun 2010, at 14:58, Michael Harms wrote:
> 
> > Hi Steve,
> > If you search the featquery web page
> > (http://www.fmrib.ox.ac.uk/fsl/feat5/featquery.html) for "zero" you
> > find
> > the following statements:
> > 
> > ---
> > Featquery will calculate various quantities within the selected
> > mask,
> > for example, the number of non-zero voxels within the mask, the mean
> > and
> > max values of the stats image within the mask, and the co-ordinates
> > of
> > the max image value within the mask.
> > 
> > Featquery saves the mask, once transformed into the native space of
> > the
> > selected FEAT directory, inside the Featquery output directory,
> > called
> > "mask" (even if this only contains a single non-zero voxel, in the
> > case
> > of selecting a co-ordinate).
> > 
> > If you turn on Do not binarise mask (allow weighting) then if your
> > mask
> > is non-binary, its non-zero values will weight all Featquery output
> > values rather than treating the mask as binary.
> > 
> > The first column in the main table shows the "stats image", i.e.
> > lists
> > the different FEAT stats images that you asked Featquery to report
> > on;
> > each of these is also a link to a raw text file giving the data
> > timeseries plot at the position of the maximum image value within
> > the
> > mask. The next column tells you the number of non-zero voxels within
> > the
> > mask.
> > ---
> > 
> > So, the web page clearly indicates (1st and 4th statements above)
> > that
> > the number of voxels output measure is the number of non-zero voxels
> > (consistent with the -V flag in the featquery script).  And on
> > careful
> > reading, the 2nd and 3rd statements above deal with the mask itself,
> > rather than the values underlying the mask in the statistic of
> > interest.
> > But overall, the frequent mention of "non-zero" gives the
> > impression/expectation that ALL featquery output would be based on
> > the
> > non-zero values in the STATISTIC image, especially since that is the
> > way
> > the number of voxels output is itself treated.  Indeed, that was
> > exactly
> > the expectation that someone here had, but I upon seeing 0 as the
> > output
> > for the median and 10% values, I realized that it couldn't be the
> > case
> > that zero values in the statistic image under the mask were being
> > excluded.
> > 
> > Since exact 0's are almost always doing to reflect an absence of
> > data at
> > that voxel, why is the default behavior to include those 0's as part
> > of
> > the mean/median/percentile statistics?
> > 
> > That said, if those stat values are going to include the 0's, then I
> > would suggest that you make this explicitly clear on both the web
> > page,
> > and within the text of featquery's html report.  Based on our
> > experience, I'm rather confident in speculating that we are
> > certainly
> > not the only ones that assumed that the mean/median/percentile
> > statistics excluded 0's under the mask from the calculation.  In our
> > particular case, in which we had some masks that ended up including
> > a
> > fair number of zero values in the statistic images of interest, the
> > featquery statistics are meaningless.
> > 
> > Best,
> > -MH
> > 
> > 
> > On Thu, 2010-06-17 at 07:59 +0100, Stephen Smith wrote:
> > > Hi - which part of the manual are you thinking of?   I think the
> > > script is correct - the intention is to estimate the statistics
> > > across
> > > all voxels inside the mask, unless you turn on the thresholding
> > > option?
> > > 
> > > 
> > > Cheers.
> > > 
> > > 
> > > 
> > > On 15 Jun 2010, at 03:57, Michael Harms wrote:
> > > 
> > > > Hello,
> > > > Re-posting this since the original post coincided with HDBM.
> > > > 
> > > > Best,
> > > > -MH
> > > > 
> > > > ---------------------------- Original Message
> > > > ----------------------------
> > > > Subject: [FSL] bug in featquery's treatment of zeros?
> > > > From:    "Michael Harms" <[log in to unmask]>
> > > > Date:    Thu, June 10, 2010 4:58 pm
> > > > To:      [log in to unmask]
> > > > --------------------------------------------------------------------------
> > > > 
> > > > Hello FSL developers,
> > > > Is Featquery supposed to include only non-zero voxels for all
> > > > calculated
> > > > statistics included in its output (i.e., report.txt)?  That at
> > > > least
> > > > seems to be the implied behavior according to the Featquery web
> > > > page.
> > > > 
> > > > However, if that is the intent, it doesn't appear to be
> > > > happening.
> > > > For brevity I'll just cut to what I think is the relevant line
> > > > in
> > > > the
> > > > featquery script:
> > > > 
> > > > catch { exec sh -c "${FSLDIR}/bin/fslstats ${fqroot}/tmp -k
> > > > ${fqroot}/tmpmask -m -R -V -p 10 -p 50 -p 90 -x -s" } thevals
> > > > 
> > > > Shouldn't the flags be "-M -R -V -P 10 -P 50 -P 90 -x -S" if the
> > > > intent
> > > > is to include only non-zero voxels in the calculations?
> > > > 
> > > > thanks,
> > > > -Mike H.
> > > > 
> > > > 
> > > > -- 
> > > > Michael Harms, Ph.D.
> > > > --------------------------------------------------------------------
> > > > Conte Center for the Neuroscience of Mental Disorders
> > > > Washington University School of Medicine
> > > > Department of Psychiatry, Box 8134
> > > > Renard Hospital, Room 6604           Tel: 314-747-6173
> > > > 660 South Euclid Ave.                Fax: 314-747-2182
> > > > St. Louis, MO 63110                  Email: [log in to unmask]
> > > > --------------------------------------------------------------------
> > > > 
> > > > 
> > > 
> > > 
> > > ---------------------------------------------------------------------------
> > > Stephen M. Smith, Professor of Biomedical Engineering
> > > Associate Director,  Oxford University FMRIB Centre
> > > 
> > > FMRIB, JR Hospital, Headington, Oxford  OX3 9DU, UK
> > > +44 (0) 1865 222726  (fax 222717)
> > > [log in to unmask]    http://www.fmrib.ox.ac.uk/~steve
> > > ---------------------------------------------------------------------------
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > 
> > 
> 
> 
> ---------------------------------------------------------------------------
> Stephen M. Smith, Professor of Biomedical Engineering
> Associate Director,  Oxford University FMRIB Centre
> 
> FMRIB, JR Hospital, Headington, Oxford  OX3 9DU, UK
> +44 (0) 1865 222726  (fax 222717)
> [log in to unmask]    http://www.fmrib.ox.ac.uk/~steve
> ---------------------------------------------------------------------------
> 
> 
> 
> 
> 
> 

Top of Message | Previous Page | Permalink

JiscMail Tools


RSS Feeds and Sharing


Advanced Options


Archives

March 2024
February 2024
January 2024
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
2006
2005
2004
2003
2002
2001


JiscMail is a Jisc service.

View our service policies at https://www.jiscmail.ac.uk/policyandsecurity/ and Jisc's privacy policy at https://www.jisc.ac.uk/website/privacy-notice

For help and support help@jisc.ac.uk

Secured by F-Secure Anti-Virus CataList Email List Search Powered by the LISTSERV Email List Manager