plateform
stringclasses
1 value
repo_name
stringlengths
13
113
name
stringlengths
3
74
ext
stringclasses
1 value
path
stringlengths
12
229
size
int64
23
843k
source_encoding
stringclasses
9 values
md5
stringlengths
32
32
text
stringlengths
23
843k
github
gopmc/SRD-master
text2bin.m
.m
SRD-master/BookFiles/text2bin.m
232
utf_8
c58f4e161ca738c8f824631fc1a843e7
% n=text2bin(textstring) % transform text string into a vector of binary 0-1 function n=text2bin(textstring) bintext=dec2bin(double(textstring),7); % text into binary [rp,cp]=size(bintext); n=str2num(reshape(bintext',1,rp*cp)')';
github
gopmc/SRD-master
firpm_octave.m
.m
SRD-master/BookFiles/firpm_octave.m
187
utf_8
a8d949de4a4cc1a60659c8c27ba59c6f
% firpm.m: Wrapper for remez function. Filename be renamed % to simply "firpm.m" for older version of Matlab, as well % as Octave. function [b]=firpm(varargin) [b]=remez(varargin{:})';
github
gopmc/SRD-master
pam2letters.m
.m
SRD-master/BookFiles/pam2letters.m
332
utf_8
abd544e2196c5685cf5bd42a5f49b0e8
% f = pam2letters(seq) % reconstruct string of +/-1 +/-3 into letters function f = pam2letters(seq) S = length(seq); off = mod(S,4); if off ~= 0 sprintf('dropping last %i PAM symbols',off) seq = seq(1:S-off); end N = length(seq)/4; f=[]; for k = 0:N-1 f(k+1) = base2dec(char((seq(4*k+1:4*k+4)+99)/2),4); end f ...
github
gopmc/SRD-master
BigTransmitter.m
.m
SRD-master/BookFiles/BigTransmitter.m
3,988
utf_8
970da2ff9a70d6e9c4a03f61cfb4c457
function [r, s]=BigTransmitter(m, frameParams, rfParams, chanParams) % re-organize m linesOfText=floor(size(m,2)/frameParams.userDataLength); numUsers=size(m,1); m2=zeros(linesOfText,frameParams.userDataLength,numUsers); for i=1:numUsers m2(:,:,i)=reshape(m(i,1:frameParams.userDataLength*linesOfText),frameParams.u...
github
gopmc/SRD-master
letters2pam.m
.m
SRD-master/BookFiles/letters2pam.m
388
utf_8
30c1dab025409bfab5d0dfb98bb25fd3
% f = letters2pam(str) % encode a string of ASCII text into +/-1, +/-3 function f = letters2pam(str); % call as Matlab function N=length(str); % length of string f=zeros(1,4*N); % store 4-PAM coding here for k=0:N-1 % change to "...
github
gopmc/SRD-master
pam.m
.m
SRD-master/BookFiles/pam.m
179
utf_8
1776de0314394c79d9948bb8868d3846
% seq=pam(len,M,Var); % Create an M-PAM source sequence with % length 'len' and variance 'Var' function seq=pam(len,M,Var); seq=(2*floor(M*rand(1,len))-M+1)*sqrt(3*Var/(M^2-1));
github
gopmc/SRD-master
bin2text.m
.m
SRD-master/BookFiles/bin2text.m
198
utf_8
36b19a1a8c46cd76e7228becc748a8b6
% ztext=bin2text(z) % transform a vector of 7-bit binary 0-1 into a text string function ztext=bin2text(z) rp=floor(length(z)/7); rez=num2str(z(1:7*rp)')'; ztext=char(bin2dec(reshape(rez,7,rp)'))';
github
gopmc/SRD-master
plotspec.m
.m
SRD-master/BookFiles/plotspec.m
702
utf_8
dec5ed48a1a58f377a9a9fdaf8078706
% plotspec(x,Ts) plots the spectrum of the signal x % Ts = time (in seconds) between adjacent samples in x function plotspec(x,Ts) N=length(x); % length of the signal x t=Ts*(1:N); % define a time vector ssf=(ceil(-N/2):ceil(N/2)-1)/(Ts*N); % frequency ...
github
gopmc/SRD-master
pow.m
.m
SRD-master/BookFiles/pow.m
99
utf_8
3599eb6a95e5a9a74e7d35129b1201be
% y=pow(x) calculates the power in the input sequence x function y=pow(x) y=x(:)'*x(:)/length(x);
github
gopmc/SRD-master
chancode.m
.m
SRD-master/BookFiles/Q3AM/chancode.m
616
utf_8
5dccb77bbf2bde2810ce37e558a76bda
% Channel Coding for 4QAM % January 15, 2002 % Sean Leventhal, Katie Orlicki % chancode.m %****************************************************************** % input: % data - data to be coded in binary form % G - matrix to code the data (lookup) % output: coded - coded data %*****************************************...
github
gopmc/SRD-master
qamTx.m
.m
SRD-master/BookFiles/Q3AM/qamTx.m
7,674
utf_8
7fa0a4ad919bd65afe81ec2dd7d4d452
%============================================= % Modem Transmitter and Channel Simulator %--------------------------------------------- % John Walsh %--------------------------------------------- % This software and manual is based upon % work done by John MacLaren Walsh, Katie % Orlicki, Adam Pierce, Johnson Smith, ...
github
gopmc/SRD-master
chandecode.m
.m
SRD-master/BookFiles/Q3AM/chandecode.m
1,055
utf_8
d5532dc1e50abcfcef406976fe222a58
% Channel Decoding for 4QAM % January 15, 2002 % Sean Leventhal, Katie Orlicki % chandecode.m %****************************************************************** % input: % data - data to be decoded % H - matrix to decode the data (lookup) % syn - syndrome table to look up errors (lookup) % ginv - pseudo inverse of G...
github
gopmc/SRD-master
qpskRx.m
.m
SRD-master/BookFiles/Q3AM/qpskRx.m
10,257
utf_8
1b9738a37a4da2adfefb5dc25daa4b6c
%============================================= % Modem Receiver Simulator/ SER Determination %--------------------------------------------- % John Walsh %--------------------------------------------- % This software and manual is based upon % work done by John MacLaren Walsh, Katie % Orlicki, Adam Pierce, Johnson Smi...
github
TimVanMourik/OpenFmriAnalysis-master
tvm_installOpenFmriAnalysisToolbox.m
.m
OpenFmriAnalysis-master/tvm_installOpenFmriAnalysisToolbox.m
2,979
utf_8
9b18065c8ad0376fa7cbb8d04f37dc2c
function tvm_installOpenFmriAnalysisToolbox(configuration) % TVM_INSTALLOPENFMRIANALYSISTOOLBOX % TVM_INSTALLOPENFMRIANALYSISTOOLBOX(configuration) % % % Copyright (C) Tim van Mourik, 2015, DCCN % %% rootDirectory = mfilename('fullpath'); rootDirectory = fileparts(rootDirectory); %% Parse configuration if nar...
github
TimVanMourik/OpenFmriAnalysis-master
tvm_realignFunctionals.m
.m
OpenFmriAnalysis-master/Interface/Preprocessing/tvm_realignFunctionals.m
3,465
utf_8
1681df6e5f908df77c310d3012112a01
function tvm_realignFunctionals(configuration, realignmentConfiguration) % TVM_REALIGNFUNCTIONALS Moves niftis to destination folder % TVM_REALIGNFUNCTIONALS(configuration, realignmentConfiguration) % @todo Add description % % Input: % i_SubjectDirectory % i_SourceDirectory % i_Characteristic % Outpu...
github
TimVanMourik/OpenFmriAnalysis-master
tvm_filterFunctionals.m
.m
OpenFmriAnalysis-master/Interface/Preprocessing/tvm_filterFunctionals.m
3,270
utf_8
31ffe05d3aabc0771db2be15041d3767
function tvm_filterFunctionals(configuration) % TVM_FILTERFUNCTIONALS % TVM_FILTERFUNCTIONALS(configuration) % @todo Add description % % Input: % i_SubjectDirectory % i_SourceDirectory % i_LowPass % i_HighPass % i_TR % i_Qsub % Output: % o_OutputDirectory % % Copyright (C) Tim van M...
github
TimVanMourik/OpenFmriAnalysis-master
tvm_retroicorBackProject.m
.m
OpenFmriAnalysis-master/Interface/Utilities/tvm_retroicorBackProject.m
4,062
utf_8
f91f4dd534f82f3247d4f84e3357a9f8
function tvm_retroicorBackProject(configuration) % TVM_RETROICORBACKPROJECT % TVM_RETROICORBACKPROJECT(configuration) % @todo Add description % % Input: % i_SubjectDirectory % i_DesignMatrix % i_Betas % i_TemplateVolume % i_Resolution % i_Order % i_PhysioType % Output: % o_BackProjection % % Copy...
github
TimVanMourik/OpenFmriAnalysis-master
tvm_computeDivergence.m
.m
OpenFmriAnalysis-master/Interface/LaminarAnalysis/tvm_computeDivergence.m
4,583
utf_8
cd10ae08fef327158f8353e515443692
function tvm_computeDivergence(configuration) % TVM_COMPUTEGRADIENT % TVM_COMPUTEGRADIENT(configuration) % @todo Add description % % Input: % i_SubjectDirectory % i_VectorField % i_Order % Output: % o_Divergence % % Copyright (C) Tim van Mourik, 2015-2016, DCCN % % This file is part of the fmri analysis ...
github
TimVanMourik/OpenFmriAnalysis-master
tvm_designMatrixToTimeCourse.m
.m
OpenFmriAnalysis-master/Interface/LaminarAnalysis/tvm_designMatrixToTimeCourse.m
7,251
utf_8
58990a57d9f994f416272416c994b3e6
function tvm_designMatrixToTimeCourse(configuration) % TVM_DESIGNMATRIXTOTIMECOURSE % TVM_DESIGNMATRIXTOTIMECOURSE(configuration) % @todo Add description % % Input: % i_SubjectDirectory % i_DesignMatrix % i_FunctionalFolder % i_FunctionalFiles % i_RegressionApproach % Output: % o_TimeCourse % % Copyr...
github
TimVanMourik/OpenFmriAnalysis-master
tvm_gradient.m
.m
OpenFmriAnalysis-master/Interface/LaminarAnalysis/tvm_gradient.m
4,845
utf_8
cbd1ce35b59c85c7b1667946974d4fda
function tvm_gradient(configuration) % TVM_GRADIENT % TVM_GRADIENT(configuration) % @todo Add description % % Input: % i_SubjectDirectory % i_Potential % i_Normalise % Output: % o_Gradient % Copyright (C) Tim van Mourik, 2015-2016, DCCN % % This file is part of the fmri analysis toolbox, see % https://g...
github
TimVanMourik/OpenFmriAnalysis-master
gradnan.m
.m
OpenFmriAnalysis-master/Interface/LaminarAnalysis/private/gradnan.m
5,282
utf_8
dae41a0401beec3360b6e1cf7d856666
function varargout = gradnan(f,varargin) % GRADNAN Approximate gradient. % % [FX,FY] = GRADNAN(F) returns the numerical gradient of the % matrix F. FX corresponds to dF/dx, the differences in the % x (column) direction. FY corresponds to dF/dy, the differences % in the y (row) direction. The spacing between ...
github
TimVanMourik/OpenFmriAnalysis-master
tvm_convertRegisterDat.m
.m
OpenFmriAnalysis-master/Interface/Registration/tvm_convertRegisterDat.m
7,602
utf_8
0d6c12a8993d6b79867c1e95a491a5fa
function tvm_convertRegisterDat(configuration) % TVM_CONVERTREGISTERDAT % TVM_CONVERTREGISTERDAT(configuration) % @todo Add description % % Input: % i_SubjectDirectory % i_RegistrationVolume % i_FreeSurferFolder % i_RegisterDat % Output: % o_Boundaries % o_CoregistrationMatrix % % Copyright (C) Tim v...
github
TimVanMourik/OpenFmriAnalysis-master
tvm_useBbregister.m
.m
OpenFmriAnalysis-master/Interface/Registration/tvm_useBbregister.m
9,864
utf_8
6bad04382fc24e32042e9d0dde238a27
function tvm_useBbregister(configuration) % TVM_USEBBREGISTER(configuration) % TVM_USEBBREGISTER(configuration) % @todo Add description % % Input: % i_SubjectDirectory % i_RegistrationVolume % i_FreeSurferFolder % i_SpmInitialisation % i_FslInitialisation % i_Contrast % i_DegreesOfFreedom ...
github
TimVanMourik/OpenFmriAnalysis-master
tvm_registerVolumes.m
.m
OpenFmriAnalysis-master/Interface/Registration/tvm_registerVolumes.m
5,312
utf_8
5fef6674948eb16f5777eea701a1c27e
function tvm_registerVolumes(configuration, registrationConfiguration) % TVM_REGISTERVOLUMES % TVM_REGISTERVOLUMES(configuration) % @todo Add description % % Input: % i_SubjectDirectory % i_ReferenceVolume % i_FreeSurferFolder % i_CoregistrationMatrix % Output: % o_CoregistrationMatrix % o_B...
github
TimVanMourik/OpenFmriAnalysis-master
tvm_freesurferBoundariesToVolume.m
.m
OpenFmriAnalysis-master/Interface/Registration/tvm_freesurferBoundariesToVolume.m
6,617
utf_8
eaea90e699a6d3cf60b8614016d7a78b
function tvm_freesurferBoundariesToVolume(configuration) % TVM_FREESURFERBOUNDARIESTOVOLUME % TVM_FREESURFERBOUNDARIESTOVOLUME(configuration) % @todo Add description % % Input: % i_SubjectDirectory % i_RegistrationVolume % i_FreeSurferFolder % Output: % o_Boundaries % % Copyright (C) Tim van Mourik, 2014...
github
TimVanMourik/OpenFmriAnalysis-master
tvm_recursiveBoundaryRegistration.m
.m
OpenFmriAnalysis-master/Interface/Registration/tvm_recursiveBoundaryRegistration.m
26,498
utf_8
649cc94da10f8c9c18585dc0a5ee5377
function tvm_recursiveBoundaryRegistration(configuration, registrationConfiguration) % TVM_RECURSIVEBOUNDARYREGISTRATION % TVM_RECURSIVEBOUNDARYREGISTRATION(configuration) % @todo Add description % % Input: % i_SubjectDirectory % i_ReferenceVolume % i_Boundaries % i_Mask % i_MinimumVoxels % i...
github
TimVanMourik/OpenFmriAnalysis-master
tvm_labelToTimecourse4D.m
.m
OpenFmriAnalysis-master/Old/tvm_labelToTimecourse4D.m
2,706
utf_8
40427a1a22e5f5aec76759d85d8159d6
function output = tvm_labelToTimecourse4D(configuration) memtic subjectDirectory = configuration.SubjectDirectory; functionalScan = spm_vol([subjectDirectory configuration.MeanFunctional]); allVolumes = spm_vol([subjectDirectory configuration.FunctionalFiles]); if ~exist([subjectDirectory configuratio...
github
TimVanMourik/OpenFmriAnalysis-master
tvm_makeWallpaper2.m
.m
OpenFmriAnalysis-master/Old/tvm_makeWallpaper2.m
4,619
utf_8
20b3b49c53bfa08f84f2af25ed436f97
function output = tvm_makeWallpaper(configuration) memtic concatProfiles = cell(configuration.NumberOfRegions, 1); for subject = 1:length(configuration.Subjects) subjectDirectory = sprintf(configuration.SubjectDirectory, subject); % load([subjectDirectory configuration.Profiles], 'profiles'); loa...
github
TimVanMourik/OpenFmriAnalysis-master
tvm_offDiagonalShift.m
.m
OpenFmriAnalysis-master/Old/tvm_offDiagonalShift.m
2,828
utf_8
76a0d5caf15320bfe3c01c5aeedd62e0
function output = tvm_offDiagonalShift(configuration) memtic concatProfiles = cell(configuration.NumberOfRegions, 1); for subject = 1:length(configuration.Subjects) subjectDirectory = sprintf(configuration.SubjectDirectory, subject); % load([subjectDirectory configuration.Profiles], 'profiles'); ...
github
TimVanMourik/OpenFmriAnalysis-master
tvm_findVerticesOfInterest.m
.m
OpenFmriAnalysis-master/Old/tvm_findVerticesOfInterest.m
3,360
utf_8
be608e847f746f9f081becd20a4db0fa
function output = tvm_findVerticesOfInterest(configuration) memtic subjectDirectory = configuration.SubjectDirectory; meanFunctional = spm_vol([subjectDirectory configuration.Functional]); load([subjectDirectory configuration.CorrelationFolder configuration.PeakFile], 'peaks') meanFunctional.volume = ze...
github
TimVanMourik/OpenFmriAnalysis-master
tvm_threshold.m
.m
OpenFmriAnalysis-master/Old/tvm_threshold.m
1,130
utf_8
a525b2129bc288c0e24b8dde55fd0c2e
function output = tvm_threshold(configuration) memtic subjectDirectory = configuration.SubjectDirectory; folderContent = dir([subjectDirectory configuration.CorrelationFolder '*.nii']); folderContent = {folderContent.name}; for volume = 1:length(folderContent) correlationVolume = spm_vol([subjectDirect...
github
TimVanMourik/OpenFmriAnalysis-master
tvm_makeWallpaperWithTimecourse.m
.m
OpenFmriAnalysis-master/Old/tvm_makeWallpaperWithTimecourse.m
4,151
utf_8
01753a0146def7578804bed69f7151d8
function output = tvm_makeWallpaperWithTimecourse(configuration) memtic concatTimecourses = cell(configuration.NumberOfTimeCourses, 1); concatProfiles = cell(configuration.NumberOfRegions, 1); for subject = 1:length(configuration.Subjects) subjectDirectory = sprintf(configuration.SubjectDirectory, configu...
github
TimVanMourik/OpenFmriAnalysis-master
tvm_makeWallpaper.m
.m
OpenFmriAnalysis-master/Old/tvm_makeWallpaper.m
4,963
utf_8
abb27285df3cf74cacbf4a2ac08b0970
function output = tvm_makeWallpaper(configuration) memtic s = sprintf(configuration.SubjectDirectory, configuration.Subjects(1)); load([s configuration.Profiles], 'collapsedProfile'); numberOfRegions = size(collapsedProfile, 1); %#ok<NODEF> concatProfiles = cell(numberOfRegions, 1); for subject = 1:length(con...
github
TimVanMourik/OpenFmriAnalysis-master
tvm_makeWallpaperStd.m
.m
OpenFmriAnalysis-master/Old/tvm_makeWallpaperStd.m
4,599
utf_8
723a1e69ea6164d85844e64e8164c144
function output = tvm_makeWallpaperStd(configuration) memtic concatProfiles = cell(configuration.NumberOfRegions, 1); for subject = 1:length(configuration.Subjects) subjectDirectory = sprintf(configuration.SubjectDirectory, subject); % load([subjectDirectory configuration.Profiles], 'profiles'); ...
github
TimVanMourik/OpenFmriAnalysis-master
tvm_hrf.m
.m
OpenFmriAnalysis-master/Core/tvm_hrf.m
3,452
utf_8
ae96b0a48604233ab70becadc9ab929a
function stimulusRegressors = tvm_hrf(configuration) % % For duration = 0 an impuls response is taken and a regular HRF is used. % % Note that the area under the HRF curve is computed for a given time step. % This will be small for small duration. Only when duration = 0, an impuls % response is used. This may result in...
github
TimVanMourik/OpenFmriAnalysis-master
tvm_constructFirModel.m
.m
OpenFmriAnalysis-master/Core/tvm_constructFirModel.m
1,591
utf_8
6e3e6e9170fef93f675635f15b0a3ca1
function regressorMatrix = tvm_constructFirModel(configuration) % % Make sure the segment spacing, time points and stimulus have the same % time units. % % Copyright (C) Tim van Mourik, 2014, DCCN % %% Parse configuration segmentSpacing = tvm_getOption(configuration, 'SegmentSpacing', 1); %no defa...
github
TimVanMourik/OpenFmriAnalysis-master
tvm_showObjectContourOnSlice.m
.m
OpenFmriAnalysis-master/Core/tvm_showObjectContourOnSlice.m
5,468
utf_8
e19d760a125e3ff11e6bdfbe738d328a
function tvm_showObjectContourOnSlice(configuration) % % % Copyright (C) Tim van Mourik, 2015, DCCN % %% Parse configuration volume = tvm_getOption(configuration, 'i_Volume'); %no default roi = tvm_getOption(configuration, 'i_ROI', ''); %no default slice = tvm_...
github
TimVanMourik/OpenFmriAnalysis-master
tvm_resample.m
.m
OpenFmriAnalysis-master/Core/tvm_resample.m
6,599
utf_8
f9ddd7611727c473d826ee0f0a20b235
function outputMatrix = tvm_resample(inputMatrix, outputSize, isReal) % % updownsample - up-sample or down-sample an input series using fourier domain % input series needs to be continuous of a high degree % % format: out_m = updownsample( in_m,out_x_sz,out_y_sz,is_fourier_flag,is_real_flag ) % % input...
github
TimVanMourik/OpenFmriAnalysis-master
tvm_dicomToMdhTime.m
.m
OpenFmriAnalysis-master/Core/tvm_dicomToMdhTime.m
537
utf_8
88f7b2556aefe0257ca6fe910c0a28ab
% convert the volume acquisition time stamps of dicom files to MDH time % stamps (msec after midnight) function msTimestamp = tvm_dicomToMdhTime(time) time = str2double(time); hours = fix(time / 10000); time = time - hours * 10000; minutes = fix(time / 100); time = tim...
github
TimVanMourik/OpenFmriAnalysis-master
tvm_loadFreeSurferAsciiFile.m
.m
OpenFmriAnalysis-master/Core/tvm_loadFreeSurferAsciiFile.m
4,373
utf_8
b503949dbf43d4cf539441045d0c3ac3
function outputData = tvm_loadFreeSurferAsciiFile(fileNames) %LOADFREESURFERASCIIFILE(DATAFILENAMES) %Loads FreeSurfer output % %Example: % fileNames = [] % fileNames.SurfaceWhite = '?h.white.asc'; % fileNames.SurfacePial = '?h.pial.asc'; % fileNames.CurvatureWhite = '?h.curv.asc'; % file...
github
TimVanMourik/OpenFmriAnalysis-master
tvm_computeCurvatureFromSdf.m
.m
OpenFmriAnalysis-master/Core/tvm_computeCurvatureFromSdf.m
4,024
utf_8
fcc11341f5638808c1b173bea42bfd7a
function tvm_computeCurvatureFromGradient(configuration) %% Parse configuration subjectDirectory = tvm_getOption(configuration, 'i_SubjectDirectory'); %no default sdfFile = fullfile(subjectDirectory, tvm_getOption(configuration, 'i_SDF')); %no default curv1File = fullfile(subjectDir...
github
TimVanMourik/OpenFmriAnalysis-master
tvm_partialVolumeArea.m
.m
OpenFmriAnalysis-master/Core/tvm_partialVolumeArea.m
6,432
utf_8
6b6be762727a9d15a5945cc70ea6485f
function distance = tvm_partialVolumeArea(distance, method, normals) % The mode needs to be added as soon a different method is implementedy % function distance = partialVolumeArea(distance, mode) % % The integral of a partial volume kernel from negative infinity to [input] % Starting at zero, going to 1 % % NB. distan...
github
TimVanMourik/OpenFmriAnalysis-master
tvm_bbregister.m
.m
OpenFmriAnalysis-master/Core/tvm_bbregister.m
9,912
utf_8
b85810aaf555f5011e338b9a25ed8f06
function [transformationMatrix, registrationParameters] = tvm_bbregister(arrayW, arrayP, voxelGrid, configuration) %BOUNDARYBASEDREGISTRATION A method of using the boundaries that enclose %the grey matter for registration of brain volume data. It is a five-stage %process proposed by Greve & Fischl (2009). % % T = BO...
github
TimVanMourik/OpenFmriAnalysis-master
tvm_mdhToDicomTime.m
.m
OpenFmriAnalysis-master/Core/tvm_mdhToDicomTime.m
594
utf_8
08ddf937e657b5bde89597feee9afdf5
% convert the volume acquisition time stamps of dicom files to MDH time % stamps (msec after midnight) function trueTime = tvm_mdhToDicomTime(msTimestamp) microSeconds = mod(msTimestamp, 1000); trueTime = (msTimestamp - microSeconds) / 1000; seconds = mod(trueTime, 60); trueTime = (trueTime -...
github
TimVanMourik/OpenFmriAnalysis-master
tvm_sampleHrf.m
.m
OpenFmriAnalysis-master/Core/private/tvm_sampleHrf.m
4,222
utf_8
381094aa7b06c4fa08e2e1cdbd4d58a7
function regressor = tvm_sampleHrf(timePoints, stimulusOnsets, stimulusDurations, hrfParameters, type) % % For duration = 0 an impuls response is taken and a regular HRF is used. % % Note that the area under the HRF curve is computed for a given time step. % This will be small for small duration. Only when duration = 0...
github
TimVanMourik/OpenFmriAnalysis-master
findContrast.m
.m
OpenFmriAnalysis-master/Core/private/findContrast.m
9,253
utf_8
1ac2be57e086baa3551147795fe3db54
function contrast = findContrast(arrayW, arrayP, voxelgrid, configuration) %FINDCONTRAST Finds the contrast near a boundary of a given mesh. % FINDCONTRAST(INNERBOUNDARY, OUTERBOUNDARY, VOXELGRID) % Finds the contrast in a VOXELGRID, near the INNERBOUNDARY. % % FINDCONTRAST(INNERBOUNDARY, OUTERBOUNDARY, VOXELGRID...
github
TimVanMourik/OpenFmriAnalysis-master
tvm_toTranslationMatrix.m
.m
OpenFmriAnalysis-master/Core/private/tvm_toTranslationMatrix.m
214
utf_8
2beace2293fabecf62be87a39c3aba38
function matrix = tvm_toTranslationMatrix(translation) matrix = [1, 0, 0, 0; ... 0, 1, 0, 0; ... 0, 0, 1, 0; ... translation(1), translation(2), translation(3), 1]; end
github
TimVanMourik/OpenFmriAnalysis-master
tvm_curvature.m
.m
OpenFmriAnalysis-master/Core/Curvature/tvm_curvature.m
2,357
utf_8
7b22f05633401b50f586cd7cf4b992f2
function tvm_curvature(configuration) % TVM_COMPUTECURVATURE % TVM_COMPUTECURVATURE(configuration) % % % Copyright (C) Tim van Mourik, 2014, DCCN % % configuration.SubjectDirectory % configuration.White % configuration.Pial % configuration.WhiteCurvature % configuration.PialCurvature %% Parse configu...
github
TimVanMourik/OpenFmriAnalysis-master
load_nii_ext.m
.m
OpenFmriAnalysis-master/External/NifTI/load_nii_ext.m
5,337
utf_8
fa0e831b0a596c3208b21bddc1c6d812
% Load NIFTI header extension after its header is loaded using load_nii_hdr. % % Usage: ext = load_nii_ext(filename) % % filename - NIFTI file name. % % Returned values: % % ext - Structure of NIFTI header extension, which includes num_ext, % and all the extended header sections in the header extension. % ...
github
TimVanMourik/OpenFmriAnalysis-master
rri_orient.m
.m
OpenFmriAnalysis-master/External/NifTI/rri_orient.m
2,251
utf_8
4253fb96b9189a8a4bad49661d9ecac3
% Convert image of different orientations to standard Analyze orientation % % Usage: nii = rri_orient(nii); % Jimmy Shen (jimmy@rotman-baycrest.on.ca), 26-APR-04 %___________________________________________________________________ function [nii, orient, pattern] = rri_orient(nii, varargin) if nargin > 1 ...
github
TimVanMourik/OpenFmriAnalysis-master
save_untouch0_nii_hdr.m
.m
OpenFmriAnalysis-master/External/NifTI/save_untouch0_nii_hdr.m
8,594
utf_8
7e8b1b327e1924837820f75780d52d01
% internal function % - Jimmy Shen (jimmy@rotman-baycrest.on.ca) function save_nii_hdr(hdr, fid) if ~isequal(hdr.hk.sizeof_hdr,348), error('hdr.hk.sizeof_hdr must be 348.'); end write_header(hdr, fid); return; % save_nii_hdr %---------------------------------------------------------------...
github
TimVanMourik/OpenFmriAnalysis-master
rri_zoom_menu.m
.m
OpenFmriAnalysis-master/External/NifTI/rri_zoom_menu.m
737
utf_8
d8151523470b0fba970eb1d98ba56030
% Imbed a zoom menu to any figure. % % Usage: rri_zoom_menu(fig); % % - Jimmy Shen (jimmy@rotman-baycrest.on.ca) % %-------------------------------------------------------------------- function menu_hdl = rri_zoom_menu(fig) if isnumeric(fig) menu_hdl = uimenu('Parent',fig, ... 'Label','Zoom on', .....
github
TimVanMourik/OpenFmriAnalysis-master
rri_select_file.m
.m
OpenFmriAnalysis-master/External/NifTI/rri_select_file.m
16,599
utf_8
e349954ca803370f62ceeabdbab5912e
function [selected_file, selected_path] = rri_select_file(varargin) % % USAGE: [selected_file, selected_path] = ... % rri_select_file(dir_name, fig_title) % % Allow user to select a file from a list of Matlab competible % file format % % Example: % % [selected_file, selected_path] = ... % rri_select_...
github
TimVanMourik/OpenFmriAnalysis-master
clip_nii.m
.m
OpenFmriAnalysis-master/External/NifTI/clip_nii.m
3,306
utf_8
a70bdbed5a0813312d4c83f94b99a710
% CLIP_NII: Clip the NIfTI volume from any of the 6 sides % % Usage: nii = clip_nii(nii, [option]) % % Inputs: % % nii - NIfTI volume. % % option - struct instructing how many voxel to be cut from which side. % % option.cut_from_L = ( number of voxel ) % option.cut_from_R = ( number of voxel ) % option.cut_from_P ...
github
TimVanMourik/OpenFmriAnalysis-master
affine.m
.m
OpenFmriAnalysis-master/External/NifTI/affine.m
16,110
utf_8
768d2303e551a9584685bdb01abf6f8b
% Using 2D or 3D affine matrix to rotate, translate, scale, reflect and % shear a 2D image or 3D volume. 2D image is represented by a 2D matrix, % 3D volume is represented by a 3D matrix, and data type can be real % integer or floating-point. % % You may notice that MATLAB has a function called 'imtransform.m' fo...
github
TimVanMourik/OpenFmriAnalysis-master
load_untouch_nii_img.m
.m
OpenFmriAnalysis-master/External/NifTI/load_untouch_nii_img.m
14,756
utf_8
688b2a42f8071c6402a037c7ca923689
% internal function % - Jimmy Shen (jimmy@rotman-baycrest.on.ca) function [img,hdr] = load_untouch_nii_img(hdr,filetype,fileprefix,machine,img_idx,dim5_idx,dim6_idx,dim7_idx,old_RGB,slice_idx) if ~exist('hdr','var') | ~exist('filetype','var') | ~exist('fileprefix','var') | ~exist('machine','var') error('U...
github
TimVanMourik/OpenFmriAnalysis-master
load_untouch_nii.m
.m
OpenFmriAnalysis-master/External/NifTI/load_untouch_nii.m
6,182
utf_8
93108a725d2e357d773c8aa0acf71328
% Load NIFTI or ANALYZE dataset, but not applying any appropriate affine % geometric transform or voxel intensity scaling. % % Although according to NIFTI website, all those header information are % supposed to be applied to the loaded NIFTI image, there are some % situations that people do want to leave the origi...
github
TimVanMourik/OpenFmriAnalysis-master
collapse_nii_scan.m
.m
OpenFmriAnalysis-master/External/NifTI/collapse_nii_scan.m
6,778
utf_8
64b1cb0f7cd9e095d3c11ca66453df69
% Collapse multiple single-scan NIFTI files into a multiple-scan NIFTI file % % Usage: collapse_nii_scan(scan_file_pattern, [collapsed_fileprefix], [scan_file_folder]) % % Here, scan_file_pattern should look like: 'myscan_0*.img' % If collapsed_fileprefix is omit, 'multi_scan' will be used % If scan_file_folder is...
github
TimVanMourik/OpenFmriAnalysis-master
rri_orient_ui.m
.m
OpenFmriAnalysis-master/External/NifTI/rri_orient_ui.m
5,384
utf_8
e1196b81940d9f93fbdb43c33799e587
% Return orientation of the current image: % orient is orientation 1x3 matrix, in that: % Three elements represent: [x y z] % Element value: 1 - Left to Right; 2 - Posterior to Anterior; % 3 - Inferior to Superior; 4 - Right to Left; % 5 - Anterior to Posterior; 6 - Superior to Inferior; % e.g.: % Standard RAS Or...
github
TimVanMourik/OpenFmriAnalysis-master
load_untouch0_nii_hdr.m
.m
OpenFmriAnalysis-master/External/NifTI/load_untouch0_nii_hdr.m
8,093
utf_8
3de9ff6a1da47b56ae680e7660eaa041
% internal function % - Jimmy Shen (jimmy@rotman-baycrest.on.ca) function hdr = load_nii_hdr(fileprefix, machine) fn = sprintf('%s.hdr',fileprefix); fid = fopen(fn,'r',machine); if fid < 0, msg = sprintf('Cannot open file %s.',fn); error(msg); else fseek(fid,0,'bof'); hdr =...
github
TimVanMourik/OpenFmriAnalysis-master
load_nii.m
.m
OpenFmriAnalysis-master/External/NifTI/load_nii.m
6,808
utf_8
d098a5dbea3cd4ad76cea624ffbef9db
% Load NIFTI or ANALYZE dataset. Support both *.nii and *.hdr/*.img % file extension. If file extension is not provided, *.hdr/*.img will % be used as default. % % A subset of NIFTI transform is included. For non-orthogonal rotation, % shearing etc., please use 'reslice_nii.m' to reslice the NIFTI file. % It will...
github
TimVanMourik/OpenFmriAnalysis-master
unxform_nii.m
.m
OpenFmriAnalysis-master/External/NifTI/unxform_nii.m
1,181
utf_8
a77d113be34b09d588b2eb326a3c65c8
% Undo the flipping and rotations performed by xform_nii; spit back only % the raw img data block. Initial cut will only deal with 3D volumes % strongly assume we have called xform_nii to write down the steps used % in xform_nii. % % Usage: a = load_nii('original_name'); % manipulate a.img to make array...
github
TimVanMourik/OpenFmriAnalysis-master
load_untouch_nii_hdr.m
.m
OpenFmriAnalysis-master/External/NifTI/load_untouch_nii_hdr.m
8,522
utf_8
2d4bc8c8ffb83b37daf1e8dd87c108e6
% internal function % - Jimmy Shen (jimmy@rotman-baycrest.on.ca) function hdr = load_nii_hdr(fileprefix, machine, filetype) if filetype == 2 fn = sprintf('%s.nii',fileprefix); if ~exist(fn) msg = sprintf('Cannot find file "%s.nii".', fileprefix); error(msg); end else ...
github
TimVanMourik/OpenFmriAnalysis-master
save_nii_ext.m
.m
OpenFmriAnalysis-master/External/NifTI/save_nii_ext.m
977
utf_8
b60a98ab7537a883dc3ffef3175f19ae
% Save NIFTI header extension. % % Usage: save_nii_ext(ext, fid) % % ext - struct with NIFTI header extension fields. % % NIFTI data format can be found on: http://nifti.nimh.nih.gov % % - Jimmy Shen (jimmy@rotman-baycrest.on.ca) % function save_nii_ext(ext, fid) if ~exist('ext','var') | ~exist('fid','var') ...
github
TimVanMourik/OpenFmriAnalysis-master
view_nii_menu.m
.m
OpenFmriAnalysis-master/External/NifTI/view_nii_menu.m
14,415
utf_8
32dd591fa1070721f0255f47f6e02510
% Imbed Zoom, Interp, and Info menu to view_nii window. % % Usage: view_nii_menu(fig); % % - Jimmy Shen (jimmy@rotman-baycrest.on.ca) % %-------------------------------------------------------------------- function menu_hdl = view_nii_menu(fig, varargin) if isnumeric(fig) menu_hdl = init(fig); retur...
github
TimVanMourik/OpenFmriAnalysis-master
save_untouch_header_only.m
.m
OpenFmriAnalysis-master/External/NifTI/save_untouch_header_only.m
2,132
utf_8
5f0515ef6a35f171bc8371d0f3fd365d
% This function is only used to save Analyze or NIfTI header that is % ended with .hdr and loaded by load_untouch_header_only.m. If you % have NIfTI file that is ended with .nii and you want to change its % header only, you can use load_untouch_nii / save_untouch_nii pair. % % Usage: save_untouch_header_only(hd...
github
TimVanMourik/OpenFmriAnalysis-master
pad_nii.m
.m
OpenFmriAnalysis-master/External/NifTI/pad_nii.m
3,712
utf_8
0b9de8feba6840e2d8ea1ab1752747c7
% PAD_NII: Pad the NIfTI volume from any of the 6 sides % % Usage: nii = pad_nii(nii, [option]) % % Inputs: % % nii - NIfTI volume. % % option - struct instructing how many voxel to be padded from which side. % % option.pad_from_L = ( number of voxel ) % option.pad_from_R = ( number of voxel ) % option.pad_from_P ...
github
TimVanMourik/OpenFmriAnalysis-master
load_nii_hdr.m
.m
OpenFmriAnalysis-master/External/NifTI/load_nii_hdr.m
10,031
utf_8
e95839e314863f7ee463cc2626dd447c
% internal function % - Jimmy Shen (jimmy@rotman-baycrest.on.ca) function [hdr, filetype, fileprefix, machine] = load_nii_hdr(fileprefix) if ~exist('fileprefix','var'), error('Usage: [hdr, filetype, fileprefix, machine] = load_nii_hdr(filename)'); end machine = 'ieee-le'; new_ext = 0; if fin...
github
TimVanMourik/OpenFmriAnalysis-master
save_untouch_slice.m
.m
OpenFmriAnalysis-master/External/NifTI/save_untouch_slice.m
19,683
utf_8
364468e5dbd3790c1aadf9a768534f1f
% Save back to the original image with a portion of slices that was % loaded by "load_untouch_nii". You can process those slices matrix % in any way, as long as their dimension is not altered. % % Usage: save_untouch_slice(slice, filename, ... % slice_idx, [img_idx], [dim5_idx], [dim6_idx], [dim7_idx]) % % slice ...
github
TimVanMourik/OpenFmriAnalysis-master
load_nii_img.m
.m
OpenFmriAnalysis-master/External/NifTI/load_nii_img.m
12,328
utf_8
b1b9dd2838a8f217b10fefdc8a931d5e
% internal function % - Jimmy Shen (jimmy@rotman-baycrest.on.ca) function [img,hdr] = load_nii_img(hdr,filetype,fileprefix,machine,img_idx,dim5_idx,dim6_idx,dim7_idx,old_RGB) if ~exist('hdr','var') | ~exist('filetype','var') | ~exist('fileprefix','var') | ~exist('machine','var') error('Usage: [img,hdr] = ...
github
TimVanMourik/OpenFmriAnalysis-master
bresenham_line3d.m
.m
OpenFmriAnalysis-master/External/NifTI/bresenham_line3d.m
4,493
utf_8
c19f06df423676afeb59762ac55c0c2f
% Generate X Y Z coordinates of a 3D Bresenham's line between % two given points. % % A very useful application of this algorithm can be found in the % implementation of Fischer's Bresenham interpolation method in my % another program that can rotate three dimensional image volume % with an affine matrix: % http...
github
TimVanMourik/OpenFmriAnalysis-master
make_nii.m
.m
OpenFmriAnalysis-master/External/NifTI/make_nii.m
6,849
utf_8
3c7c8b81655c111a9ce4b82086bde4f5
% Make NIfTI structure specified by an N-D matrix. Usually, N is 3 for % 3D matrix [x y z], or 4 for 4D matrix with time series [x y z t]. % Optional parameters can also be included, such as: voxel_size, % origin, datatype, and description. % % Once the NIfTI structure is made, it can be saved into NIfTI fil...
github
TimVanMourik/OpenFmriAnalysis-master
verify_nii_ext.m
.m
OpenFmriAnalysis-master/External/NifTI/verify_nii_ext.m
1,676
utf_8
db3d32ecba688905185f5ed01b409fd1
% Verify NIFTI header extension to make sure that each extension section % must be an integer multiple of 16 byte long that includes the first 8 % bytes of esize and ecode. If the length of extension section is not the % above mentioned case, edata should be padded with all 0. % % Usage: [ext, esize_total] = verif...
github
TimVanMourik/OpenFmriAnalysis-master
get_nii_frame.m
.m
OpenFmriAnalysis-master/External/NifTI/get_nii_frame.m
4,333
utf_8
8b0cba9d07733a6f82753b0c40b51107
% Return time frame of a NIFTI dataset. Support both *.nii and % *.hdr/*.img file extension. If file extension is not provided, % *.hdr/*.img will be used as default. % % It is a lightweighted "load_nii_hdr", and is equivalent to % hdr.dime.dim(5) % % Usage: [ total_scan ] = get_nii_frame(filename) % % filen...
github
TimVanMourik/OpenFmriAnalysis-master
flip_lr.m
.m
OpenFmriAnalysis-master/External/NifTI/flip_lr.m
3,484
utf_8
a0b2d0189d90339a841863efeb60681a
% When you load any ANALYZE or NIfTI file with 'load_nii.m', and view % it with 'view_nii.m', you may find that the image is L-R flipped. % This is because of the confusion of radiological and neurological % convention in the medical image before NIfTI format is adopted. You % can find more details from: % % http...
github
TimVanMourik/OpenFmriAnalysis-master
save_nii.m
.m
OpenFmriAnalysis-master/External/NifTI/save_nii.m
9,404
utf_8
88aa93174482539fe993ac335fb01541
% Save NIFTI dataset. Support both *.nii and *.hdr/*.img file extension. % If file extension is not provided, *.hdr/*.img will be used as default. % % Usage: save_nii(nii, filename, [old_RGB]) % % nii.hdr - struct with NIFTI header fields (from load_nii.m or make_nii.m) % % nii.img - 3D (or 4D) matrix of NIFTI...
github
TimVanMourik/OpenFmriAnalysis-master
rri_file_menu.m
.m
OpenFmriAnalysis-master/External/NifTI/rri_file_menu.m
3,974
utf_8
1ec91620ceb4108dde9a63945380028f
% Imbed a file menu to any figure. If file menu exist, it will append % to the existing file menu. This file menu includes: Copy to clipboard, % print, save, close etc. % % Usage: rri_file_menu(fig); % % rri_file_menu(fig,0) means no 'Close' menu. % % - Jimmy Shen (jimmy@rotman-baycrest.on.ca) % %---------...
github
TimVanMourik/OpenFmriAnalysis-master
reslice_nii.m
.m
OpenFmriAnalysis-master/External/NifTI/reslice_nii.m
9,817
utf_8
05783cd4f127a22486db67a9cc89ad2a
% The basic application of the 'reslice_nii.m' program is to perform % any 3D affine transform defined by a NIfTI format image. % % In addition, the 'reslice_nii.m' program can also be applied to % generate an isotropic image from either a NIfTI format image or % an ANALYZE format image. % % The resliced NIfTI fi...
github
TimVanMourik/OpenFmriAnalysis-master
save_untouch_nii.m
.m
OpenFmriAnalysis-master/External/NifTI/save_untouch_nii.m
6,494
utf_8
50fa95cbb847654356241a853328f912
% Save NIFTI or ANALYZE dataset that is loaded by "load_untouch_nii.m". % The output image format and file extension will be the same as the % input one (NIFTI.nii, NIFTI.img or ANALYZE.img). Therefore, any file % extension that you specified will be ignored. % % Usage: save_untouch_nii(nii, filename) % % nii -...
github
TimVanMourik/OpenFmriAnalysis-master
view_nii.m
.m
OpenFmriAnalysis-master/External/NifTI/view_nii.m
139,608
utf_8
74f9dea7539a45a7993beb22becf2fa2
% VIEW_NII: Create or update a 3-View (Front, Top, Side) of the % brain data that is specified by nii structure % % Usage: status = view_nii([h], nii, [option]) or % status = view_nii(h, [option]) % % Where, h is the figure on which the 3-View will be plotted; % nii is the brain data in NIFTI format; % option is...
github
TimVanMourik/OpenFmriAnalysis-master
mat_into_hdr.m
.m
OpenFmriAnalysis-master/External/NifTI/mat_into_hdr.m
2,608
utf_8
d53006b93ff90a4a5561d16ff2f4e9a6
%MAT_INTO_HDR The old versions of SPM (any version before SPM5) store % an affine matrix of the SPM Reoriented image into a matlab file % (.mat extension). The file name of this SPM matlab file is the % same as the SPM Reoriented image file (.img/.hdr extension). % % This program will convert the ANALYZE 7.5 SPM Reor...
github
TimVanMourik/OpenFmriAnalysis-master
xform_nii.m
.m
OpenFmriAnalysis-master/External/NifTI/xform_nii.m
18,107
utf_8
29a1cff91c944d6a93e5101946a5da4d
% internal function % 'xform_nii.m' is an internal function called by "load_nii.m", so % you do not need run this program by yourself. It does simplified % NIfTI sform/qform affine transform, and supports some of the % affine transforms, including translation, reflection, and % orthogonal rotation (N*90 degree...
github
TimVanMourik/OpenFmriAnalysis-master
make_ana.m
.m
OpenFmriAnalysis-master/External/NifTI/make_ana.m
5,455
utf_8
2f62999cbcad72129c892135ff492a1e
% Make ANALYZE 7.5 data structure specified by a 3D or 4D matrix. % Optional parameters can also be included, such as: voxel_size, % origin, datatype, and description. % % Once the ANALYZE structure is made, it can be saved into ANALYZE 7.5 % format data file using "save_untouch_nii" command (for more detail,...
github
TimVanMourik/OpenFmriAnalysis-master
extra_nii_hdr.m
.m
OpenFmriAnalysis-master/External/NifTI/extra_nii_hdr.m
7,830
utf_8
853f39f00cbf133e90d0f2cf08d79488
% Decode extra NIFTI header information into hdr.extra % % Usage: hdr = extra_nii_hdr(hdr) % % hdr can be obtained from load_nii_hdr % % NIFTI data format can be found on: http://nifti.nimh.nih.gov % % - Jimmy Shen (jimmy@rotman-baycrest.on.ca) % function hdr = extra_nii_hdr(hdr) switch hdr.dime.datatype ca...
github
TimVanMourik/OpenFmriAnalysis-master
rri_xhair.m
.m
OpenFmriAnalysis-master/External/NifTI/rri_xhair.m
2,208
utf_8
b3ae9df90d43e5d9538b6b135fa8af20
% rri_xhair: create a pair of full_cross_hair at point [x y] in % axes h_ax, and return xhair struct % % Usage: xhair = rri_xhair([x y], xhair, h_ax); % % If omit xhair, rri_xhair will create a pair of xhair; otherwise, % rri_xhair will update the xhair. If omit h_ax, current axes will % be used....
github
TimVanMourik/OpenFmriAnalysis-master
save_untouch_nii_hdr.m
.m
OpenFmriAnalysis-master/External/NifTI/save_untouch_nii_hdr.m
8,514
utf_8
582f82c471a9a8826eda59354f61dd1a
% internal function % - Jimmy Shen (jimmy@rotman-baycrest.on.ca) function save_nii_hdr(hdr, fid) if ~isequal(hdr.hk.sizeof_hdr,348), error('hdr.hk.sizeof_hdr must be 348.'); end write_header(hdr, fid); return; % save_nii_hdr %---------------------------------------------------------------...
github
TimVanMourik/OpenFmriAnalysis-master
expand_nii_scan.m
.m
OpenFmriAnalysis-master/External/NifTI/expand_nii_scan.m
1,333
utf_8
748da05d09c1a005401c67270c4b94ab
% Expand a multiple-scan NIFTI file into multiple single-scan NIFTI files % % Usage: expand_nii_scan(multi_scan_filename, [img_idx], [path_to_save]) % % NIFTI data format can be found on: http://nifti.nimh.nih.gov % % - Jimmy Shen (jimmy@rotman-baycrest.on.ca) % function expand_nii_scan(filename, img_idx, newpath) ...
github
TimVanMourik/OpenFmriAnalysis-master
load_untouch_header_only.m
.m
OpenFmriAnalysis-master/External/NifTI/load_untouch_header_only.m
7,068
utf_8
8996c72db42b01029c92a4ecd88f4b21
% Load NIfTI / Analyze header without applying any appropriate affine % geometric transform or voxel intensity scaling. It is equivalent to % hdr field when using load_untouch_nii to load dataset. Support both % *.nii and *.hdr file extension. If file extension is not provided, % *.hdr will be used as default. % ...
github
TimVanMourik/OpenFmriAnalysis-master
bipolar.m
.m
OpenFmriAnalysis-master/External/NifTI/bipolar.m
2,145
utf_8
295f87ece96ca4c5dff8dce4cd912a34
%BIPOLAR returns an M-by-3 matrix containing a blue-red colormap, in % in which red stands for positive, blue stands for negative, % and white stands for 0. % % Usage: cmap = bipolar(M, lo, hi, contrast); or cmap = bipolar; % % cmap: output M-by-3 matrix for BIPOLAR colormap. % M: number of shades in the color...
github
TimVanMourik/OpenFmriAnalysis-master
save_nii_hdr.m
.m
OpenFmriAnalysis-master/External/NifTI/save_nii_hdr.m
9,270
utf_8
f97c194f5bfc667eb4f96edf12be02a7
% internal function % - Jimmy Shen (jimmy@rotman-baycrest.on.ca) function save_nii_hdr(hdr, fid) if ~exist('hdr','var') | ~exist('fid','var') error('Usage: save_nii_hdr(hdr, fid)'); end if ~isequal(hdr.hk.sizeof_hdr,348), error('hdr.hk.sizeof_hdr must be 348.'); end if hdr.h...
github
TimVanMourik/OpenFmriAnalysis-master
tvm_useFlirt.m
.m
OpenFmriAnalysis-master/Development/tvm_useFlirt.m
6,647
utf_8
9a55fb2820aef546feee84e8fdf52711
function tvm_useFlirt(configuration) % TVM_REGISTERVOLUMES % TVM_REGISTERVOLUMES(configuration) % % % Copyright (C) Tim van Mourik, 2014, DCCN % %% Parse configuration subjectDirectory = tvm_getOption(configuration, 'i_SubjectDirectory'); %no default referenceFile = fullfile(subjectDirectory, ...
github
cemsaz/NGSIM-trajectories-master
getTrajectoryPairs.m
.m
NGSIM-trajectories-master/getTrajectoryPairs.m
2,177
utf_8
d433d0a39422c8a863c31b7fad41b65c
function table = getTrajectoryPairs(data, lane, minTrajectoryLenght) % Filter the data based on the lane and make sure follower - leader % fields are not -1 lane_data = data((data(:,3)==lane & data(:,9)~=-1 & data(:,10)~=-1),:); unique_vehicles = unique(lane_data(:,1)); pairArr = []; ...
github
huajh/quad_kanpsack_brucker-master
quad_kanpsack_brucker.m
.m
quad_kanpsack_brucker-master/quad_kanpsack_brucker.m
2,856
utf_8
ad8928bf5a76660050b43e0e21d6c094
function [ x ] = quad_kanpsack_brucker( d,a,b,b0,l,u ) %QUAD_KANPSACK_BRUCKER Summary of this function goes here % % x = quad_kanpsack_brucker(v, b) returns the vector x which is the solution % to the following constrained minimization problem: % % min sum_i^n 1/2*d_i*x_i^2 - a_i x_i % s.t. sum_i^n b_i*x_i ...
github
syyeung/pyvision-master
showModel.m
.m
pyvision-master/experiments/showModel.m
1,025
utf_8
32ac42289acd5878575a8909f2e86946
function showModel(ww,sc) if nargin < 2, %Set the scale so that the maximum weight is 255 sc = max(abs(ww(:))); end sc = 255/sc; siz = 20; im1 = HOGpicture( ww,siz)*sc; im2 = HOGpicture(-ww,siz)*sc; %Combine into 1 image buff = 10; im1 = padarray(im1,[buff buff],200,'both'); im2 = padarray(im2,[buff buff],200,...
github
pengsun/MatConvDAG-master
mnist_small_te_all.m
.m
MatConvDAG-master/examples2/mnist_small_te_all.m
1,819
utf_8
b47f7455b92dd779789625e7bc61a5ce
function [err_ep, err] = mnist_small_te_all(varargin) % config % TODO: add more properties here if ( nargin==0 ) ep = 1 : 5; batch_sz = 128; dir_mo = fullfile(dag_path.root,'\examples2\mo_zoo\mnist_small\lenetTriCon'); fn_data = fullfile(dag_path.root,'\examples2\data\mnist_small_cv5\imdb.mat'); fn_mo_tmpl...
github
pengsun/MatConvDAG-master
mnist_small_tr_lenetDropout.m
.m
MatConvDAG-master/examples2/mnist_small_tr_lenetDropout.m
3,192
utf_8
c29bd452fc6f669ade7ab15d6688bf9d
function mnist_small_tr_lenetDropout() %% init dag: from file or from scratch beg_epoch = 3; dir_mo = fullfile(dag_path.root,'examples2/mo_zoo/mnist_small/lenetDropout'); fn_mo = fullfile(dir_mo, sprintf('dag_epoch_%d.mat', beg_epoch-1) ); if ( exist(fn_mo, 'file') ) h = create_dag_from_file (fn_mo); flag_from_scra...
github
pengsun/MatConvDAG-master
mnist_small_tr_lenetTriCon.m
.m
MatConvDAG-master/examples2/mnist_small_tr_lenetTriCon.m
1,781
utf_8
8c8adbf8c98cfdf8aa5493e47752d39a
function mnist_small_tr_lenetTriCon() %% init dag: from file or from scratch beg_epoch = 8; dir_mo = fullfile(dag_path.root,'examples2/mo_zoo/mnist_small/lenetTriCon'); fn_mo = fullfile(dir_mo, sprintf('dag_epoch_%d.mat', beg_epoch-1) ); if ( exist(fn_mo, 'file') ) h = create_dag_from_file (fn_mo); else beg_epoch =...
github
pengsun/MatConvDAG-master
mnist_small_te_all.m
.m
MatConvDAG-master/examples/mnist_small_te_all.m
1,782
utf_8
5d8bf8630626022149cca99b2149a49e
function [err_ep, err] = mnist_small_te_all(varargin) % config % TODO: add more properties here if ( nargin==0 ) ep = 1 : 5; batch_sz = 128; dir_mo = fullfile(dag_path.root,'\examples\mo_zoo\mnist_small\lenetTriCon'); fn_data = fullfile(dag_path.root,'\examples\data\mnist_small_cv5\imdb.mat'); fn_mo_tmpl =...
github
pengsun/MatConvDAG-master
mnist_small_tr_lenetDropout.m
.m
MatConvDAG-master/examples/mnist_small_tr_lenetDropout.m
2,662
utf_8
8698b1d0846e4bd5af8859629e17ddd6
function mnist_small_tr_lenetDropout() %% put all the stuff in a static method if you like %% init dag: from file or from scratch beg_epoch = 2; dir_mo = fullfile(dag_path.root, 'examples/mo_zoo/mnist_small/lenetDropout'); fn_mo = fullfile(dir_mo, sprintf('dag_epoch_%d.mat', beg_epoch-1) ); if ( exist(fn_mo, 'file') ) ...
github
pengsun/MatConvDAG-master
cifar_tr.m
.m
MatConvDAG-master/examples/cifar_tr.m
2,709
utf_8
1fe00e5c92f5b833913d47031dedaae8
function cifar_tr() %% init dag: from file or from scratch beg_epoch = 4; dir_mo = fullfile(dag_path.root,'examples/mo_zoo/cifar/cifar'); fn_mo = fullfile(dir_mo, sprintf('dag_epoch_%d.mat', beg_epoch-1) ); if ( exist(fn_mo, 'file') ) h = create_dag_from_file (fn_mo); else beg_epoch = 1; h = create_dag_from_scra...