Skip to content

Commit da747ae

Browse files
authored
Merge pull request #6 from ccnmaastricht/version2
Version2
2 parents 4fe85f5 + 5d38a76 commit da747ae

22 files changed

+1508
-465
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,5 @@ model/
55
VF2Cort.m
66
*pipeline*
77
*workspace*
8+
*cache*
9+
*pyc
-3.46 KB
Binary file not shown.
2.28 KB
Binary file not shown.

README.md

Lines changed: 23 additions & 154 deletions
Original file line numberDiff line numberDiff line change
@@ -1,178 +1,47 @@
11
# Computational Neuroimaging Toolbox
22

3-
![](https://img.shields.io/badge/release-v1.2.0-blueviolet.svg?style=flat)
43
![](https://img.shields.io/github/license/ccnmaastricht/CNI_toolbox)
54
![](https://img.shields.io/github/issues/ccnmaastricht/CNI_toolbox)
65
![](https://img.shields.io/github/forks/ccnmaastricht/CNI_toolbox)
76
![](https://img.shields.io/github/stars/ccnmaastricht/CNI_toolbox)
87

9-
The Computational Neuroimaging Toolbox is a MATLAB toolbox for estimating input-referred models. Specifically, the toolbox contains tools for Fourier analyses of phase-encoded stimuli, population receptive field mapping, estimating parameters of generic (user-defined) input-referred models as well as performing ridge regression.
8+
The Computational Neuroimaging Toolbox contains tools for estimating input-referred models. Specifically, it includes tools for Fourier analyses of phase-encoded stimuli, population receptive field (pRF) mapping, fast (real-time) pRF mapping and for estimating parameters of generic (user-defined) input-referred models.
109

1110
This code is hosted at https://github.com/ccnmaastricht/CNI_toolbox
1211
The latest version may always be found here.
1312

13+
## Matlab implementation
14+
![](https://img.shields.io/badge/release-v2.0.0-blueviolet.svg?style=flat)
15+
1416
This software was developed with MATLAB R2017a and access to the full suite of MATLAB add-on packages. Some of these packages may be required to run the software.
1517

16-
## Installation
17-
There are two options for installing the toolbox. Either download the toolbox file [Computational Neuroimaging Toolbox.mltbx](https://github.com/ccnmaastricht/CNI_toolbox/raw/master/Computational%20Neuroimaging%20Toolbox.mltbx), navigate to the downloaded file within MATLAB and then execute the following command:
18+
### Installation
19+
Download the toolbox file [Computational Neuroimaging Toolbox.mltbx](https://github.com/ccnmaastricht/CNI_toolbox/raw/master/Computational%20Neuroimaging%20Toolbox.mltbx), navigate to the downloaded file within MATLAB and then execute the following command:
1820

1921
```MATLAB
2022
matlab.addons.toolbox.installToolbox('Computational Neuroimaging Toolbox.mltbx');
2123
```
24+
### Usage
2225

23-
Alternatively, download the compressed toolbox [Computational Neuroimaging Toolbox.zip](https://github.com/ccnmaastricht/CNI_toolbox/raw/master/Computational%20Neuroimaging%20Toolbox.zip) and extract it into Documents/MATLAB/Add-Ons/Toolboxes.
24-
25-
## Files
26-
This repository contains four files.
27-
1. `PEA.m` - MATLAB class implementation of Fourier analysis of phase-encoded stimuli.
28-
2. `pRF.m` - MATLAB class implementation of population receptive field mapping.
29-
3. `IRM.m` - MATLAB class implementation of input-referred model estimation.
30-
4. `RRT.m` - MATLAB class implementation of voxel-wise ridge regression.
31-
32-
33-
### Phase-encoding analysis tool.
34-
`pea = PEA(parameters)` creates an instance of the PEA class.
35-
parameters is a structure with 7 required fields
36-
- f_sampling: sampling frequency (1/TR)
37-
- f_stim : stimulation frequency
38-
- n_samples : number of samples (volumes)
39-
- n_rows : number of rows (in-plane resolution)
40-
- n_cols : number of columns (in-plance resolution)
41-
- n_slices : number of slices
26+
* [Data Handling](https://github.com/ccnmaastricht/CNI_toolbox/wiki/Data-Handling-(Matlab))
27+
* [Phase Encoding Analysis](https://github.com/ccnmaastricht/CNI_toolbox/wiki/Phase-Encoding-Analysis-(Matlab))
28+
* [Population Receptive Field Mapping](https://github.com/ccnmaastricht/CNI_toolbox/wiki/Population-Receptive-Field-Mapping-(Matlab))
29+
* [Input Referred Models](https://github.com/ccnmaastricht/CNI_toolbox/wiki/Input-Referred-Models-(Matlab))
30+
* [Fast & real-time pRF mapping](https://github.com/ccnmaastricht/CNI_toolbox/wiki/Fast-&-real-time-pRF-mapping-(Matlab))
4231

43-
This class has the following functions
32+
## Python implementation
33+
![](https://img.shields.io/badge/release-v1.0.0-blueviolet.svg?style=flat)
4434

45-
- `delay = PEA.get_delay();`
46-
- `direction = PEA.get_direction();`
47-
- `PEA.set_delay(delay);`
48-
- `PEA.set_direction(direction);`
49-
- `results = PEA.fitting(data);`
35+
### Installation
5036

51-
Use `help PEA.function` to get more detailed help on any specific
52-
function (e.g. `help PEA.fitting`)
53-
54-
typical workflow:
55-
```Matlab
56-
pea = PEA(parameters);
57-
pea.set_delay(delay);
58-
pea.set_direction(direction);
59-
results = pea.fitting(data);
37+
```Python
38+
pip install cni-tlbx
6039
```
6140

62-
### Population receptive field (pRF) mapping tool.
63-
`prf = pRF(parameters)` creates an instance of the pRF class.
64-
parameters is a structure with 7 required fields
65-
- f_sampling: sampling frequency (1/TR)
66-
- n_samples : number of samples (volumes)
67-
- n_rows : number of rows (in-plane resolution)
68-
- n_cols : number of columns (in-plance resolution)
69-
- n_slices : number of slices
70-
- w_stimulus: width of stimulus images in pixels
71-
- h_stimulus: height of stimulus images in pixels
72-
73-
optional inputs are
74-
- hrf : either a column vector containing a single hemodynamic
75-
response used for every voxel;
76-
or a matrix with a unique hemodynamic response along
77-
its columns for each voxel.
78-
By default the canonical two-gamma hemodynamic response
79-
function is generated internally based on the scan parameters.
80-
81-
This class has the following functions
82-
83-
- `hrf = pRF.get_hrf();`
84-
- `stimulus = pRF.get_stimulus();`
85-
- `tc = pRF.get_timecourses();`
86-
- `pRF.set_hrf(hrf);`
87-
- `pRF.set_stimulus(stimulus);`
88-
- `pRF.import_stimulus();`
89-
- `pRF.create_timecourses();`
90-
- `results = pRF.mapping(data);`
91-
92-
Use `help pRF.function` to get more detailed help on any specific function
93-
(e.g. `help pRF.mapping`)
94-
95-
typical workflow:
96-
```Matlab
97-
prf = pRF(parameters);
98-
prf.import_stimulus();
99-
prf.create_timecourses();
100-
results = prf.mapping(data);
101-
```
102-
103-
### Input-referred model (IRM) mapping tool.
104-
105-
`irm = IRM(parameters)` creates an instance of the IRM class.
106-
parameters is a structure with 5 required fields
107-
- f_sampling: sampling frequency (1/TR)
108-
- n_samples : number of samples (volumes)
109-
- n_rows : number of rows (in-plane resolution)
110-
- n_cols : number of columns (in-plance resolution)
111-
- n_slices : number of slices
112-
113-
optional inputs are
114-
- hrf : either a column vector containing a single hemodynamic
115-
response used for every voxel;
116-
or a matrix with a unique hemodynamic response along
117-
its columns for each voxel.
118-
By default the canonical two-gamma hemodynamic response
119-
function is generated internally based on the scan parameters.
120-
121-
This class has the following functions
122-
123-
- `hrf = IRM.get_hrf();`
124-
- `stimulus = IRM.get_stimulus();`
125-
- `tc = IRM.get_timecourses();`
126-
- `IRM.set_hrf(hrf);`
127-
- `IRM.set_stimulus(stimulus);`
128-
- `IRM.create_timecourses();`
129-
- `results = IRM.mapping(data);`
130-
131-
Use `help IRM.function` to get more detailed help on any specific function
132-
(e.g. `help IRM.mapping`)
133-
134-
typical workflow:
135-
```Matlab
136-
irm = IRM(parameters);
137-
irm.set_stimulus();
138-
irm.create_timecourse(FUN,xdata);
139-
results = irm.mapping(data);
140-
```
141-
142-
### Ridge-based analysis tool.
143-
144-
`rrt = RRT(parameters)` creates an instance of the RRT class.
145-
parameters is a structure with 5 required fields
146-
- f_sampling: sampling frequency (1/TR)
147-
- n_samples : number of samples (volumes)
148-
- n_rows : number of rows (in-plane resolution)
149-
- n_cols : number of columns (in-plance resolution)
150-
- n_slices : number of slices
151-
152-
optional inputs are
153-
- hrf : either a column vector containing a single hemodynamic
154-
response used for every voxel;
155-
or a matrix with a unique hemodynamic response along
156-
its columns for each voxel.
157-
By default the canonical two-gamma hemodynamic response
158-
function is generated internally based on the scan parameters.
159-
160-
This class has the following functions
161-
162-
- `hrf = RRT.get_hrf();`
163-
- `X = RRT.get_design();`
164-
- `RRT.set_hrf(hrf);`
165-
- `RRT.set_design(X);`
166-
- `RRT.optimize_lambda(data,range);`
167-
- `results = RRT.perform_ridge(data);`
168-
169-
Use `help RRT.function` to get more detailed help on any specific
170-
function (e.g. `help RRT.perform_ridge`)
41+
### Usage
17142

172-
typical workflow:
173-
```Matlab
174-
rrt = RRT(parameters);
175-
rrt.set_design(X);
176-
rrt.optimize_lambda(data,range);
177-
results = rrt.perform_ridge(data);
178-
```
43+
* [Data Handling](https://github.com/ccnmaastricht/CNI_toolbox/wiki/Data-Handling-(Python))
44+
* [Phase Encoding Analysis](https://github.com/ccnmaastricht/CNI_toolbox/wiki/Phase-Encoding-Analysis-(Python))
45+
* [Population Receptive Field Mapping](https://github.com/ccnmaastricht/CNI_toolbox/wiki/Population-Receptive-Field-Mapping-(Python))
46+
* [Input Referred Models](https://github.com/ccnmaastricht/CNI_toolbox/wiki/Input-Referred-Models-(Python))
47+
* [Fast & real-time pRF mapping](https://github.com/ccnmaastricht/CNI_toolbox/wiki/Fast-&-real-time-pRF-mapping-(Python))

0 commit comments

Comments
 (0)