NPL
Neurological Programs and Libraries
fmri_inference.h File Reference
#include <Eigen/Dense>
#include <Eigen/IterativeSolvers>
#include <string>
#include <vector>
#include "npltypes.h"
#include "mrimage.h"
#include "utility.h"
#include "macros.h"

Go to the source code of this file.

Classes

class  npl::MatMap
 
class  npl::MatrixReorg
 Reorganizes input images into tall and wide matrices (matrices that span the total rows and cols, respectively). More...
 

Namespaces

 npl
 

Functions

VectorXd npl::onDiskSVD (const MatrixReorg &A, int rank, size_t poweriters, double varthresh, double cvarthresh, MatrixXd *U=NULL, MatrixXd *V=NULL)
 Uses randomized subspace approximation to reduce the input matrix (made up of blocks stored on disk with a given prefix). This assumes that the matrix is a wide matrix (which is generally a good assumption in fMRI) and that it therefore is better to reduce the number of columns. More...
 
void npl::gicaCreateMatrices (size_t tcat, size_t scat, vector< std::string > masks, vector< std::string > inputs, std::string prefix, double maxmem, bool normts, bool verbose)
 Create on disk matrices based on an array of input images. The array will be concatinated in time tcat time and space scat time, with time as the faster dimension. More...
 
void npl::gicaReduceFull (std::string inpref, std::string outpref, double varthresh, double cvarthresh, size_t maxrank, bool verbose)
 Compute PCA for the given group, defined. More...
 
void npl::gicaReduceProb (std::string inpref, std::string outpref, double varthresh, double cvarthresh, size_t rank, size_t poweriters, bool verbose)
 Compute PCA for the given group, defined. More...
 
void npl::gicaTemporalICA (std::string reorgpref, std::string reducepref, std::string outpref, bool verbose)
 Perform ICA with each dimension as a separate timeseries. This is essentially unmixing in space and producing independent timeseries. More...
 
void npl::gicaSpatialICA (std::string reorgpref, std::string reducepref, std::string outpref, bool verbose)
 Perform ICA with each dimension as a separate timeseries. This is essentially unmixing in space and producing independent timeseries. More...
 
VectorXd npl::covSVD (const MatrixReorg &A, double varthresh, double cvarthresh, size_t maxrank, MatrixXd *U, MatrixXd *V)
 Computes the SVD from XXt using the JacobiSVD. More...
 
void npl::fmriGLM (ptr< const MRImage > fmri, const MatrixXd &X, ptr< MRImage > bimg, ptr< MRImage > Timg, ptr< MRImage > pimg)
 Performs general linear model analysis on a 4D image. More...
 
void npl::fmriBandPass (ptr< MRImage > inimg, double cuton, double cutoff)
 Takes the FFT of each line of the image, performs bandpass filtering on the line and then invert FFTs and writes back to the input image. More...
 
ptr< MRImage > npl::regressOut (ptr< const MRImage > inimg, const MatrixXd &X)
 Regresses out the given variables, creating time series which are uncorrelated with X. More...
 
MatrixXd npl::extractLabelAVG (ptr< const MRImage > fmri, ptr< const MRImage > labelmap)
 Creates a matrix of timeseries, then perfrorms principal components analysis on it to reduce the number of timeseries to outsz. Each unique non-zero label in the input image will be considered a group of measurements which will be reduced together. Thus if there are labels 0,1,2 there will be 2 columns in the output. More...
 
MatrixXd npl::extractLabelPCA (ptr< const MRImage > fmri, ptr< const MRImage > labelmap, size_t outsz)
 Creates a matrix of timeseries, then perfrorms principal components analysis on it to reduce the number of timeseries to outsz. Each unique non-zero label in the input image will be considered a group of measurements which will be reduced together. Thus if there are labels 0,1,2 there will be 2*outsz columns in the output. More...
 
MatrixXd npl::extractLabelICA (ptr< const MRImage > fmri, ptr< const MRImage > labelmap, size_t outsz)
 Creates a matrix of timeseries, then perfrorms principal components analysis on it to reduce the number of timeseries to outsz. Each unique non-zero label in the input image will be considered a group of measurements which will be reduced together. Thus if there are labels 0,1,2 there will be 2*outsz columns in the output. More...
 

Variables

class npl::MatMap npl::__attribute__