fsl.data.melodicanalysis
¶
This module provides a set of functions for accessing the contents of a
MELODIC analysis directory. These functions are primarily intended to be used
by the MELODICImage
class, but are available for other uses. The
following functions are provided:
isMelodicImage |
Returns True if the given path looks like it is a melodic component image file, False otherwise. |
isMelodicDir |
Returns True if the given path looks like it is contained within a MELODIC directory, False otherwise. |
getAnalysisDir |
If the given path is contained within a MELODIC directory, the path to that MELODIC directory is returned. |
getTopLevelAnalysisDir |
If the given path is contained within a hierarchy of FEAT or MELODIC directories, the path to the highest-level (i.e. |
getDataFile |
If the given melodic directory is contained within another analysis directory, the path to the data file is returned. |
getICFile |
Returns the path to the melodic IC image. |
getMixFile |
Returns the path to the melodic mix file. |
getFTMixFile |
Returns the path to the melodic FT mix file. |
getNumComponents |
Returns the number of components generated in the melodic analysis contained in the given directrory. |
getComponentTimeSeries |
Returns a numpy array containing the melodic mix for the given directory. |
getComponentPowerSpectra |
Returns a numpy array containing the melodic FT mix for the given directory. |
-
fsl.data.melodicanalysis.
isMelodicImage
(path)¶ Returns
True
if the given path looks like it is a melodic component image file,False
otherwise.
-
fsl.data.melodicanalysis.
isMelodicDir
(path)¶ Returns
True
if the given path looks like it is contained within a MELODIC directory,False
otherwise. A melodic directory:- Must be named
*.ica
. - Must contain a file called
melodic_IC.nii.gz
ormelodic_oIC.nii.gz
. - Must contain a file called
melodic_mix
. - Must contain a file called
melodic_FTmix
.
- Must be named
-
fsl.data.melodicanalysis.
getAnalysisDir
(path)¶ If the given path is contained within a MELODIC directory, the path to that MELODIC directory is returned. Otherwise,
None
is returned.
-
fsl.data.melodicanalysis.
getTopLevelAnalysisDir
(path)¶ If the given path is contained within a hierarchy of FEAT or MELODIC directories, the path to the highest-level (i.e. the shallowest in the file system) directory is returned. Otherwise,
None
is returned.
-
fsl.data.melodicanalysis.
getDataFile
(meldir)¶ If the given melodic directory is contained within another analysis directory, the path to the data file is returned. Otherwise
None
is returned.
-
fsl.data.melodicanalysis.
getMeanFile
(meldir)¶ Return a path to the mean image of the meloidic input data.
-
fsl.data.melodicanalysis.
getICFile
(meldir)¶ Returns the path to the melodic IC image.
-
fsl.data.melodicanalysis.
getMixFile
(meldir)¶ Returns the path to the melodic mix file.
-
fsl.data.melodicanalysis.
getFTMixFile
(meldir)¶ Returns the path to the melodic FT mix file.
-
fsl.data.melodicanalysis.
getReportFile
(meldir)¶ Returns the path to the MELODIC report index file, or
None
if there is no report.
-
fsl.data.melodicanalysis.
getNumComponents
(meldir)¶ Returns the number of components generated in the melodic analysis contained in the given directrory.
-
fsl.data.melodicanalysis.
getComponentTimeSeries
(meldir)¶ Returns a
numpy
array containing the melodic mix for the given directory.
-
fsl.data.melodicanalysis.
getComponentPowerSpectra
(meldir)¶ Returns a
numpy
array containing the melodic FT mix for the given directory.