fsl.data.melodicimage

This module provides the MelodicImage class, an Image sub-class which encapsulates data from a MELODIC analysis.

class fsl.data.melodicimage.MelodicImage(*args, **kwargs)[source]

Bases: Image

The MelodicImage class is an Image which encapsulates the results of a FSL MELODIC analysis. A MelodicImage corresponds to the spatial component map file, generally called melodic_IC.nii.gz.

The MelodicImage class provides a few MELODIC-specific attributes and methods:

tr

The TR time of the raw data from which this MelodicImage was generated.

getComponentTimeSeries

Returns the time course for the specified (0-indexed) component.

getComponentPowerSpectrum

Returns the power spectrum for the time course of the specified (0-indexed) component.

numComponents

Returns the number of components in this MelodicImage.

getMelodicDir

Returns the melodic output directory in which this image is contained.

getTopLevelAnalysisDir

Returns the top level analysis, if the melodic analysis for this MelodicImage is contained within another analysis.

getDataFile

Returns the file name of the data image from which this MelodicImage was generated, if possible.

The tr time of the MelodicImage may not be known when it is created. If it is updated at a later time, the MelodicImage will notify any listeners which are registerd on the 'tr' topic (see the Notifier interface).

__init__(path, *args, **kwargs)[source]

Create a MelodicImage.

Parameters:

path – A path specifying the melodic_IC image file, or the .ica directory.

All other arguments are passed through to the Image.__init__() method.

property tr

The TR time of the raw data from which this MelodicImage was generated. If it is possible to do so, this is automatically initialised from the data file (see the getDataFile() method).

getComponentTimeSeries(component)[source]

Returns the time course for the specified (0-indexed) component.

getComponentPowerSpectrum(component)[source]

Returns the power spectrum for the time course of the specified (0-indexed) component.

numComponents()[source]

Returns the number of components in this MelodicImage.

getMelodicDir()[source]

Returns the melodic output directory in which this image is contained.

getReportFile()[source]

Returns the path to the MELODIC report - see melodicanalysis.getReportFile().

getTopLevelAnalysisDir()[source]

Returns the top level analysis, if the melodic analysis for this MelodicImage is contained within another analysis. Otherwise, returns None. See the melodicanalysis.getTopLevelAnalysisDir() function.

__annotations__ = {}
__module__ = 'fsl.data.melodicimage'
getDataFile()[source]

Returns the file name of the data image from which this MelodicImage was generated, if possible. See the melodicanalysis.getDataFile() function.

getMeanFile()[source]

Returns the file name of the mean data image associated with this MelodicImage. See the melodicanalysis.getMeanFile() function.