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 | Vincentqyw/light-field-TB-master | LFFindCalInfo.m | .m | light-field-TB-master/LFToolbox0.4/SupportFunctions/LFFindCalInfo.m | 2,572 | utf_8 | c7daafa528ed72904c233ed5ad834fe6 | % LFFindCalInfo - Find and load the calibration info file appropriate for a specific camera, zoom and focus
%
% Usage:
%
% [CalInfo, RectOptions] = LFFindCalInfo( LFMetadata, RectOptions )
%
% This uses a calibration info database to locate a calibration appropriate to a given camera under a given set of zoom
% a... |
github | Vincentqyw/light-field-TB-master | LFConvertToFloat.m | .m | light-field-TB-master/LFToolbox0.4/SupportFunctions/LFConvertToFloat.m | 481 | utf_8 | 347631d509cdee15114cff38f1046966 | % LFConvertToFloat - Helper function to convert light fields to floating-point representation
%
% Integer inputs get normalized to a max value of 1.
% Part of LF Toolbox v0.4 released 12-Feb-2015
% Copyright (c) 2013-2015 Donald G. Dansereau
function LF = LFConvertToFloat( LF, Precision )
Precision = LFDefaultVal('P... |
github | Vincentqyw/light-field-TB-master | LFUnpackRawBuffer.m | .m | light-field-TB-master/LFToolbox0.4/SupportFunctions/LFUnpackRawBuffer.m | 2,263 | utf_8 | 6edde771ccfa5abb4c1b0242c9ee9af9 | % LFUnpackRawBuffer - Unpack a buffer of packed raw binary data into an image
%
% Usage:
%
% ImgOut = LFUnpackRawBuffer( Buff, BitPacking, ImgSize )
%
% Used by LFReadRaw and LFReadLFP, this helper function unpacks a raw binary data buffer in one of several formats.
%
% Inputs :
%
% Buff : Buffer of chars t... |
github | Vincentqyw/light-field-TB-master | LFCalFindCheckerCorners.m | .m | light-field-TB-master/LFToolbox0.4/SupportFunctions/LFCalFindCheckerCorners.m | 8,815 | utf_8 | 52b7cb09809df1fe8683b8964e71a159 | % LFCalFindCheckerCorners - locates corners in checkerboard images, called by LFUtilCalLensletCam
%
% Usage:
% CalOptions = LFCalFindCheckerCorners( InputPath, CalOptions )
% CalOptions = LFCalFindCheckerCorners( InputPath )
%
% This function is called by LFUtilCalLensletCam to identify the corners in a set of... |
github | Vincentqyw/light-field-TB-master | LFSelectFromDatabase.m | .m | light-field-TB-master/LFToolbox0.4/SupportFunctions/LFSelectFromDatabase.m | 2,288 | utf_8 | f72e49d5261aad46cd204a67ea981f14 | % LFSelectFromDatabase - support function for selecting white image/calibration by matching serial/zoom/focus
%
% Usage:
%
% SelectedCamInfo = LFSelectFromDatabase( DesiredCamInfo, DatabaseFname )
%
% This helper function is used when decoding a light field to select an appropriate white image,
% and when rectif... |
github | Vincentqyw/light-field-TB-master | LFMapRectifiedToMeasured.m | .m | light-field-TB-master/LFToolbox0.4/SupportFunctions/LFMapRectifiedToMeasured.m | 2,589 | utf_8 | 5e58f495c8db32d93abdde790c719aff | % LFMapRectifiedToMeasured - Applies a calibrated camera model to map desired samples to measured samples
%
% Usage:
%
% InterpIdx = LFMapRectifiedToMeasured( InterpIdx, CalInfo, RectOptions )
%
% Helper function used by LFCalRectifyLF. Based on a calibrated camera model, including distortion parameters and a
%... |
github | Vincentqyw/light-field-TB-master | LFCalRefine.m | .m | light-field-TB-master/LFToolbox0.4/SupportFunctions/LFCalRefine.m | 16,821 | utf_8 | ad30626be45ef6d56dafc860da607c7c | % LFCalRefine - refine calibration by minimizing point/ray reprojection error, called by LFUtilCalLensletCam
%
% Usage:
% CalOptions = LFCalRefine( InputPath, CalOptions )
%
% This function is called by LFUtilCalLensletCam to refine an initial camera model and pose
% estimates through optimization. This follows t... |
github | Vincentqyw/light-field-TB-master | LFNormalizedFreqAxis.m | .m | light-field-TB-master/LFToolbox0.4/SupportFunctions/LFNormalizedFreqAxis.m | 579 | utf_8 | 02656a40ea9705a7d443208d9349a19e | % LFNormalizedFreqAxis - Helper function to construct a frequency axis
%
% Output range is from -0.5 to 0.5. This is designed so that the zero frequency matches the fftshifted output of the
% fft algorithm.
% Part of LF Toolbox v0.4 released 12-Feb-2015
% Copyright (c) 2013-2015 Donald G. Dansereau
function f = LFN... |
github | shivamsaboo17/MyMachine-master | submit.m | .m | MyMachine-master/Coursehub/Coursera_IntroToML_AndrewNG/AndrewNG/ex1/submit.m | 1,876 | utf_8 | 8d1c467b830a89c187c05b121cb8fbfd | function submit()
addpath('./lib');
conf.assignmentSlug = 'linear-regression';
conf.itemName = 'Linear Regression with Multiple Variables';
conf.partArrays = { ...
{ ...
'1', ...
{ 'warmUpExercise.m' }, ...
'Warm-up Exercise', ...
}, ...
{ ...
'2', ...
{ 'computeCost.m... |
github | shivamsaboo17/MyMachine-master | submitWithConfiguration.m | .m | MyMachine-master/Coursehub/Coursera_IntroToML_AndrewNG/AndrewNG/ex1/lib/submitWithConfiguration.m | 5,562 | utf_8 | 4ac719ea6570ac228ea6c7a9c919e3f5 | function submitWithConfiguration(conf)
addpath('./lib/jsonlab');
parts = parts(conf);
fprintf('== Submitting solutions | %s...\n', conf.itemName);
tokenFile = 'token.mat';
if exist(tokenFile, 'file')
load(tokenFile);
[email token] = promptToken(email, token, tokenFile);
else
[email token] = p... |
github | shivamsaboo17/MyMachine-master | savejson.m | .m | MyMachine-master/Coursehub/Coursera_IntroToML_AndrewNG/AndrewNG/ex1/lib/jsonlab/savejson.m | 17,462 | utf_8 | 861b534fc35ffe982b53ca3ca83143bf | function json=savejson(rootname,obj,varargin)
%
% json=savejson(rootname,obj,filename)
% or
% json=savejson(rootname,obj,opt)
% json=savejson(rootname,obj,'param1',value1,'param2',value2,...)
%
% convert a MATLAB object (cell, struct or array) into a JSON (JavaScript
% Object Notation) string
%
% author: Qianqian Fa... |
github | shivamsaboo17/MyMachine-master | loadjson.m | .m | MyMachine-master/Coursehub/Coursera_IntroToML_AndrewNG/AndrewNG/ex1/lib/jsonlab/loadjson.m | 18,732 | ibm852 | ab98cf173af2d50bbe8da4d6db252a20 | function data = loadjson(fname,varargin)
%
% data=loadjson(fname,opt)
% or
% data=loadjson(fname,'param1',value1,'param2',value2,...)
%
% parse a JSON (JavaScript Object Notation) file or string
%
% authors:Qianqian Fang (fangq<at> nmr.mgh.harvard.edu)
% created on 2011/09/09, including previous works from
%
% ... |
github | shivamsaboo17/MyMachine-master | loadubjson.m | .m | MyMachine-master/Coursehub/Coursera_IntroToML_AndrewNG/AndrewNG/ex1/lib/jsonlab/loadubjson.m | 15,574 | utf_8 | 5974e78e71b81b1e0f76123784b951a4 | function data = loadubjson(fname,varargin)
%
% data=loadubjson(fname,opt)
% or
% data=loadubjson(fname,'param1',value1,'param2',value2,...)
%
% parse a JSON (JavaScript Object Notation) file or string
%
% authors:Qianqian Fang (fangq<at> nmr.mgh.harvard.edu)
% created on 2013/08/01
%
% $Id: loadubjson.m 460 2015-01-... |
github | shivamsaboo17/MyMachine-master | saveubjson.m | .m | MyMachine-master/Coursehub/Coursera_IntroToML_AndrewNG/AndrewNG/ex1/lib/jsonlab/saveubjson.m | 16,123 | utf_8 | 61d4f51010aedbf97753396f5d2d9ec0 | function json=saveubjson(rootname,obj,varargin)
%
% json=saveubjson(rootname,obj,filename)
% or
% json=saveubjson(rootname,obj,opt)
% json=saveubjson(rootname,obj,'param1',value1,'param2',value2,...)
%
% convert a MATLAB object (cell, struct or array) into a Universal
% Binary JSON (UBJSON) binary string
%
% author... |
github | Macquarie-MEG-Research/coreg-master | coreg_yokogawa_icp_paul.m | .m | coreg-master/coreg_yokogawa_icp_paul.m | 22,340 | utf_8 | 39b893f0f50b02e736edf9158bb0510b | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% coreg_yokogawa_icp is a function to coregister a structural MRI with MEG data
% and associated headshape information
%
% Written by Robert Seymour Oct 2017 (some subfunctions written by Paul
% Sowman)
%
% INPUTS:
% - dir_name ... |
github | Macquarie-MEG-Research/coreg-master | coreg_yokogawa_icp_adjust_weights.m | .m | coreg-master/coreg_yokogawa_icp_adjust_weights.m | 26,869 | utf_8 | 3e9181b9d9937fa72a65e09d073ee213 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% coreg_yokogawa_icp_adjust_weights is a function to coregister a structural
% MRI with MEG data and associated headshape information
%
% Written by Robert Seymour Oct 2017 - July 2018 (some subfunctions
% contributed by Paul Sowman)
... |
github | Macquarie-MEG-Research/coreg-master | coreg_yokogawa_icp.m | .m | coreg-master/coreg_yokogawa_icp.m | 22,584 | utf_8 | 8138e2134eca27e911561b8ecaeed65f | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% coreg_yokogawa_icp is a function to coregister a structural MRI with MEG data
% and associated headshape information
%
% Written by Robert Seymour Oct/Nov 2017 (some subfunctions written by Paul
% Sowman)
%
% INPUTS:
% - dir_name ... |
github | Macquarie-MEG-Research/coreg-master | rotate_about_z.m | .m | coreg-master/rotate_about_z.m | 639 | utf_8 | 0ac9e04e0dc642327777e1e34c1fa83b | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% rotate_about_z - make a rotation matix for arbitrary rotation in degrees
% around z axis
%
% Written by Paul Sowman Oct 2017 (http://web.iitd.ac.in/~hegde/cad/lecture/L6_3dtrans.pdf - page 4)
%
% INPUTS:
% - deg = degrees of ro... |
github | Macquarie-MEG-Research/coreg-master | coreg_elekta_icp_adjust_weights.m | .m | coreg-master/coreg_elekta_icp_adjust_weights.m | 26,871 | utf_8 | 9efae39ef831a6a6034f4f1c34f5c6e0 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% coreg_yokogawa_icp_adjust_weights is a function to coregister a structural
% MRI with MEG data and associated headshape information
%
% Written by Robert Seymour Oct 2017 - Feb 2018 (some subfunctions
% contributed by Paul Sowman)
%... |
github | Macquarie-MEG-Research/coreg-master | ft_transform_geometry_PFS_hacked.m | .m | coreg-master/realign_MEG_sensors/ft_transform_geometry_PFS_hacked.m | 3,910 | utf_8 | 9d375f780ec2a6c15b958746c75a7a24 | function [output] = ft_transform_geometry_PFS_hacked(transform, input)
% FT_TRANSFORM_GEOMETRY applies a homogeneous coordinate transformation to
% a structure with geometric information, for example a volume conduction model
% for the head, gradiometer of electrode structure containing EEG or MEG
% sensor positions a... |
github | philippboehmsturm/antx-master | antlink.m | .m | antx-master/antlink.m | 902 | utf_8 | 2a25c9eac9e7ffb28b6adb6c0dff143a |
%% link ANT-TOOLBOX
% antlink or antlink(1) to setpath of ANT-TBX
% antlink(0) to remove path of ANT-TBX
function antlink(arg)
if exist('arg')~=1
arg=1;
end
if arg==1 %addPath
pa=pwd;
addpath(genpath(fullfile(pa,'freiburgLight', 'matlab', 'diffusion' ,'common')))
addpath(genpath(fullfi... |
github | philippboehmsturm/antx-master | readBrukerRaw.m | .m | antx-master/mritools/pvtools_bruker/pvtools_bruker/functions/readBrukerRaw.m | 17,313 | utf_8 | bc33cde79bf30225c54992aa788ff061 | function [ data , addInfo] = readBrukerRaw(Acqp, varargin)
% function [ data , addInfo ] = readBrukerRaw(Acqp, [path_to_DataFile], ['specified_NRs', NR_array],
% ['specified_Jobs', job_array], ['precision', precision_string])
% Input:
% Acqp (struct): An acqp struct as generated by... |
github | philippboehmsturm/antx-master | brViewer.m | .m | antx-master/mritools/pvtools_bruker/pvtools_bruker/functions/brViewer.m | 42,785 | utf_8 | bffb4921f9d4903346f799e32482a19d | function f2=brViewer( dataset, varargin)
% f2=brViewer( dataset, ['figuretitle', 'yourfigurename'], ['imscale', imscale], ['res_factor', res_factor])
% dataset : in kSpace with sizes:
% (dim1, dim2, dim3, NumberOfObjects, NumberOfRepetitions, NumberOfChannels)
% OR
% ... |
github | philippboehmsturm/antx-master | readBrukerParamFile.m | .m | antx-master/mritools/pvtools_bruker/pvtools_bruker/functions/readBrukerParamFile.m | 12,998 | utf_8 | 82e420a2ecbc30090ca427cb80bfe7a4 | function [paramStruct,headers]=readBrukerParamFile(filename)
% Reads Bruker JCAMP parameter files.
% especially: acqp and method files.
%
% Usage: [paramStruct,headers]=readBrukerParamFile(filename)
%
% paramStruct : Structure containing parameter variables.
% The parameter names are derived from the JC... |
github | philippboehmsturm/antx-master | bruker_findDataname.m | .m | antx-master/mritools/pvtools_bruker/pvtools_bruker/functions/additional/bruker_findDataname.m | 2,707 | utf_8 | a093e0564ed55d435e95e7e9a3d4d189 | function out_findlist=bruker_findDataname(yourpath, dataname, you_disp)
% out_findlist=bruker_findDataname(yourpath, dataname, you_disp)
% searches in yourpath and all subdirectories for a file with the given dataname.
% IN:
% yourpath: string, name of the directory e.g. '/opt/PV6.0/data'
% dataname: string, name o... |
github | philippboehmsturm/antx-master | bruker_writeVisu.m | .m | antx-master/mritools/pvtools_bruker/pvtools_bruker/functions/additional/exportToPV/bruker_writeVisu.m | 13,299 | utf_8 | 76f4fea33f8348c8fa2f8b70489cddb2 | function bruker_writeVisu( writepath, exportVisu)
% bruker_writeVisu( writepath, exportVisu)
% writes a visu_pars-file.
% Please keep in mind, that it's not possible to write a function, that
% supports every possible change in the data and also supports all
% ParaVision-functions.
% This function only provides the mos... |
github | philippboehmsturm/antx-master | bruker_Reco.m | .m | antx-master/mritools/pvtools_bruker/pvtools_bruker/functions/additional/RECO/bruker_Reco.m | 28,512 | utf_8 | 43937a273b1ab73cc68c341a7694ff37 | function [ data ] = bruker_Reco( recopart, data, Reco, varargin )
% [ data ] = bruker_Reco( recopart, data, Reco, ['RECO_Parametername', ParameterValues], ['RECO_Parametername2', ParameterValues2], ... )
% This function performs the steps of a reco based on the Bruker reco parameters.
% Normally you insert to this func... |
github | philippboehmsturm/antx-master | paul.m | .m | antx-master/mritools/pvtools_bruker/pvtools_bruker/custom_functions/paul.m | 1,061 | utf_8 | 4943a1e7d8249af72f4b674c47d6e095 |
function [bmatrix bval bvec]=getBmatrix(methodfile)
% [bmatrix bval bvec]=getBmatrix(fullfile(pwd,'method'))
% fi=fullfile(pwd,'method')
% methfi='method'
% a=textread('%s',methfi,'delimiter','\n')
a=textread(methodfile,'%s','delimiter','\n');
%% n# B0 images
s1 =find(~cellfun(@isempty,regexpi(a,'^... |
github | philippboehmsturm/antx-master | getBmatrix.m | .m | antx-master/mritools/pvtools_bruker/pvtools_bruker/custom_functions/getBmatrix.m | 1,063 | utf_8 | ad6206dad77c1dc44d2348b07d98668d |
function [bmatrix bval bvec]=getBmatrix(methodfile)
% [bmatrix bval bvec]=getBmatrix(fullfile(pwd,'method'))
% fi=fullfile(pwd,'method')
% methfi='method'
% a=textread('%s',methfi,'delimiter','\n')
a=textread(methodfile,'%s','delimiter','\n');
%% n# B0 images
s1 =find(~cellfun(@isempty,regexpi(a,'^... |
github | philippboehmsturm/antx-master | read2dseq.m | .m | antx-master/mritools/pvtools_bruker/pvtools_bruker/custom_functions/read2dseq.m | 1,926 | utf_8 | 5769be3724b77cc6ebb5fe4ec6d4946a | function fid=read2dseq(path,RO,PE,frame,type);
%reads Bruker data
%path: path to 2dseq file, ends with filesep
%RO: Readout matrix size
%PE: Phase encoding matrix size
%frame: frame to open (equals the slice for 3D data)
%type: 'int16'/'int32' for 16/32 bit signed integer
%
%SUBFUNCTION
%slopefind retrieves th... |
github | philippboehmsturm/antx-master | gifoverlay2.m | .m | antx-master/mritools/various/gifoverlay2.m | 640 | utf_8 | 423cfc1505f0dbd5fafaaa03cacfff78 |
%% simple check overlay
function gifoverlay2(handles,outname,resol )
%
% outname=fullfile(pwd, 'test.gif')
% handles=[1 2]
% resol='-r300'
[paout fi]=fileparts(outname);
warning off;
figure(handles(1));
print(handles(1), '-djpeg',['-r' num2str(resol)],fullfile(paout, 'vv1.jpg'));
figure(han... |
github | philippboehmsturm/antx-master | radd.m | .m | antx-master/mritools/various/radd.m | 544 | utf_8 | 508b788db36aea78aa2bfb1c78a078ba |
function filename2=radd(filename, str2add, tail)
% filename2=radd(filename, str2add, tail)
% add string (prefix/suffix) to filename
%% IN
% filename ... filename
% str2add ... str to add
% tail ...[1/2]...prefix/suffix
%% OUT
% filename2
%% example
% filename2=radd('V:\mrm\msk_fNat.nii', ... |
github | philippboehmsturm/antx-master | resize_img4.m | .m | antx-master/mritools/various/resize_img4.m | 5,644 | utf_8 | 4f2a20a75586c6f41e30f75760cec726 | function outfile=resize_img4(imnames, Voxdim, BB, ismask, interpmethod,suffix, dt)
%% resample images to have specified voxel dims and BBox, NewName with suffix, optional: dt(numeric class)
% function outfile=resize_img4(imnames, Voxdim, BB, ismask, interpmethod,suffix, dt)
% resize_img2 -- resample images ... |
github | philippboehmsturm/antx-master | pdisp.m | .m | antx-master/mritools/various/pdisp.m | 284 | utf_8 | 3458ee4bfd47c59000c9413d63dde89b | % function pdisp(i)
% disp iterationnumber in one line
% example
% for i=1:10; pdisp(i);end
% pdisp(i,10);%show everey 10th
function pdisp(i,varargin)
if nargin==2
if mod(i,varargin{1})==0
fprintf(1,'%d ',i);
end
else
fprintf(1,'%d ',i);
end |
github | philippboehmsturm/antx-master | affine.m | .m | antx-master/mritools/various/affine.m | 16,664 | utf_8 | 419b609560eb98534c0e32cc4506cc7f | % 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.... |
github | philippboehmsturm/antx-master | montage_p.m | .m | antx-master/mritools/various/montage_p.m | 1,770 | utf_8 | eb9b9391e88e62127f637cbe1ebae34a |
function montage_p(u,lis,xopengl,grids,varargin)
% montage_p(u,lis,xopengl,grids)
% example: montage_p(dat,[],1,1)
% u=3dmatrix :sliced allong 3rd. dim
% lis=[2val] :c-limits
% xopengl=[0,1] :normal/opengl
% grid [0/1]; grid off/on
cla;
u=single(u);
if ~exist('lis');lis=[];end
if ~exist('xopengl');... |
github | philippboehmsturm/antx-master | getvolume.m | .m | antx-master/mritools/various/getvolume.m | 1,582 | utf_8 | 885adc09d31962f32db7b9f07c5b0413 |
function [ vol nvox h2]=getvolume(fili,operation)
% calc volume (qmm) &nvox from file
% fili: niftifile
% operation: (optional) logical operation to searchn in volume, 3>,>=3,>3,...~=3
% (optional: the voxvalues of '1' are counted)
% output: volume(qmm) ,number of voxels, header
% example:
... |
github | philippboehmsturm/antx-master | rmricron.m | .m | antx-master/mritools/various/rmricron.m | 3,560 | utf_8 | 9c2a4b94aa147df46b8a711f591b32c6 |
function rmricron(pa,tmp,ovl,cols, trans)
%% use MRICRON to plot data
% function rmricron(pa,tmp,ovl,cols, trans)
% rmricron(pa,tmp,ovl,cols, trans)
% pa : path
% tmp : template (without path)
% ovl: overlaying images (struct, without path)
% cols: colors =numeric idx from pulldown LUT in mricron
% tran... |
github | philippboehmsturm/antx-master | replacefilepath.m | .m | antx-master/mritools/various/replacefilepath.m | 377 | utf_8 | dd36d8d1e3460c05ae138883cc51c8a8 |
%% replace path of file(string/cell) or files(cell) with 'path'
% example
% replacefilepath(parafiles2,pwd);
function in2=replacefilepath(in,path)
if ischar(in)
in=cellstr(in);
charis=1;
else
charis=0;
end
for i=1: size(in,1)
[pa fi ext]=fileparts(in{i,1});
in2{i,1}=fullfile(path... |
github | philippboehmsturm/antx-master | fullpath.m | .m | antx-master/mritools/various/fullpath.m | 358 | utf_8 | 3df8f8ee52a574444b5c6e448077f7a7 |
function fp=fullpath( pa,a)
%add path(pa) to cellarray of files (a)
% function fp=fullpath( a, pa)
% a={'wc1T2.nii' 'wc2T2.nii' 'wc3T2.nii'}
% pa=pwd
% fp=fullpath( pa,a)
if isempty(a)
fp=[];
return
end
if iscell(a)
fp=cellfun(@(a) [ fullfile(pa,a)] ,a, 'UniformOutput',0);
fp=fp(:)... |
github | philippboehmsturm/antx-master | mni2idx.m | .m | antx-master/mritools/various/mni2idx.m | 2,091 | utf_8 | 0bc25cf0792bd5790e06393e41c3052d |
function res=mni2idx(cords, hdr, mode )
% convert cords from [idx to mni] or [mni to idx]
% cords must be [3xX]
% ===========================
% convert idx2mni
% res=mni2idx( orig.x.XYZ(:,1:10000) , orig.x.hdr, 'idx2mni' );
% sum(sum(orig.x.XYZmm(:,1:10000)-res'))
% % convert mni2idx
% res=mni2idx( orig.x.XY... |
github | philippboehmsturm/antx-master | rreslice2target.m | .m | antx-master/mritools/various/rreslice2target.m | 863 | utf_8 | 83ecbe500cbe4308dc3e6eaa143496b9 |
function [h,d ]=rreslice2target(fi2merge, firef, fi2save, interpx,dt)
% [h,d ]=rreslice2target(fi2merge, firef, fi2save)
% if [fi2save] is empty/not existing..parse to workspace
if ~exist('interpx')
interpx=1;
end
[inhdr, inimg]=rgetnii(fi2merge);
[tarhdr ]=rgetnii(firef);
% inhdr=spm_v... |
github | philippboehmsturm/antx-master | resize_img2.m | .m | antx-master/mritools/various/resize_img2.m | 4,792 | utf_8 | 02533111854336430b465df20b8ba8e3 | function resize_img2(imnames, Voxdim, BB, ismask, interpmethod)
% resize_img2 -- resample images to have specified voxel dims and BBox
% resize_img2(imnames, voxdim, bb, ismask,interpmethod)
%
% Output images will be prefixed with 'r', and will have voxel dimensions
% equal to voxdim. Use NaNs to determine voxdim... |
github | philippboehmsturm/antx-master | rmkmask.m | .m | antx-master/mritools/various/rmkmask.m | 1,601 | utf_8 | bf0cbb77c96e38867bf3a033217b487e |
function [fileout h d ]=rmkmask(file,threshoperation, val1, val0, dowritefile )
%% make mask , suffixes '_msk' if written to disk
% [fileout h d ]=rmkmask(file,threshoperation, val1, val0, dowritefile )
%% In
% file: niftifile
% threshoperation: string (operation&value) , e.g '>0' ,'>=1.24'
% val1: value to ... |
github | philippboehmsturm/antx-master | resize_img.m | .m | antx-master/mritools/various/resize_img.m | 4,637 | utf_8 | f8ac6e8799481542156046e67e185665 | function resize_img(imnames, Voxdim, BB, ismask)
% resize_img -- resample images to have specified voxel dims and BBox
% resize_img(imnames, voxdim, bb, ismask)
%
% Output images will be prefixed with 'r', and will have voxel dimensions
% equal to voxdim. Use NaNs to determine voxdims from transformation matrix
... |
github | philippboehmsturm/antx-master | rflipdim.m | .m | antx-master/mritools/various/rflipdim.m | 2,357 | utf_8 | 603851e90005962f28a211e5d94df714 |
function fileout=rflipdim(filename, dimorder, prefix )
%% flip dimensions/orientation and handendness/reflextion
% rflipdim(filename, dimorder, prefix )
% fileout=rflipdim(filename, dimorder, prefix )
%% IN
% filename : <str> filename
% dimorder : <3 val vector> [x y z] tp permute dims , use sign to f... |
github | philippboehmsturm/antx-master | makegif.m | .m | antx-master/mritools/various/makegif.m | 4,706 | utf_8 | 889d5fdb8a3e5a1bc3c1e7a7a7e4de15 |
function makegif(fileoutname,ls,delay)
% ls={
% fullfile(pwd, 'v1.jpg')
% fullfile(pwd, 'v2.jpg')
% }
% makegif('test.gif',ls,.3);
loops=65535;
% delay=.4
for i=1:size(ls,1)
fi=ls{i};
if strcmpi('gif',fi(end-2:end))
[M c_map]=imread([fi]);
else
a=imread(... |
github | philippboehmsturm/antx-master | resize_img3.m | .m | antx-master/mritools/various/resize_img3.m | 5,527 | utf_8 | 02908961fff334c7f44f76bb28bf77cd | function outfile=resize_img3(imnames, Voxdim, BB, ismask, interpmethod,prefix, dt)
% function outfile=resize_img3(imnames, Voxdim, BB, ismask, interpmethod,prefix, dt)
% resize_img2 -- resample images to have specified voxel dims and BBox
% resize_img2(imnames, voxdim, bb, ismask,interpmethod)
% outfile: filenam... |
github | philippboehmsturm/antx-master | rsavenii.m | .m | antx-master/mritools/various/rsavenii.m | 702 | utf_8 | 6aa028e96e3f3f5bdc80b3e351cc5c09 |
function filenameout=rsavenii(filename,h,d, dt)
%% save Nifti
% filenameout=rsavenii(filename,h,d, dt)
% rsavenii(filename,h,d)
% filenameout=rsavenii(filename,h,d)
%% in
% filename: filename to save (.nii not needed)
% h : header -->fname is replaced by new filename
% d : data
%... |
github | philippboehmsturm/antx-master | gifoverlay.m | .m | antx-master/mritools/various/gifoverlay.m | 1,751 | utf_8 | 53e7d70a2973772ff8e6087c3c7c16ac |
%% simple check overlay
function gifoverlay(t1,t2,outname,resol, interpx ,strtag)
% pathdata='C:\Dokumente und Einstellungen\skoch\Desktop\allenAtlas\MBAT_WHS_atlas_v0.6.2\MBAT_WHS_atlas_v0.6.2\Data'
pathdata=pwd;
% [t,sts] = spm_select(inf,'dir','SEGMENTATION select Directories','',pathdata,'.*');
% if... |
github | philippboehmsturm/antx-master | simpleoverlay.m | .m | antx-master/mritools/various/simpleoverlay.m | 7,368 | utf_8 | 21f57de2dffa3c1bf1157ad4da6b78fb |
function h=simpleoverlay(ls, slices, tresh, col )
% simpleoverlay(ls2, [4 8 9], tresh,{'g','m' } );
% cf;
% clear
if 0
ls3={
's20150908_FK_C1M04_1_3_1.nii'
'c1s20150908_FK_C1M04_1_3_1.nii'
'c2s20150908_FK_C1M04_1_3_1.nii'
'c3s20150908_FK_C1M04_1_3_1.nii'
}
... |
github | philippboehmsturm/antx-master | ovl.m | .m | antx-master/mritools/various/ovl.m | 1,153 | utf_8 | 20bb1691c9a3be16cdfb376efa5ecada |
function ovl( v1,v2, interpx, name2write,infos )
if ~exist('name2write','var')
name2write='ztest';
end
num=length(dir([ name2write '*.txt']));
if isempty(num)
name=[ name2write '1' '.txt'] ;%'ztest1'
else
% name=['ztest' num2str(num+1)]
name=[ name2write num2str(num+1) '.txt'] ;%'ztest1'
end
... |
github | philippboehmsturm/antx-master | resize_img5.m | .m | antx-master/mritools/various/resize_img5.m | 5,686 | utf_8 | 23757070256aa23ec8d847669220cf5c | function outfile=resize_img5(imname,outname, Voxdim, BB, ismask, interpmethod, dt)
%% resample images to have specified voxel dims and BBox, NewName with suffix, optional: dt(numeric class)
% function outfile=resize_img5(imname,outname, Voxdim, BB, ismask, interpmethod, dt)
% resize_img2 -- resample images to... |
github | philippboehmsturm/antx-master | rreslice2.m | .m | antx-master/mritools/various/rreslice2.m | 1,188 | utf_8 | ffc68580982585de41ce5433f46ecb3f |
function [h d]=rreslice2(VI,mat,hld)
% VI: hdr
% mat: mat
% hld:interpolation method.
% FORMAT reslice(PI,PO,dim,mat,hld)
% PI - input filename
% PO - output filename
% dim - 1x3 matrix of image dimensions
% mat - 4x4 affine transformation matrix mapping
% from vox to mm (for output image... |
github | philippboehmsturm/antx-master | rapplymask.m | .m | antx-master/mritools/various/rapplymask.m | 1,988 | utf_8 | 71794c65b5cadd9efa897af6bc77ae6e |
function [fileout h x ]=rapplymask(file,filemsk,threshoperation, val1, val0, suffix )
%% apply maskFile to another file
% [fileout h x ]=rapplymask(file,filemsk,threshoperation, val1, val0, suffix )
%% In
% file : file
% filemsk : masking file
% threshoperation: string (operation&value) , e.g '>0' ,'... |
github | philippboehmsturm/antx-master | makebrainmask3.m | .m | antx-master/mritools/various/makebrainmask3.m | 1,815 | utf_8 | d27a6b8abffc9ce0c5646aaf7368f1b9 |
function makebrainmask3(tpm, thresh, outfilename)
%% make brain mask from TPM
% tpm: cellaray with 2 or 3 or x compartiments
% tpm= { 'wc1T2.nii' 'wc2T2.nii' 'wc3T2.nii'}'
% tpm= { 'wc1T2.nii' 'wc2T2.nii' }';
% tpm=fullpath(pwd,tpm);
% makebrainmask2(tpm, thresh, 'test1.nii')
% thres... |
github | philippboehmsturm/antx-master | rgetnii.m | .m | antx-master/mritools/various/rgetnii.m | 582 | utf_8 | f16d21c0e69ea77e7fa9ad3a565430e7 |
function [h d xyz xyzind]=rgetnii(file )
%% get Nifti/analyzeFormat
% [h d xyz xyzind]=rgetnii(file )
%% in
% file: filename ; e.g. 'T2brain.nii';
%% out
%[h d xyz]: header,data,xyz
%% example
% [h d xyz]=rgetnii('T2brain.nii')
% [pa fi ext]=fileparts(file)
% if strcmp(ext,'.gz')
% fname=gunzip(... |
github | philippboehmsturm/antx-master | simpleoverlay2.m | .m | antx-master/mritools/various/simpleoverlay2.m | 9,360 | utf_8 | c0ff2ff6e8acc61d2ddc0082e80484fc |
function simpleoverlay(ls, slices, tresh, col,dirs, olap )
% simpleoverlay(ls2, [4 8 9], tresh,{'g','m' } );
% simpleoverlay2(ls, [], .002,{'r','m' },0 );
% simpleoverlay2(ls, [], .002,{'r','g' },0 );
% simpleoverlay2({t2file; TPMpathnew{2}},'5',.01,{'r'},4.9);
% simpleoverlay2({t2file; TPMpathnew{2}},[],.0... |
github | philippboehmsturm/antx-master | p_displaySlices.m | .m | antx-master/mritools/various/p_displaySlices.m | 38,526 | utf_8 | 679a532e7f115eb7f7029b96ea39730a | function p_displaySlices(x)%(imgs, dispf)
% if isempty(x.cmap)
%
% eval(['x.cmap=' x.cmap ';']);
% if ~isnumeric(x.cmap)
% error('x.cmap: false colormap ') ;
% end
%
% end
if 0
%OVERLAY PARAMETER
x.views =0 ; %multiple view: [1] x.orient only [2] 2views fixed with 'sagitt... |
github | philippboehmsturm/antx-master | simpleoverlay3.m | .m | antx-master/mritools/various/simpleoverlay3.m | 12,447 | utf_8 | cbc8c0bf8f51253220a677faf2b685ef |
function h=simpleoverlay3(ls,flipdims , slices, tresh, col, olap,txt)
% f1='V:\harmsSC\s_neu_s20150505SM01_1_x_x_1\c1fT2.nii'
% f2 ='V:\harmsSC\s_neu_s20150505SM01_1_x_x_1\fT2.nii'
% simpleoverlay3({f2,f1},[1 3 2],'3',.01,{'r'},'%40');
% simpleoverlay3({f2,f1},[1 -3 -2],'3',.01,{'summer'},'%40');
% simpleoverl... |
github | philippboehmsturm/antx-master | makebrainmask2.m | .m | antx-master/mritools/various/makebrainmask2.m | 1,426 | utf_8 | 3f37fd902c20f48218fa5ef12c1fa7e5 |
function makebrainmask2(tpm, thresh, outfilename)
%% make brain mask from TPM
% tpm: cellaray with 2 or 3 or x compartiments
% tpm= { 'wc1T2.nii' 'wc2T2.nii' 'wc3T2.nii'}'
% tpm= { 'wc1T2.nii' 'wc2T2.nii' }';
% tpm=fullpath(pwd,tpm);
% makebrainmask2(tpm, thresh, 'test1.nii')
% thres... |
github | philippboehmsturm/antx-master | createMontageImage.m | .m | antx-master/mritools/various/createMontageImage.m | 13,004 | utf_8 | d53fdd8a041d1a92bf998314c3910fc6 | function bigImage = montage(varargin)
%MONTAGE Display multiple image frames as rectangular montage.
% MONTAGE(FILENAMES) displays a montage of the images specified in
% FILENAMES. FILENAMES is an N-by-1 or 1-by-N cell array of file name
% strings. If the files are not in the current directory or in a
% di... |
github | philippboehmsturm/antx-master | rreslice.m | .m | antx-master/mritools/various/rreslice.m | 1,074 | utf_8 | 3555e08dc6559b72c65642fe2c68d030 |
function rreslice(PI,PO,dim,mat,hld)
% FORMAT reslice(PI,PO,dim,mat,hld)
% PI - input filename
% PO - output filename
% dim - 1x3 matrix of image dimensions
% mat - 4x4 affine transformation matrix mapping
% from vox to mm (for output image).
% To define M from vox and origin, then
% ... |
github | philippboehmsturm/antx-master | pnum.m | .m | antx-master/mritools/various/pnum.m | 492 | utf_8 | bb7b8dcf3645f818b1bddc66a601f3f9 |
% get number as string within a 'n-digits zeros string', such as '001, 002,003'
% function str=pnum(nr,ndigits)
% nr: number
% ndigits: number of digits
% example:
% str=pnum(112,5); %%str is 00112; e.g. 5digits string with the number 112
function str=pnum(nr,digits)
% nu=3
str=repmat('0',[1... |
github | philippboehmsturm/antx-master | pwf.m | .m | antx-master/mritools/various/pwf.m | 2,039 | utf_8 | 5d1d1331f027ac1ddddf2f75d4a6324e |
function varargout =pwf
%PWF Show+CLIPBOARD filename+PATH+description of Editor's on top file
% % % print working file (print currently opened file in editor)
try
% Matlab 7
desktop = com.mathworks.mde.desk.MLDesktop.getInstance;
jEditor = desktop.getGroupContainer('Editor').getTopLevelAncest... |
github | philippboehmsturm/antx-master | maskdata.m | .m | antx-master/mritools/various/maskdata.m | 1,241 | utf_8 | 1aa1066ace0b21a7ac9828816a210135 |
function [fileout h x ]=maskdata(file,cords,dimens,operation,assign, suffix )
%% mask data in file based given 3cooredinates, the dimension to mask, the operation and assignment
% file = filename
% cords =standard space coordinates, 3 values ,e.g [ 0 0 0]
% dimens =dimension where operation and ... |
github | philippboehmsturm/antx-master | EditorMacro.m | .m | antx-master/mritools/graphics/EditorMacro.m | 44,535 | utf_8 | f122d01b23833c7a6f52969105d5e749 | function [bindingsList, actionsList] = EditorMacro(keystroke, macro, macroType)
% EditorMacro assigns a macro to a keyboard key-stroke in the Matlab-editor
%
% Syntax:
% [bindingsList, actionsList] = EditorMacro(keystroke, macro, macroType)
% [bindingsList, actionsList] = EditorMacro(bindingsList)
%
% Desc... |
github | philippboehmsturm/antx-master | fuseimage.m | .m | antx-master/mritools/graphics/fuseimage.m | 672 | utf_8 | a34594045b7c331ffa7fe079ecc44186 |
%Program Description
%This program is the main entry of the application.
%This program fuses/combines 2 images
%It supports both Gray & Color Images
%Alpha Factor can be varied to vary the proportion of mixing of each image.
%With Alpha Factor = 0.5, the two images mixed equally.
%With Alpha Facotr < 0.5, the c... |
github | philippboehmsturm/antx-master | gui_overlay.m | .m | antx-master/mritools/graphics/gui_overlay.m | 5,716 | utf_8 | 77759510b55c5d0c89e0648743440b30 |
function overlay_gui
hp=figure;
set(gcf,'color','w','units','normalized','tag','plot','menubar','none','toolbar','none');
ha=findobj(0,'tag','ant');
si=get(ha,'position');
siz=.15
set(hp,'position',[ si(1)-siz si(2) siz-.001 si(4)]);
h = uicontrol('style','pushbutton','units','norm', 'string','plot',...
... |
github | philippboehmsturm/antx-master | mousebutton.m | .m | antx-master/mritools/graphics/mousebutton.m | 1,956 | utf_8 | 1e712ffcef0edff4612c8c034d06cc0e |
%% define mousebutton [left/right, double-left/right,& SHIFT-CONTROL-ALT ]
%% button:
% 1:left
% 2:right
% 3:double click left
% 4:double click right
%% sca:
% 3-element vector refers to combinations of SHIFT-CONTROL-ALT
%% button & sca can be combined
%EXAMPLE:
% [b sca] = mouse... |
github | philippboehmsturm/antx-master | montage_t2image.m | .m | antx-master/mritools/graphics/montage_t2image.m | 2,138 | utf_8 | bab38dc29fb50bab0ca82943d9b9b801 | function montage_t2image
file='t2.nii';
fil=antcb('getsubjects');
fis=stradd(fil,[filesep file],2);
d=[];
for i=1:size(fis,1)
[ha a]=rgetnii(fis{i});
% [xyz xyzmm]=getcenter(ha);
xyzmm=[0 0 0];
[xyz u]=voxcalc(xyzmm,ha,'mm2idx');
d0=double(rot90(squeeze(a(:,:,xy... |
github | philippboehmsturm/antx-master | axslider.m | .m | antx-master/mritools/graphics/axslider.m | 4,823 | utf_8 | 0885347d140702fb5688f9dc28e21966 |
function ax=axslider(nb,varargin)
warning off;
if nargin>1
%vnew=varargin{1};
vara=reshape(varargin,[2 length(varargin)/2])';
vnew=cell2struct(vara(:,2)',vara(:,1)',2);
else
vnew=struct();
end
v=vnew;
% n=20;
% nr=3;
n=nb(1);
nr=nb(2);
if n<nr
norig=n;
... |
github | philippboehmsturm/antx-master | montageout.m | .m | antx-master/mritools/graphics/montageout.m | 13,006 | utf_8 | a692deab49bd51f1bd7dcc6685cd7274 | function h = montage(varargin)
%MONTAGE Display multiple image frames as rectangular montage.
% MONTAGE(FILENAMES) displays a montage of the images specified in
% FILENAMES. FILENAMES is an N-by-1 or 1-by-N cell array of file name
% strings. If the files are not in the current directory or in a
% directory... |
github | philippboehmsturm/antx-master | seemore.m | .m | antx-master/mritools/graphics/seemore.m | 5,290 | utf_8 | 8cf3d7906045acf920d73e5aed74ddc6 | function seemore(varargin)
% SEEMORE displays the content of the last statement in the history
% with clicklable links that allows users to interactively expand
% subcomponents of structured data.
%
% SEEMORE VARIABLE displays the content of the variable.
%
% This tool is usefull to anyone who works with the str... |
github | philippboehmsturm/antx-master | antpath.m | .m | antx-master/mritools/ant/antpath.m | 604 | utf_8 | 4289c9ecc3d1ab28be1283ab66e0ad35 |
%% get path and struct with FPlinks to ANT and TPMs in refspace
% [pathx s]=antpath
function [pathx s]=antpath(arg)
pathx=fileparts(mfilename('fullpath'));
s.refpa=fullfile(pathx, 'templateBerlin_hres');
s.refTPM={...
fullfile(s.refpa,'_b1grey.nii')
fullfile(s.refpa,'_b2white.nii')
full... |
github | philippboehmsturm/antx-master | antconfig.m | .m | antx-master/mritools/ant/antconfig.m | 5,268 | utf_8 | c306639220f1d91c671c8adfeb870dab |
function varargout=antconfig(showgui,varargin)
% varargin : with parameter-pairs
% currently:
% 'parameter' 'default' ...load default parameter (i.e. overrides global "an" struct )
% otherwise use an struct
% 'savecb' 'yes'/'no' ...show save checkbox, default is 'yes'
% antconfig(1,'param... |
github | philippboehmsturm/antx-master | showfun.m | .m | antx-master/mritools/ant/showfun.m | 2,089 | utf_8 | 67c71a1a9c54a9cb7737c1fb5fc0d1a8 |
%% #b displays the main functions of the [ANT]-toolbox with hyperlinks for HELP and EDIT-MODE
% click on the function-name in the command-window to show the function's help
% click on the [ed]-hyperlink to open this function
function showfun
f={ 'ant'
'antcb'
'antfun'
'ante'
'antsetti... |
github | philippboehmsturm/antx-master | calcMI.m | .m | antx-master/mritools/ant/calcMI.m | 1,926 | utf_8 | 5ad7ca887b51100634b905b7f9603c18 |
function param=calcMI(fi1,fi2)
%input: filepath or 3d volume
if ischar(fi1)
[ha a]=rgetnii(fi1);
else
a=fi1;
end
if ischar(fi2)
[hb b]=rreslice2target(fi2, fi1, [], 1);%rgetnii(fi2);rgetnii(fi2);
else
b=fi2;
end
%% no nan
a(isnan(a))=0;
b(isnan(b))=0;
%%mask of graymatter
% ima... |
github | philippboehmsturm/antx-master | test_yair_listbox.m | .m | antx-master/mritools/ant/test_yair_listbox.m | 2,182 | utf_8 | 04a6eaeb4eec653b305dfb0489e57798 |
function bla
% Prepare the Matlab listbox uicontrol
hFig = figure;
listItems = {'apple','orange','banana','lemon','cherry','pear','melon'};
hListbox = uicontrol(hFig, 'style','listbox', 'units','norm', 'pos',[.1 .1 .4 .4], 'string',listItems);
% Get the listbox's underlying Java control
jScrollPane = findjob... |
github | philippboehmsturm/antx-master | statusbar.m | .m | antx-master/mritools/ant/statusbar.m | 12,591 | utf_8 | 3513bd72623b8caa2bca356d4971b070 | function statusbarHandles = statusbar(varargin)
%statusbar set/get the status-bar of Matlab desktop or a figure
%
% statusbar sets the status-bar text of the Matlab desktop or a figure.
% statusbar accepts arguments in the format accepted by the <a href="matlab:doc sprintf">sprintf</a>
% function and returns... |
github | philippboehmsturm/antx-master | calcGridcorr.m | .m | antx-master/mritools/ant/calcGridcorr.m | 896 | utf_8 | 82d8c053e6f2fc9ade16e0e8b3aa5a70 |
function param=calcGridcorr(fi1,fi2)
%input: filepath or 3d volume
if ischar(fi1)
[ha a]=rgetnii(fi1);
else
a=fi1;
end
if ischar(fi2)
[hb b]=rreslice2target(fi2, fi1, [], 1);%rgetnii(fi2);rgetnii(fi2);
else
b=fi2;
end
%% no nan
a(isnan(a))=0;
b(isnan(b))=0;
aa=permute(a,[1 3 2])... |
github | philippboehmsturm/antx-master | struct2list.m | .m | antx-master/mritools/ant/struct2list.m | 10,032 | utf_8 | 76c55538a713e28f892eb0fa2b9f9489 |
%% convert struct to (executable) cell list (inDepth)
%% function ls=struct2list(x)
% -works with char, 1-2-3D numeric array, mixed cells
%% example
% w.project= 'TEST' ;
% w.voxsize= [0.07 0.07 0.07] ;
% w.datpath= 'O... |
github | philippboehmsturm/antx-master | xcreatetemplatefiles2.m | .m | antx-master/mritools/ant/xcreatetemplatefiles2.m | 2,351 | utf_8 | 3415c9b89edaae6f0fa8c86688e9dc22 |
function t=xcreatetemplatefiles2(s,forcetooverwrite)
%% create templateFolder
patpl=s.templatepath;
if exist(patpl)~=7; mkdir(patpl); end
f1=s.avg;
f2 =fullfile(patpl,'AVGT.nii');
t.avg=f2;
if any([~exist(f2,'file') forcetooverwrite])==1
disp(['generate: ' f2]);
[BB, vox] = world_... |
github | philippboehmsturm/antx-master | foo.m | .m | antx-master/mritools/ant/foo.m | 201 | utf_8 | 37f29183fc41a85d4c663c9fc8579778 |
function fh=foo
fh.msub=@msub;
fh.madd=@madd;
fh.minfo=@minfo;
function r=msub(a,b)
r=a-b;
function r=madd(a,b)
r=a+b;
function [x y z]=minfo(a,b,c)
x='hallo'
y=[1:3]
z=b
|
github | philippboehmsturm/antx-master | createParallelpools.m | .m | antx-master/mritools/ant/createParallelpools.m | 1,298 | utf_8 | f9133bdb62378d8761c3ca54e3cf1c60 | %% open matlabpool depending on Matlab-version
% no args: open max number of pools
% args1: 'close' -->forces to close pools
%% EXAMPLES:
% createParallelpools;
% createParallelpools('close');
function createParallelpools(arg1)
if isempty(which('matlabpool')); %older versions
vers=1;
end
if isemp... |
github | philippboehmsturm/antx-master | list2cell.m | .m | antx-master/mritools/ant/list2cell.m | 1,964 | utf_8 | fdc67ca73a0234168471da6a39652a53 |
function c=list2cell(t,p)
% fn=fieldnames(x)
% t={}
% n=1;
% for i=1:length(fn)
% xx=getfield(x,fn{i})
% if ~isstruct(xx)
% t{n,1}=fn{i}
% t{n,2}=)=''
% n=n+1
% else
%
%
% end
% end
% t=char(txt);
% t=m
eval(t);
sp=[1 strfind(t,char(10)) length(t)];
t2... |
github | philippboehmsturm/antx-master | xcopyfiles2.m | .m | antx-master/mritools/ant/xcopyfiles2.m | 2,113 | utf_8 | 7ee7c0537ad5a356b7f2fdc2caba4d2e |
%% copy templates with given resolution
% function newfiles=xcopyfiles(rstruct, pa, voxres)
% INPUT
% struct: with FPfiles of templates (from antpath)
% pa : current mousepath (only the path)
% voxres: voxelResolution, e.g. : [0.07 0.07 0.07 ]
function newfiles=xcopyfiles2(rstruct, pa, voxres)
%% M... |
github | philippboehmsturm/antx-master | antini.m | .m | antx-master/mritools/ant/antini.m | 73 | utf_8 | 94fff3f2aef7d40de43a8443c0f8569d |
%% defaultparas
function iniparas=antini
iniparas.fontsize=9; |
github | philippboehmsturm/antx-master | xsegment_test2.m | .m | antx-master/mritools/ant/xsegment_test2.m | 6,419 | utf_8 | 62407935968913f2a1ea8075a1de21f4 | %% SEGMENT MOUSE
% function xsegment(t2,template)
% function xsegment(t2,template,job)...see below
% function xsegment(t2,template,'segment') %% SEGMENT ONLY without using Freiburg-normalization
%% INPUT:
% t2 : FPfile of t2.nii
% template: {cell} with ordered TPMs(GM,WM,CSF)+FPfile of reorient.mat
%%... |
github | philippboehmsturm/antx-master | startspmd.m | .m | antx-master/mritools/ant/startspmd.m | 587 | utf_8 | eeddee0935107904f719bad8735eaa85 |
function startspmd(an, paths,tasks)
createParallelpools;
disp('..PCT-SPMD used');
atime=tic;
%% SPMD
% global an
spmd
for j = labindex:numlabs:length(paths) %% j=1:length(paths)
for i=1:size(tasks,1)
%try
% i,j, paths{j}
try
... |
github | philippboehmsturm/antx-master | loadspmmouse.m | .m | antx-master/mritools/ant/loadspmmouse.m | 207 | utf_8 | a03041ab2e05dbbd848f56ce27cc515b |
function loadspmmouse
mtlbfolder = which('spmmouse');
sprts = findstr(mtlbfolder,filesep);
mtlbfolder=fullfile(mtlbfolder(1:sprts(end)),'mouse-C57.mat');
spmmouse('load',mtlbfolder); |
github | philippboehmsturm/antx-master | useotherspm.m | .m | antx-master/mritools/ant/useotherspm.m | 503 | utf_8 | dde3563dceb556fb6d4a6794759d4333 |
%% uses other spm (xspm) for display (freiburg is broken)
function useotherspm(arg)
warning off;
if exist('arg')==0;
arg=1;
end
if arg==1 %add
dirx=fullfile( fileparts(fileparts(fileparts(which('ant.m')))) , 'xspm8' );
addpath(dirx);
elseif arg==0 %remove
dirx=fullfile( fil... |
github | philippboehmsturm/antx-master | xcopyfiles.m | .m | antx-master/mritools/ant/xcopyfiles.m | 2,112 | utf_8 | 94c957a1578c978f07f558946bd4697b |
%% copy templates with given resolution
% function newfiles=xcopyfiles(rstruct, pa, voxres)
% INPUT
% struct: with FPfiles of templates (from antpath)
% pa : current mousepath (only the path)
% voxres: voxelResolution, e.g. : [0.07 0.07 0.07 ]
function newfiles=xcopyfiles(rstruct, pa, voxres)
%% MA... |
github | philippboehmsturm/antx-master | exportfig.m | .m | antx-master/mritools/ant/exportfig.m | 13,007 | utf_8 | 45c6593c96493d64183aa1a414cf670e | function exportfig(varargin)
%EXPORTFIG Export a figure to Encapsulated Postscript.
% EXPORTFIG(H, FILENAME) writes the figure H to FILENAME. H is
% a figure handle and FILENAME is a string that specifies the
% name of the output file.
%
% EXPORTFIG(...,PARAM1,VAL1,PARAM2,VAL2,...) specifies
% parame... |
github | philippboehmsturm/antx-master | parcelate.m | .m | antx-master/mritools/ant/parcelate.m | 852 | utf_8 | 1e9da69fdfcd0fe6ba1835745bb689d7 |
function [w3 bord]=parcelate(w,nbox, plotter)
warning off;
if 0
load('mandrill')
w=imresize(X,[402 410]);
% w=rand(402,410);
nbox=4;
end
si=size(w);
% l1=round (linspace(1,si(1), nbox+1))
% l2=round (linspace(1,si(2), nbox+1))
r1=mod(si(1),4);
r2=mod(si(2),4);
si2=si-[r1 r2];
w... |
github | philippboehmsturm/antx-master | corrgrid.m | .m | antx-master/mritools/ant/corrgrid.m | 1,501 | utf_8 | b0e7802a92d4f635bc5f6f48b5144453 | % function [xmed xsum]=corrgrid(q,z, nboxes,plotter)
% [xmed xsum]=corrgrid(q,z, 1:10,1);
% [xmed xsum]=corrgrid(q,z(:,:,1), 1:10,1)
%q: 2d image
% z : 2d or 3d (stack of images)
function [xmed xsum xme]=corrgrid(q,z, nboxes,plotter)
q=double(q);
z=double(z);
%% corr2 loop
if 0
% z=d(:,:,v);
z=d(:,:... |
github | philippboehmsturm/antx-master | xcreateGWC.m | .m | antx-master/mritools/ant/xcreateGWC.m | 975 | utf_8 | cad3562ff977bc6c27fc9e5d428026dd |
function xcreateGWC(anofile,fibfile, GWCoutfile)
% anofile=fullfile(pas,'ANO.nii')
% fibfile=fullfile(pas,'FIBT.nii')
[ha a xyz XYZ]= rgetnii(anofile);
[hb b] = rgetnii(fibfile);
a2=a;
a2(a2~=8 & a2~=0)=1;
a2(a2==8)=0;
b(b~=0)=1;
c=a2+b;
% rsavenii('test.nii',ha,c);
... |
github | philippboehmsturm/antx-master | fdr_bh.m | .m | antx-master/mritools/ant/fdr_bh.m | 9,039 | utf_8 | 6ee458c4ce61569d12d9b362c8b4c276 | % fdr_bh() - Executes the Benjamini & Hochberg (1995) and the Benjamini &
% Yekutieli (2001) procedure for controlling the false discovery
% rate (FDR) of a family of hypothesis tests. FDR is the expected
% proportion of rejected hypotheses that are mistakenly rejected
% ... |
github | philippboehmsturm/antx-master | xdeform.m | .m | antx-master/mritools/ant/xdeform.m | 2,270 | utf_8 | 1b47b324c8342dfce3f6d32a71198bd3 |
function testdeform( files ,direction, resolution, interpx)
if exist('direction')~=1; direction=[]; end;
if isempty(direction); direction =1; end
if exist('resolution')~=1; resolution=[]; end;
if isempty(resolution); resolution =[.025 .025 .025]; end
if exist('interpx')~=1; interpx=[]; end;
if... |
github | philippboehmsturm/antx-master | fn_structdisp.m | .m | antx-master/mritools/ant/fn_structdisp.m | 2,914 | utf_8 | e11c66742f7b48aaae1ca3d478b79905 | function s=fn_structdisp(Xname)
% function fn_structdisp Xname
% function fn_structdisp(X)
%---
% Recursively display the content of a structure and its sub-structures
%
% Input:
% - Xname/X one can give as argument either the structure to display or
% or a string (the name in the current work... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.