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
shayo/Planner-master
fnUpdateGridModel.m
.m
Planner-master/Modules/ElectrodePlanning/Grids/fnUpdateGridModel.m
469
utf_8
39eee89a8f1af4e2e4d3eafe0af94cfd
function fnUpdateGridModel(strctGridModel) global g_strctModule if isempty(g_strctModule) || isempty(g_strctModule.m_acAnatVol) return; end; iSelectedGrid = g_strctModule.m_acAnatVol{g_strctModule.m_iCurrAnatVol}.m_astrctChambers(g_strctModule.m_iCurrChamber).m_iGridSelected; g_strctModule.m_acAnatVol{g_strctModul...
github
shayo/Planner-master
fnAddGridFromStruct.m
.m
Planner-master/Modules/ElectrodePlanning/Grids/fnAddGridFromStruct.m
1,615
utf_8
b374ee33340221f04219112976fad201
function iNewIndex = fnAddGridFromStruct(strctGrid, iSubModelIndex) global g_strctModule % Build the model strctGridParams = feval(strctGrid.m_strctGeneral.m_strDefine); % Apply sub model adjustments if ~isempty(iSubModelIndex) acFieldNames = setdiff(fieldnames(strctGrid.m_acSubModels{iSubModelIndex}),'m_strName'...
github
shayo/Planner-master
fnGridMIPFuncNeg.m
.m
Planner-master/Modules/ElectrodePlanning/Grids/fnGridMIPFuncNeg.m
187
utf_8
29154ecf72039a0cee03462b80de1113
function fnGridMIPFuncNeg() global g_strctModule g_strctModule.m_strctGUIOptions.m_bMIPFuncNeg = ~g_strctModule.m_strctGUIOptions.m_bMIPFuncNeg; fnUpdateChamberMIP(); fnUpdateGridAxes();
github
shayo/Planner-master
fnAddGridFromModel.m
.m
Planner-master/Modules/ElectrodePlanning/Grids/fnAddGridFromModel.m
943
utf_8
7163641bf058965918a601c2ad543861
function fnAddGridFromModel(strctGrid) global g_strctModule if isempty(g_strctModule.m_acAnatVol{g_strctModule.m_iCurrAnatVol}.m_astrctChambers(g_strctModule.m_iCurrChamber).m_astrctGrids) g_strctModule.m_acAnatVol{g_strctModule.m_iCurrAnatVol}.m_astrctChambers(g_strctModule.m_iCurrChamber).m_astrctGrids = strctG...
github
shayo/Planner-master
fnMoveGrid.m
.m
Planner-master/Modules/ElectrodePlanning/Grids/fnMoveGrid.m
1,170
utf_8
9992721be5f18defc41d14e4e1cfb41b
function fnMoveGrid(afDelta) global g_strctModule if isempty(g_strctModule.m_acAnatVol{g_strctModule.m_iCurrAnatVol}.m_astrctChambers) || g_strctModule.m_iCurrChamber == 0 return; end; iSelectedGrid = get(g_strctModule.m_strctPanel.m_hGridList,'value'); if isempty(g_strctModule.m_acAnatVol{g_strctModule.m_iCurrAn...
github
shayo/Planner-master
fnMyfminsearch.m
.m
Planner-master/Modules/ElectrodePlanning/Grids/fnMyfminsearch.m
19,084
utf_8
024f6b1d35584fa59f0295116859da0f
function [x,fval,exitflag,output] = fnMyfminsearch(funfcn,x,options,varargin) %FMINSEARCH Multidimensional unconstrained nonlinear minimization (Nelder-Mead). % X = FMINSEARCH(FUN,X0) starts at X0 and attempts to find a local minimizer % X of the function FUN. FUN is a function handle. FUN accepts input X and %...
github
shayo/Planner-master
fnDuplicateGrid.m
.m
Planner-master/Modules/ElectrodePlanning/Grids/fnDuplicateGrid.m
1,050
utf_8
30f30589bef69125146cbfe4357f40e5
function fnDuplicateGrid() global g_strctModule iSelectedGrid = get(g_strctModule.m_strctPanel.m_hGridList,'value'); if isempty(iSelectedGrid) || iSelectedGrid == 0 || isempty(g_strctModule.m_acAnatVol{g_strctModule.m_iCurrAnatVol}.m_astrctChambers(g_strctModule.m_iCurrChamber).m_astrctGrids) return; end; strctGr...
github
shayo/Planner-master
fnGridMIPVessels.m
.m
Planner-master/Modules/ElectrodePlanning/Grids/fnGridMIPVessels.m
193
utf_8
544d7aaab55d8ae05895f106994d43a1
function fnGridMIPVessels() global g_strctModule g_strctModule.m_strctGUIOptions.m_bMIPBlood = ~g_strctModule.m_strctGUIOptions.m_bMIPBlood; fnUpdateChamberMIP(); fnUpdateGridAxes();
github
shayo/Planner-master
fnUpdateGridList.m
.m
Planner-master/Modules/ElectrodePlanning/Grids/fnUpdateGridList.m
1,577
utf_8
484335f418e702c896ffd42b6c78a06b
function fnUpdateGridList() global g_strctModule if isempty(g_strctModule.m_iCurrChamber) set(g_strctModule.m_strctPanel.m_hGridList,'string','','value',1); return; end; if g_strctModule.m_iCurrChamber == 0 || isempty(g_strctModule.m_acAnatVol{g_strctModule.m_iCurrAnatVol}.m_astrctChambers) set(g_strctModu...
github
shayo/Planner-master
TargetHelper.m
.m
Planner-master/Modules/ElectrodePlanning/Grids/TargetHelper.m
9,530
utf_8
2eb43421e00c13718de02de97d4ada34
function varargout = TargetHelper(varargin) % TARGETHELPER M-file for TargetHelper.fig % TARGETHELPER, by itself, creates a new TARGETHELPER or raises the existing % singleton*. % % H = TARGETHELPER returns the handle to a new TARGETHELPER or the handle to % the existing singleton*. % % TARGETH...
github
shayo/Planner-master
GridHelper.m
.m
Planner-master/Modules/ElectrodePlanning/Grids/GridHelper.m
16,240
utf_8
2b94992066fc53176abedc03aa06ab9b
function varargout = GridHelper(varargin) % GRIDHELPER M-file for GridHelper.fig % GRIDHELPER, by itself, creates a new GRIDHELPER or raises the existing % singleton*. % % H = GRIDHELPER returns the handle to a new GRIDHELPER or the handle to % the existing singleton*. % % GRIDHELPER('CALLBACK'...
github
shayo/Planner-master
fnUpdateGridAxes.m
.m
Planner-master/Modules/ElectrodePlanning/Grids/fnUpdateGridAxes.m
2,284
utf_8
af76b85ec11bf0664beebf1b6374ba34
function fnUpdateGridAxes(bHideAfter) global g_strctModule g_strctWindows if ~exist('bHideAfter','var') bHideAfter = true; end; % delete(g_strctModule.m_strctPanel.m_strctGrid.m_ahHoleHandles(ishandle(g_strctModule.m_strctPanel.m_strctGrid.m_ahHoleHandles))); % g_strctModule.m_strctPanel.m_strctGrid.m_ahHoleHandle...
github
shayo/Planner-master
fnGridMIPFuncPos.m
.m
Planner-master/Modules/ElectrodePlanning/Grids/fnGridMIPFuncPos.m
188
utf_8
51545717b6b973e7bc4af287493a8351
function fnGridMIPFuncPos() global g_strctModule g_strctModule.m_strctGUIOptions.m_bMIPFuncPos = ~g_strctModule.m_strctGUIOptions.m_bMIPFuncPos; fnUpdateChamberMIP(); fnUpdateGridAxes();
github
shayo/Planner-master
fnRenameGrid.m
.m
Planner-master/Modules/ElectrodePlanning/Grids/fnRenameGrid.m
801
utf_8
549b3718787c6e818f51c0af1073aa5c
function fnRenameGrid() global g_strctModule if g_strctModule.m_iCurrAnatVol == 0 || g_strctModule.m_iCurrChamber == 0 || ... isempty(g_strctModule.m_acAnatVol{g_strctModule.m_iCurrAnatVol}.m_astrctChambers(g_strctModule.m_iCurrChamber).m_astrctGrids) return; end; iSelectedGrid = get(g_strctModule.m_strc...
github
shayo/Planner-master
fnRotateGrid.m
.m
Planner-master/Modules/ElectrodePlanning/Grids/fnRotateGrid.m
604
utf_8
8f6f3776987ab3aa294ab72a7e66eee5
function fnRotateGrid() global g_strctModule if ~isfield(g_strctModule.m_strctPanel.m_strctGrid,'m_hCurrGridHole') || isempty(g_strctModule.m_acAnatVol) return; end; iSelectedGrid = get(g_strctModule.m_strctPanel.m_hGridList,'value'); if isempty(iSelectedGrid) return; end; fRotationAngle = round(get(g_strctMo...
github
shayo/Planner-master
fnBuildGridModel_Generic.m
.m
Planner-master/Modules/ElectrodePlanning/Grids/GenericCircular/fnBuildGridModel_Generic.m
7,118
utf_8
605bc59daf9c171859bc6528ccec0441
function strctGridModel = fnBuildGridModel_Generic(strctGridParam) % This function generates a structure that contains the grid model % It uses various information in strctGridParams to construct the grid % The output is a structure that must contain % % % strctGridModel.m_strctGridParams - Parameters used to construc...
github
shayo/Planner-master
GenericCircularGirdGUI.m
.m
Planner-master/Modules/ElectrodePlanning/Grids/GenericCircular/GenericCircularGirdGUI.m
36,331
utf_8
b5ac991b64e7fe0264234ef8d70e66c8
function varargout = GenericCircularGirdGUI(varargin) % GENERICCIRCULARGIRDGUI M-file for GenericCircularGirdGUI.fig % GENERICCIRCULARGIRDGUI, by itself, creates a new GENERICCIRCULARGIRDGUI or raises the existing % singleton*. % % H = GENERICCIRCULARGIRDGUI returns the handle to a new GENERICCIRCULARGIR...
github
shayo/Planner-master
SolidWorksExportWizard.m
.m
Planner-master/Modules/ElectrodePlanning/Grids/GenericCircular/SolidWorksExportWizard.m
12,223
utf_8
281cb9449af52c52c5ee4dde0ae8598f
function varargout = SolidWorksExportWizard(varargin) % SOLIDWORKSEXPORTWIZARD MATLAB code for SolidWorksExportWizard.fig % SOLIDWORKSEXPORTWIZARD, by itself, creates a new SOLIDWORKSEXPORTWIZARD or raises the existing % singleton*. % % H = SOLIDWORKSEXPORTWIZARD returns the handle to a new SOLIDWORKSEXP...
github
shayo/Planner-master
fnDefineGridModel_Standard.m
.m
Planner-master/Modules/ElectrodePlanning/Grids/StandardCircular/fnDefineGridModel_Standard.m
2,035
utf_8
3cade3d490e031c65f4cbc37c246cc7e
function strctGridParam = fnDefineGridModel_Standard() % Generate a standard grid model (circular). strctGridParam.m_acParam = { fnAddParameter('Phi','Grid Tilt Angle (deg)', 'Continuous', [0 50], 0, false), ... fnAddParameter('Theta','Grid Rotation Angle (deg)', 'Continuous', [-180 180], 0, true), ... fnAddParameter...
github
shayo/Planner-master
fnDefineGridModel_DualCircular.m
.m
Planner-master/Modules/ElectrodePlanning/Grids/DualCircular/fnDefineGridModel_DualCircular.m
3,948
utf_8
93327249eb11a02b31f9928e50523fa7
function strctGridParam = fnDefineGridModel_DualCircular() % Generate a standard grid model (circular). % % The grid is just a collection of "holes" and their directions in 3D. % They are represented by several arrays: % m_afGridHolesX - X position (in mm) % m_afGridHolesY - Y position (in mm) % m_apt3fGridHolesNormals...
github
shayo/Planner-master
fnDraw2DGridModel_DualCircular.m
.m
Planner-master/Modules/ElectrodePlanning/Grids/DualCircular/fnDraw2DGridModel_DualCircular.m
4,068
utf_8
cbe83034fb2bdf23887d2380b7b2bc31
function ahHolesHandles = fnDraw2DGridModel_DualCircular(strctGridModel, hAxes, hContextMenu) cla(hAxes); hold(hAxes,'on'); set(hAxes,'uicontextmenu',hContextMenu); afAngle = linspace(0,2*pi,20); afCos = cos(afAngle); afSin= sin(afAngle); iNumHoles = length(strctGridModel.m_afGridHolesX); ahHolesHandles = zeros(1,iN...
github
shayo/Planner-master
fnKopf1460RightArm_MO.m
.m
Planner-master/Modules/ElectrodePlanning/StereoFrameModels/fnKopf1460RightArm_MO.m
8,087
utf_8
93c8f72d18548038b7b8a75ad21618a6
function strctArm = fnKopf1460RightArm_MO() C1 = 5.39; % Triky to read out... C3 = 12.15;%11.6457; INCH_TO_CM = 2.54; %SM this is actuall correct by definition MM_TO_CM = 1 / 10; %SM mainly to document units fDistanceBetweenArms = 7 * INCH_TO_CM; %fDistanceBetweenArms = 7.0079 * INCH_TO_CM; fHeightOfManipulatorWh...
github
shayo/Planner-master
ImageSeriesInfoGUI.m
.m
Planner-master/Modules/ElectrodePlanning/ImageSeries/ImageSeriesInfoGUI.m
9,141
utf_8
073b493b77095049b2e8195887dd1557
function varargout = ImageSeriesInfoGUI(varargin) % IMAGESERIESINFOGUI MATLAB code for ImageSeriesInfoGUI.fig % IMAGESERIESINFOGUI, by itself, creates a new IMAGESERIESINFOGUI or raises the existing % singleton*. % % H = IMAGESERIESINFOGUI returns the handle to a new IMAGESERIESINFOGUI or the handle to %...
github
shayo/Planner-master
fnBuildImageSeriesBoundingBox.m
.m
Planner-master/Modules/ElectrodePlanning/ImageSeries/fnBuildImageSeriesBoundingBox.m
2,526
utf_8
2a0a4d16f7a8891b856e68e09754f161
function strctMesh = fnBuildImageSeriesBoundingBox() global g_strctModule iActiveSeries = get(g_strctModule.m_strctPanel.m_hImageSeriesList,'value'); if isempty(g_strctModule.m_astrctImageSeries(iActiveSeries).m_acImages) strctMesh = []; return; end; aiFirstImageSize = size(g_strctModule.m_astrctImageSeries(...
github
shayo/Planner-master
fnInvalidateImageSeries.m
.m
Planner-master/Modules/ElectrodePlanning/ImageSeries/fnInvalidateImageSeries.m
7,856
utf_8
d114d28f158ffc752fdaa3e37e5806bd
function [a3fCrossSectionXY,a3fCrossSectionYZ,a3fCrossSectionXZ]=fnInvalidateImageSeries(a3fCrossSectionXY,a3fCrossSectionYZ,a3fCrossSectionXZ) global g_strctModule a4fCrossSectionImages = zeros([size(a3fCrossSectionXY),3]); a4fCrossSectionImages(:,:,:,1) = a3fCrossSectionXY; a4fCrossSectionImages(:,:,:,2) = a3fCrossSe...
github
shayo/Planner-master
fnTargetFindGridAndHole.m
.m
Planner-master/Modules/ElectrodePlanning/Targets/fnTargetFindGridAndHole.m
2,502
utf_8
110d269ce3489f7a6e260da30517c54e
function fnTargetFindGridAndHole() global g_strctModule aiCurrTarget = get(g_strctModule.m_strctPanel.m_hTargetList,'value'); iNumTargets=length(aiCurrTarget); iSelectedGrid = get(g_strctModule.m_strctPanel.m_hGridList,'value'); if iNumTargets == 0 || iSelectedGrid == 0 return; end; a2fCRS_To_XYZ = g_strctModul...
github
shayo/Planner-master
fnUpdateTargetList.m
.m
Planner-master/Modules/ElectrodePlanning/Targets/fnUpdateTargetList.m
821
utf_8
3e32099410618a3dd25de29ac9211c5e
function fnUpdateTargetList() global g_strctModule if ~isfield(g_strctModule.m_acAnatVol{g_strctModule.m_iCurrAnatVol},'m_astrctTargets') set(g_strctModule.m_strctPanel.m_hTargetList,'String',''); else strName = ''; iNumTargets = length(g_strctModule.m_acAnatVol{g_strctModule.m_iCurrAnatVol}.m_astrctTarget...
github
shayo/Planner-master
fnFindNearestHoleToTarget.m
.m
Planner-master/Modules/ElectrodePlanning/Targets/fnFindNearestHoleToTarget.m
2,006
utf_8
557e829d12753300754a8597e27c9f34
function [fMinDist, iBestHole,fDepthMM,afMinDistToTarget] = fnFindNearestHoleToTarget(a2fChamberM,strctGrid,pt3fTargetPosMM) iNumHoles = length(strctGrid.m_strctModel.m_afGridHolesX); afMinDistToTarget = ones(1,iNumHoles)*inf; afDepth = zeros(1,iNumHoles); %iNumBloodVessels = size(apt3fBloodVesselsMM,2); for iHoleIte...
github
shayo/Planner-master
fnHideShowTargets.m
.m
Planner-master/Modules/ElectrodePlanning/Targets/fnHideShowTargets.m
173
utf_8
142e87830db38b170b349f72439c0c27
function fnHideShowTargets() global g_strctModule g_strctModule.m_strctGUIOptions.m_bShowTargets = ~g_strctModule.m_strctGUIOptions.m_bShowTargets; fnInvalidate(); return;
github
shayo/Planner-master
fnTargetFindHole.m
.m
Planner-master/Modules/ElectrodePlanning/Targets/fnTargetFindHole.m
2,500
utf_8
9706a59af31f684891d45ad88d5f693e
function fnTargetFindHole() global g_strctModule if isempty(g_strctModule.m_acAnatVol) || g_strctModule.m_iCurrChamber == 0 return; end; iNumGrids = length(g_strctModule.m_acAnatVol{g_strctModule.m_iCurrAnatVol}.m_astrctChambers(g_strctModule.m_iCurrChamber).m_astrctGrids); if iNumGrids == 0 return; end; aiCu...
github
shayo/Planner-master
fnTargetKeepView.m
.m
Planner-master/Modules/ElectrodePlanning/Targets/fnTargetKeepView.m
870
utf_8
127071982ab5e606d04bd7e567937410
function fnTargetKeepView() global g_strctModule if isempty(g_strctModule.m_acAnatVol) || isempty(g_strctModule.m_acAnatVol{g_strctModule.m_iCurrAnatVol}.m_astrctTargets ) return; end; aiCurrTarget = get(g_strctModule.m_strctPanel.m_hTargetList,'value'); if length(aiCurrTarget) > 1 msgbox('This option is avai...
github
shayo/Planner-master
fnCopyTarget.m
.m
Planner-master/Modules/ElectrodePlanning/Targets/fnCopyTarget.m
1,066
utf_8
c7dcbd3fe3153cb562f1479b5a4bf18f
function fnCopyTarget(a,b,iAnatVolTo) %#ok global g_strctModule aiCurrTarget = get(g_strctModule.m_strctPanel.m_hTargetList,'value'); astrctTarget = g_strctModule.m_acAnatVol{g_strctModule.m_iCurrAnatVol}.m_astrctTargets(aiCurrTarget); for k=1:length(aiCurrTarget) a2fCRS_To_XYZ = g_strctModule.m_acAnatVo...
github
shayo/Planner-master
fnRenameTarget.m
.m
Planner-master/Modules/ElectrodePlanning/Targets/fnRenameTarget.m
694
utf_8
773a53a926640e648662976c62ec6380
function fnRenameTarget() global g_strctModule if isempty(g_strctModule.m_iCurrAnatVol) return; end; iSelectedTarget = get(g_strctModule.m_strctPanel.m_hTargetList,'value'); if length(iSelectedTarget) > 1 msgbox('This option is available for only one target'); return; end; if iSelectedTarget > 0 ...
github
shayo/Planner-master
fnSelectTarget.m
.m
Planner-master/Modules/ElectrodePlanning/Targets/fnSelectTarget.m
1,515
utf_8
1dce0eb53b36c66a8147f00ed5b162fb
function fnSelectTarget() global g_strctModule iSelectedTarget = get(g_strctModule.m_strctPanel.m_hTargetList,'value'); if length(iSelectedTarget) > 1 || isempty(g_strctModule.m_acAnatVol{g_strctModule.m_iCurrAnatVol}.m_astrctTargets) return; end; if ~isempty(iSelectedTarget) && iSelectedTarget > 0 && isfield(g_st...
github
shayo/Planner-master
fnSelectMoveTarget.m
.m
Planner-master/Modules/ElectrodePlanning/Targets/fnSelectMoveTarget.m
280
utf_8
82e604dc44e6e90257a7fe9798f7ea7d
function fnSelectMoveTarget() global g_strctModule aiCurrTarget = get(g_strctModule.m_strctPanel.m_hTargetList,'value'); if length(aiCurrTarget) > 1 msgbox('This option is available only for one target'); return; end; fnChangeMouseMode('MoveTarget'); return;
github
shayo/Planner-master
fnRemoveTarget.m
.m
Planner-master/Modules/ElectrodePlanning/Targets/fnRemoveTarget.m
736
utf_8
b63fe8d9ee0acddd51f91b5e24037b75
function fnRemoveTarget() global g_strctModule if g_strctModule.m_iCurrAnatVol == 0 || isempty(g_strctModule.m_acAnatVol{g_strctModule.m_iCurrAnatVol}.m_astrctTargets) return; end; strAnswer = questdlg({'Are you sure you want to remove target(s)?'},'Warning','Yes','No','No'); if strcmpi(strAnswer,'yes') aiCur...
github
shayo/Planner-master
absoluteOrientationQuaternion.m
.m
Planner-master/Modules/ElectrodePlanning/Chamber/absoluteOrientationQuaternion.m
3,784
utf_8
654695944a69f198dac3925283aa9c1b
% [s R T error] = absoluteOrientationQuaternion( A, B, doScale) % % Computes the orientation and position (and optionally the uniform scale % factor) for the transformation between two corresponding 3D point sets Ai % and Bi such as they are related by: % % Bi = sR*Ai+T % % Implementation is based on the paper by...
github
shayo/Planner-master
fnUpdateChamberList.m
.m
Planner-master/Modules/ElectrodePlanning/Chamber/fnUpdateChamberList.m
909
utf_8
0735f76084e14cd2bebd57d2173f8e70
function fnUpdateChamberList() global g_strctModule iNumChambers = length(g_strctModule.m_acAnatVol{g_strctModule.m_iCurrAnatVol}.m_astrctChambers); if iNumChambers == 0 set(g_strctModule.m_strctPanel.m_hChamberList,'String','','value',1); return; end; if g_strctModule.m_iCurrChamber <= 0 || g_strctModule.m_i...
github
shayo/Planner-master
fnUpdateChamberMIP.m
.m
Planner-master/Modules/ElectrodePlanning/Chamber/fnUpdateChamberMIP.m
5,663
utf_8
afc9134a0ab602f2fbcf12e55d70781e
function fnUpdateChamberMIP() return; % % global g_strctModule % if g_strctModule.m_iCurrChamber == 0 || isempty(g_strctModule.m_acAnatVol{g_strctModule.m_iCurrAnatVol}.m_astrctChambers) % return % end % if isempty(g_strctModule.m_acAnatVol{g_strctModule.m_iCurrAnatVol}.m_astrctChambers(g_strctModule.m_iC...
github
shayo/Planner-master
fnCreateRectChamberMesh.m
.m
Planner-master/Modules/ElectrodePlanning/Chamber/fnCreateRectChamberMesh.m
2,441
utf_8
d8a47ef47a377aa81295ca5b3bbe194e
function astrctMesh= fnCreateRectChamberMesh(fWidthMM, fHeightMM,fDepthMM,afColor) % creates a bunch of triangles that correspond to a box (without the top % and bottom faces, and with an inside edge to indicate the direction... % % fWidthMM = 20; % fHeightMM = 40; % fDepthMM = 0; % afColor = [1 0 1]; % add the inne...
github
shayo/Planner-master
RotateChamberByFixedAmount.m
.m
Planner-master/Modules/ElectrodePlanning/Chamber/RotateChamberByFixedAmount.m
389
utf_8
198b77f1a11258d3f8f6cea62aed8028
function RotateChamberByFixedAmount() global g_strctModule prompt={'Rotate by X deg:'}; name='Chamber Rotation'; numlines=1; defaultanswer={'0'}; answer=inputdlg(prompt,name,numlines,defaultanswer); if ~isempty(answer) % rotation will be X/100 * pi, so we need to pass fnRotateChamber(g_strctModule.m_strctLa...
github
shayo/Planner-master
fnLongChamber.m
.m
Planner-master/Modules/ElectrodePlanning/Chamber/fnLongChamber.m
272
utf_8
a2b0f34651f8c848f2384dea5e26f84d
function fnLongChamber() global g_strctModule g_strctModule.m_strctGUIOptions.m_bLongChamber = ~g_strctModule.m_strctGUIOptions.m_bLongChamber; fnInvalidate(1); % profile clear % profile on % for k=1:10 % fnInvalidate(1); % end % profile off % profile viewer return;
github
shayo/Planner-master
fnAddChamberSinglePointAux.m
.m
Planner-master/Modules/ElectrodePlanning/Chamber/fnAddChamberSinglePointAux.m
882
utf_8
3e9fc5b0fdd60e123e4070eaaadc013e
function fnAddChamberSinglePointAux(strctMouseOp) global g_strctModule [pt3fPosIn3DSpace, pt3fPosInStereoSpace, pt3fVoxelCoordinate, strctCrossSection]=fnGet3DCoord(strctMouseOp); %#ok a2fM = eye(4); a2fM(1:3,1:3) = strctCrossSection.m_a2fM(1:3,1:3); a2fM(1:3,4) =pt3fPosIn3DSpace(1:3); switch strctMouseOp.m_hAxes ...
github
shayo/Planner-master
fnAlignToChamber.m
.m
Planner-master/Modules/ElectrodePlanning/Chamber/fnAlignToChamber.m
1,207
utf_8
66547845d8af8ab227b61391fc0446da
function fnAlignToChamber() global g_strctModule if g_strctModule.m_iCurrChamber == 0 return; end; a2fCRS_To_XYZ = g_strctModule.m_acAnatVol{g_strctModule.m_iCurrAnatVol}.m_a2fReg*g_strctModule.m_acAnatVol{g_strctModule.m_iCurrAnatVol}.m_a2fM; a2fChamberT = a2fCRS_To_XYZ*g_strctModule.m_acAnatVol{g_strctModu...
github
shayo/Planner-master
fnfnShowHideChamber.m
.m
Planner-master/Modules/ElectrodePlanning/Chamber/fnfnShowHideChamber.m
636
utf_8
3c1dc3ab7d38f4ee747ad84da26e6f1f
function fnfnShowHideChamber() global g_strctModule if g_strctModule.m_iCurrChamber == 0 return; end; g_strctModule.m_acAnatVol{g_strctModule.m_iCurrAnatVol}.m_astrctChambers(g_strctModule.m_iCurrChamber).m_bVisible = ~g_strctModule.m_acAnatVol{g_strctModule.m_iCurrAnatVol}.m_astrctChambers(g_strctModule.m_iCurrCh...
github
shayo/Planner-master
fnGenerateControllersForVirtualArm.m
.m
Planner-master/Modules/ElectrodePlanning/Chamber/fnGenerateControllersForVirtualArm.m
2,686
utf_8
983495f6ce624b65b78c046ed0a2cf80
function [ahLinkFixed,ahLinkSlider, ahLinkEdit,iNextY] = fnGenerateControllersForVirtualArm(strctPanel,strctVirtualArm,yStartY) iNumLinks = length(strctVirtualArm); ahLinkFixed = zeros(1,iNumLinks); ahLinkSlider = zeros(1,iNumLinks); ahLinkEdit = zeros(1,iNumLinks); if (ismac) virt_arm_field_height = 24; else ...
github
shayo/Planner-master
fnAddChamberNormalToPlane.m
.m
Planner-master/Modules/ElectrodePlanning/Chamber/fnAddChamberNormalToPlane.m
206
utf_8
be9223361b354517517789f531af7c9a
function fnAddChamberNormalToPlane() global g_strctModule fnChangeMouseMode('AddSingleClickObject', 'Add Chamber (normal-to-plane)'); g_strctModule.m_hClickCallback = @fnAddChamberSinglePointAux; return;
github
shayo/Planner-master
fnCopyChamber.m
.m
Planner-master/Modules/ElectrodePlanning/Chamber/fnCopyChamber.m
1,036
utf_8
29157a17f607b1da770b0feecf4cb69b
function fnCopyChamber(a,b,iAnatVolTo) %#ok global g_strctModule if g_strctModule.m_iCurrChamber == 0 return; end; strctChamber = g_strctModule.m_acAnatVol{g_strctModule.m_iCurrAnatVol}.m_astrctChambers(g_strctModule.m_iCurrChamber); % we can't just copy the chamber because it is represented in voxel % coordinates...
github
shayo/Planner-master
fnAddChamberInPlane.m
.m
Planner-master/Modules/ElectrodePlanning/Chamber/fnAddChamberInPlane.m
192
utf_8
f3bbe19692d24f86197786c17cd04652
function fnAddChamberInPlane() global g_strctModule fnChangeMouseMode('AddTwoClickObject', 'Add Chamber (in-plane)'); g_strctModule.m_hClickCallback = @fnAddChamberUsingTwoPoints; return;
github
shayo/Planner-master
fnSetChamberRotateAxis.m
.m
Planner-master/Modules/ElectrodePlanning/Chamber/fnSetChamberRotateAxis.m
83
utf_8
72641dabe5f2342c3d9a9740ba06908d
function fnSetChamberRotateAxis() fnChangeMouseMode('ChamberRotateAxis'); return;
github
shayo/Planner-master
fnRenameChamber.m
.m
Planner-master/Modules/ElectrodePlanning/Chamber/fnRenameChamber.m
482
utf_8
9b67eed058a3376334713d4eb2e95257
function fnRenameChamber() global g_strctModule if g_strctModule.m_iCurrChamber==0 return; end answer=inputdlg({'New Chamber Name:'},'Change Volume Name',1,... {g_strctModule.m_acAnatVol{g_strctModule.m_iCurrAnatVol}.m_astrctChambers(g_strctModule.m_iCurrChamber).m_strName}); if isempty(answer) return; e...
github
shayo/Planner-master
fnHideShowShowHideChamber.m
.m
Planner-master/Modules/ElectrodePlanning/Chamber/fnHideShowShowHideChamber.m
181
utf_8
80e711cb731d6ae2d4406a11a1db6c4b
function fnHideShowShowHideChamber() global g_strctModule g_strctModule.m_strctGUIOptions.m_bShowChamber = ~g_strctModule.m_strctGUIOptions.m_bShowChamber; fnInvalidate(); return;
github
shayo/Planner-master
fnSelectChamberAux.m
.m
Planner-master/Modules/ElectrodePlanning/Chamber/fnSelectChamberAux.m
857
utf_8
12e2aedeef694b19b01101b053df7423
function fnSelectChamberAux(iChamber) global g_strctModule g_strctModule.m_iCurrChamber = iChamber; if iChamber > 0 g_strctModule.m_acAnatVol{g_strctModule.m_iCurrAnatVol}.m_iLastSelectedChamber = iChamber; set(g_strctModule.m_strctPanel.m_hChamberList,'value',iChamber); set(g_strctModule.m_strctPanel.m_h...
github
shayo/Planner-master
fnMeasureDistTopGrid.m
.m
Planner-master/Modules/ElectrodePlanning/Ruler/fnMeasureDistTopGrid.m
149
utf_8
3dadde8bafed30b426e3da18537da86a
function fnMeasureDistTopGrid() global g_strctModule fnChangeMouseMode('MeasureDist'); g_strctModule.m_strDistMode = 'PointToGridTop'; return;
github
shayo/Planner-master
fnDrawRuler.m
.m
Planner-master/Modules/ElectrodePlanning/Ruler/fnDrawRuler.m
2,776
utf_8
3263d041357e2768e27dec80e88b56cf
function ahHandles= fnDrawRuler(strctObject) global g_strctModule g_strctWindows ahHandles = []; [strctCrossSection,hAxes] = fnAxesNameToCrossSection(strctObject.m_strAxes); % We should only draw the ruler if the ruler is ON the correct cross % section plane .... a2fCRS_To_XYZ = g_strctModule.m_acAnatVol{g_strct...
github
shayo/Planner-master
fnIntersectsRuler.m
.m
Planner-master/Modules/ElectrodePlanning/Ruler/fnIntersectsRuler.m
1,410
utf_8
438b42589f39dfcf7fc03e8079b0bc07
function [bIntersects, strWhat] = fnIntersectsRuler(strctObject, strctMouseOp) global g_strctModule bIntersects = false; strWhat = []; [strctCrossSection,strName] = fnAxesToCrossSection(strctMouseOp.m_hAxes); if ~strcmp( strName, strctObject.m_strAxes) return; end; % Check whether it is close to the end ...
github
shayo/Planner-master
fnCreateRulerObject.m
.m
Planner-master/Modules/ElectrodePlanning/Ruler/fnCreateRulerObject.m
2,242
utf_8
8f228eb460c3ea2a888501ea8332583c
function strctObject = fnCreateRulerObject() global g_strctModule [strctCrossSection,strName] = fnAxesToCrossSection(g_strctModule.m_strctLastMouseDown.m_hAxes); if isempty(strctCrossSection) return; end; strctObject.m_strAxes = strName; strctObject.m_strctCrossSection = strctCrossSection; % Default position of...
github
shayo/Planner-master
fnModifyRulerPosition.m
.m
Planner-master/Modules/ElectrodePlanning/Ruler/fnModifyRulerPosition.m
1,560
utf_8
63dd5feaeef53d71404ed72c0e0b6e23
function strctObject = fnModifyRulerPosition(strctObject, strWhat, strctMouseOp) global g_strctModule afDiffPix = strctMouseOp.m_pt2fPos-g_strctModule.m_strctPrevMouseOp.m_pt2fPos; a2fCRS_To_XYZ = g_strctModule.m_acAnatVol{g_strctModule.m_iCurrAnatVol}.m_a2fReg*g_strctModule.m_acAnatVol{g_strctModule.m_iCurrAnatVol}....
github
shayo/Planner-master
fnPrintGrid.m
.m
Planner-master/Modules/ElectrodePlanning/Export_Print/fnPrintGrid.m
694
utf_8
eafb3ae70a0cc5edf75a5918e95af5e6
function fnPrintGrid() global g_strctModule if g_strctModule.m_iCurrChamber == 0 return; end; hFig = figure; %#ok clf; hAxes = gca; iSelectedGrid = g_strctModule.m_acAnatVol{g_strctModule.m_iCurrAnatVol}.m_astrctChambers(g_strctModule.m_iCurrChamber).m_iGridSelected; strctGrid = g_strctModule.m_acAnatVol{g_strctM...
github
shayo/Planner-master
fnPrintSlices.m
.m
Planner-master/Modules/ElectrodePlanning/Export_Print/fnPrintSlices.m
3,706
utf_8
b9a6002d83b4b20369fb24986b8d19ff
function fnPrintSlices() global g_strctModule g_strctWindows set(g_strctWindows.m_hFigure,'Renderer','zbuffer'); set(g_strctModule.m_strctPanel.hMouseModeText,'visible','off'); set(g_strctModule.m_strctPanel.m_strctXZ.m_ahTextHandles,'visible','off'); set(g_strctModule.m_strctPanel.m_strctXY.m_ahTextHandles,'visible'...
github
shayo/Planner-master
fnInvalidateDerivedSurfaceList.m
.m
Planner-master/Modules/ElectrodePlanning/FreeSurfer_Surfaces/fnInvalidateDerivedSurfaceList.m
778
utf_8
54f9d6a2e15b3ff0028ed8c7e9045741
function fnInvalidateDerivedSurfaceList() global g_strctModule iSelectedParentSurface = get(g_strctModule.m_strctPanel.m_hSurfaceList,'value'); if isempty(g_strctModule.m_acAnatVol{g_strctModule.m_iCurrAnatVol}.m_acFreeSurferSurfaces) set(g_strctModule.m_strctPanel.m_hDerivedSurfaceList,'string',[]); return; e...
github
shayo/Planner-master
fnBuildRectangularChamberModel.m
.m
Planner-master/Modules/ElectrodePlanning/ChamberModels/fnBuildRectangularChamberModel.m
1,105
utf_8
ec182bf98396b96587551e7e95474623
function strctModel = fnBuildRectangularChamberModel(fChamberWidthMM) % A chamber must have only two strctures that describe the 3D geometry % One is "short" (normal size) and one is "long" to see its projection in % the volume. % % Future versions may automatically do this projection so only the short % version will ...
github
shayo/Planner-master
fnBuildCristChamberModel.m
.m
Planner-master/Modules/ElectrodePlanning/ChamberModels/fnBuildCristChamberModel.m
3,393
utf_8
f81ff124cd9f2256fdd1ec01cf700ecb
function strctModel = fnBuildCristChamberModel(fChamberAngle) % A chamber must have only two strctures that describe the 3D geometry % One is "short" (normal size) and one is "long" to see its projection in % the volume. % % Future versions may automatically do this projection so only the short % version will be neede...
github
shayo/Planner-master
fnHideShowPlanesFunctional.m
.m
Planner-master/Modules/ElectrodePlanning/Functionals/fnHideShowPlanesFunctional.m
192
utf_8
9398bf87749fd834ffdcbfd6f1651979
function fnHideShowPlanesFunctional() global g_strctModule g_strctModule.m_strctGUIOptions.m_bShowFunctional = ~g_strctModule.m_strctGUIOptions.m_bShowFunctional; fnInvalidate(true); return;
github
shayo/Planner-master
fnUpdateOverlayTransform.m
.m
Planner-master/Modules/ElectrodePlanning/Functionals/fnUpdateOverlayTransform.m
1,815
utf_8
4d6eae876aed110e5555e20cd310eaf9
function fnUpdateOverlayTransform() global g_strctModule Tmp = get(g_strctModule.m_strctPanel.m_strctOverlayAxes.m_hAxes,'CurrentPoint'); afRange = axis(g_strctModule.m_strctPanel.m_strctOverlayAxes.m_hAxes); pt2fCurrPoint = Tmp([2,3]); pt2fCurrPoint(1) = min(afRange(2), max(afRange(1), pt2fCurrPoint(1))); pt2fCurrPo...
github
shayo/Planner-master
fnPrintInfoFunc.m
.m
Planner-master/Modules/ElectrodePlanning/Functionals/fnPrintInfoFunc.m
227
utf_8
f7ace533c49b0d66a8aa2477c16653a7
function fnPrintInfoFunc() global g_strctModule if ~isempty(g_strctModule.m_acFuncVol) && g_strctModule.m_iCurrFuncVol >0 h=msgbox(g_strctModule.m_acFuncVol{g_strctModule.m_iCurrFuncVol}.m_strFileName); waitfor(h); end
github
shayo/Planner-master
fnApplyFuncInvTrans.m
.m
Planner-master/Modules/ElectrodePlanning/Functionals/fnApplyFuncInvTrans.m
520
utf_8
7176fca60c948b5879a7d8a1b455f704
function fnApplyFuncInvTrans() global g_strctModule if g_strctModule.m_iCurrFuncVol == 0 return; end; [strFile, strPath] = uigetfile([g_strctModule.m_strDefaultFilesFolder,'*.reg'],'Select transformation file'); if strFile(1) == 0 return; end; a2fTrans = fnReadRegisteration([strPath, strFile]); g_strctModule....
github
shayo/Planner-master
fnExportFuncRegMatrix.m
.m
Planner-master/Modules/ElectrodePlanning/Functionals/fnExportFuncRegMatrix.m
637
utf_8
f02caad3fe5699aa143a7ac86b1b3e31
function fnExportFuncRegMatrix() global g_strctModule if g_strctModule.m_iCurrFuncVol == 0 return; end; [strFile, strPath] = uiputfile([g_strctModule.m_strDefaultFilesFolder,'*.reg'],'Select transformation file'); if strFile(1) == 0 return; end; strFilename =fullfile(strPath,strFile); strVolType =...
github
shayo/Planner-master
fnRemoveFunc.m
.m
Planner-master/Modules/ElectrodePlanning/Functionals/fnRemoveFunc.m
486
utf_8
e2bd1868323d74cfcf213d537e8238bf
function fnRemoveFunc() global g_strctModule if length(g_strctModule.m_acFuncVol) <= 1 msgbox('You cannot remove this volume'); return; end; strAnswer = questdlg('Are you sure you want to remove this volume?','Warning','Yes','No','No'); if strcmpi(strAnswer,'yes') g_strctModule.m_acFuncVol(g_strctModule....
github
shayo/Planner-master
fnUpdateFunctionalsList.m
.m
Planner-master/Modules/ElectrodePlanning/Functionals/fnUpdateFunctionalsList.m
321
utf_8
56d3b4789d2cb14a31a363323b093714
function fnUpdateFunctionalsList() global g_strctModule strList = ''; for iFuncIter=1:length(g_strctModule.m_acFuncVol) strList = [strList,'|',g_strctModule.m_acFuncVol{iFuncIter}.m_strName]; %#ok end; set(g_strctModule.m_strctPanel.m_hFuncList,'String',strList(2:end),'value',g_strctModule.m_iCurrFuncVol); return;...
github
shayo/Planner-master
fnShowHideTimeCourse.m
.m
Planner-master/Modules/ElectrodePlanning/Functionals/fnShowHideTimeCourse.m
715
utf_8
5a586acbf3c6c3a6632bf91e4260ab08
function fnShowHideTimeCourse() global g_strctModule if g_strctModule.m_strctGUIOptions.m_bShowTimeCourse g_strctModule.m_strctGUIOptions.m_bShowTimeCourse = false; set(g_strctModule.m_strctPanel.m_strct3D.m_hPanel,'visible','on') set(g_strctModule.m_strctPanel.m_strctTimeCourse.m_hPanel,'visible','off') ...
github
shayo/Planner-master
fnLoadFuncVol.m
.m
Planner-master/Modules/ElectrodePlanning/Functionals/fnLoadFuncVol.m
2,153
utf_8
5d32f490da0c41374532614c424eb233
function fnLoadFuncVol() global g_strctModule [strFuncFile, strPath] = uigetfile([g_strctModule.m_strDefaultFilesFolder,'*.bhdr;*.nii'],'Select Functional Volume'); if strFuncFile(1) == 0 return; end; strInputVolfile = [strPath,strFuncFile]; % % [strFile, strPath] = uigetfile([g_strctModule.m_strDefaultFiles...
github
shayo/Planner-master
fnROIChange.m
.m
Planner-master/Modules/ElectrodePlanning/ROI/fnROIChange.m
4,405
utf_8
3d48efc04b88f1aa7c52aa4bfaca5072
function fnROIChange(strctMouseOp,bAdd, b2D) global g_strctModule if isempty(strctMouseOp.m_hAxes) return; end; strctCrossSection =fnAxesToCrossSection(strctMouseOp.m_hAxes); if isempty(strctCrossSection) return; end; if b2D fnROIChange2D(strctCrossSection,strctMouseOp,bAdd) else fnROIChange3D(st...
github
shayo/Planner-master
fnEraseVoxels.m
.m
Planner-master/Modules/ElectrodePlanning/ROI/fnEraseVoxels.m
3,179
utf_8
06fe86eef2b7b1ead90005c97b40dcdd
function fnEraseVoxels(strctMouseOp, b2D) global g_strctModule strctCrossSection =fnAxesToCrossSection(strctMouseOp.m_hAxes); if isempty(strctCrossSection) return; end; if b2D fnEraseVoxels2D(strctCrossSection,strctMouseOp); else fnEraseVoxels3D(strctCrossSection,strctMouseOp); end fnInvalidate(1); ret...
github
shayo/Planner-master
BloodVesselHelper.m
.m
Planner-master/Modules/ElectrodePlanning/SurfaceHelper/BloodVesselHelper.m
16,642
utf_8
128553c1d591c9634710e34c8115b2bf
function varargout = BloodVesselHelper(varargin) % BLOODVESSELHELPER M-file for BloodVesselHelper.fig % BLOODVESSELHELPER, by itself, creates a new BLOODVESSELHELPER or raises the existing % singleton*. % % H = BLOODVESSELHELPER returns the handle to a new BLOODVESSELHELPER or the handle to % the ex...
github
shayo/Planner-master
Hessian3D.m
.m
Planner-master/Modules/ElectrodePlanning/SurfaceHelper/Hessian3D.m
1,868
utf_8
944f5f355ba7a20d1fa54cc6e17737a3
function [Dxx, Dyy, Dzz, Dxy, Dxz, Dyz] = Hessian3D(Volume,Sigma) % This function Hessian3D filters the image with an Gaussian kernel % followed by calculation of 2nd order gradients, which aprroximates the % 2nd order derivatives of the image. % % [Dxx, Dyy, Dzz, Dxy, Dxz, Dyz] = Hessian3D(I,Sigma) % % inputs, % ...
github
shayo/Planner-master
SurfaceHelper.m
.m
Planner-master/Modules/ElectrodePlanning/SurfaceHelper/SurfaceHelper.m
22,834
utf_8
526ed41d78e82d60138ff2c0c264063b
function varargout = SurfaceHelper(varargin) % SURFACEHELPER M-file for SurfaceHelper.fig % SURFACEHELPER, by itself, creates a new SURFACEHELPER or raises the existing % singleton*. % % H = SURFACEHELPER returns the handle to a new SURFACEHELPER or the handle to % the existing singleton*. % % ...
github
shayo/Planner-master
fnHideShowPlanes2D.m
.m
Planner-master/Modules/ElectrodePlanning/Core and GUI/fnHideShowPlanes2D.m
1,108
utf_8
02ebc5e18b1812dd19500812945a9c12
function fnHideShowPlanes2D() global g_strctModule g_strctModule.m_strctGUIOptions.m_bShow2DPlanes = ~g_strctModule.m_strctGUIOptions.m_bShow2DPlanes; if g_strctModule.m_strctGUIOptions.m_bShow2DPlanes set(g_strctModule.m_strctPanel.m_strctXY.m_hLineYZ,'visible','on'); set(g_strctModule.m_strctPanel.m_strctXY...
github
shayo/Planner-master
fnCallback.m
.m
Planner-master/Modules/ElectrodePlanning/Core and GUI/fnCallback.m
137
utf_8
33b9f49219e4f0f58859b4e6e57f6add
function fnCallback(a,b,strEvent,varargin) %#ok global g_strctModule feval(g_strctModule.m_hCallbackFunc,strEvent,varargin{:}); return;
github
shayo/Planner-master
fnSetAllWindowsMode.m
.m
Planner-master/Modules/ElectrodePlanning/Core and GUI/fnSetAllWindowsMode.m
360
utf_8
75f143f24cf1da79737bccc6b974d369
function fnSetAllWindowsMode(strMode) global g_strctModule set(g_strctModule.m_strctPanel.m_strctXY.m_hPanel,'visible',strMode); set(g_strctModule.m_strctPanel.m_strctYZ.m_hPanel,'visible',strMode); set(g_strctModule.m_strctPanel.m_strctXZ.m_hPanel,'visible',strMode); set(g_strctModule.m_strctPanel.m_strct...
github
shayo/Planner-master
fnIntersectAxis.m
.m
Planner-master/Modules/ElectrodePlanning/Core and GUI/fnIntersectAxis.m
4,840
utf_8
4210f17eb4ac8a7e24ff56a94feb426a
function [hAxes,bCloseToCenter, afPenDir,hAxesLine] = fnIntersectAxis(strctMouseOp) global g_strctModule g_strctWindows hAxes = []; hAxesLine = []; fThreshold = 2; iWindowSize = g_strctModule.m_strctPanel.m_strctXY.m_aiPos(end); fCenterDist = 0.6*(iWindowSize/2); %#ok bCloseToCenter = false; %#ok afPenDir = []; bClose...
github
shayo/Planner-master
cylinder2P.m
.m
Planner-master/Modules/ElectrodePlanning/Core and GUI/cylinder2P.m
2,223
utf_8
ac7fd8dba2e4a89a99014e478c5886dc
% CYLINDER: A function to draw a N-sided cylinder based on the % generator curve in the vector R. % % Usage: [X, Y, Z] = cylinder(R, N) % % Arguments: R - The vector of radii used to define the radius of % the different segments of the cylinder. % N - The number of po...
github
shayo/Planner-master
fnRotatePlaneExactAuxComputeRotationAngle.m
.m
Planner-master/Modules/ElectrodePlanning/Core and GUI/fnRotatePlaneExactAuxComputeRotationAngle.m
1,481
utf_8
914968aec047d6acdd5c40b760f6895a
function fRotationAngle=fnRotatePlaneExactAuxComputeRotationAngle(pt3fPosIn3DSpace,strctCrossSection1,strctCrossSection2,strctCrossSection3, hAxes) [pt2fP1, pt2fP2] = fnCrossSectionIntersection(strctCrossSection1,strctCrossSection2); pt3fLine1=fnGet3DCoordAux(pt2fP1, hAxes); pt3fLine2=fnGet3DCoordAux(pt2fP2...
github
shayo/Planner-master
fnCorrectOrientation.m
.m
Planner-master/Modules/ElectrodePlanning/Core and GUI/fnCorrectOrientation.m
334
utf_8
e64d8522af95913d34873a7fe9285c8c
function fnCorrectOrientation() global g_strctModule if g_strctModule.m_iCurrAnatVol == 0 return; end; X = OrientationWizard(g_strctModule.m_acAnatVol{g_strctModule.m_iCurrAnatVol}); if ~isempty(X) g_strctModule.m_acAnatVol{g_strctModule.m_iCurrAnatVol} = X; fnSetDefaultCrossSections(); fnInvalidate()...
github
shayo/Planner-master
fnSetFocusNoZoom.m
.m
Planner-master/Modules/ElectrodePlanning/Core and GUI/fnSetFocusNoZoom.m
1,571
utf_8
80f12631764c11b5881e42285794914c
function fnSetFocusNoZoom(strctMouseOp) global g_strctModule hAxes = strctMouseOp.m_hAxes; if isempty(hAxes) return; end; switch hAxes case g_strctModule.m_strctPanel.m_strctXY.m_hAxes % Transform the clicked point to 3D coordinates pt2fPosMM = fnCrossSection_Image_To_MM(g_strctModule.m_strc...
github
shayo/Planner-master
fnRotatePlane.m
.m
Planner-master/Modules/ElectrodePlanning/Core and GUI/fnRotatePlane.m
1,678
utf_8
647993ed414f99a50b7f328cbb882468
function fnRotatePlane(hAxes, fDiff) global g_strctModule switch hAxes case g_strctModule.m_strctPanel.m_strctXY.m_hLineYZ % bottom left, red g_strctModule.m_strctCrossSectionYZ = fnRotateCrossSectionAux(... g_strctModule.m_strctCrossSectionYZ, g_strctModule.m_strctCrossSectionXZ, -fDiff/1...
github
shayo/Planner-master
fnShowTimeCourse.m
.m
Planner-master/Modules/ElectrodePlanning/Core and GUI/fnShowTimeCourse.m
2,744
utf_8
81389090176ae87a97321037aa029e31
function fnShowTimeCourse() global g_strctModule if ~isempty(g_strctModule.m_acFuncVol) && g_strctModule.m_iCurrFuncVol > 0 && isfield(g_strctModule.m_acFuncVol{g_strctModule.m_iCurrFuncVol},'m_a4fTimeCourse') a2fXYZ_To_CRS_Func = inv(g_strctModule.m_acFuncVol{g_strctModule.m_iCurrFuncVol}.m_a2fM) * inv(g_strctM...
github
shayo/Planner-master
fnRenameFunc.m
.m
Planner-master/Modules/ElectrodePlanning/Core and GUI/fnRenameFunc.m
398
utf_8
21ca8ed07615785e081260f14210d84e
function fnRenameFunc() global g_strctModule if g_strctModule.m_iCurrFuncVol == 0 return; end; answer=inputdlg({'New Functional Volume Name:'},'Change Volume Name',1,{g_strctModule.m_acFuncVol{g_strctModule.m_iCurrFuncVol}.m_strName}); if isempty(answer) return; end; g_strctModule.m_acFuncVol{g_strctModule.m...
github
shayo/Planner-master
fnSelectNewChamberInPlanningMode.m
.m
Planner-master/Modules/ElectrodePlanning/Core and GUI/fnSelectNewChamberInPlanningMode.m
268
utf_8
e87970e57d395c2a967455a522ed22b0
function fnSelectNewChamberInPlanningMode() global g_strctModule % if strctAnatVol.m_a2fRegToStereoTatic % strctPanel.m_hChambersList % end iSelectedChamber = get(g_strctModule.m_strctPanel.m_hChambersList,'value'); fnSelectChamberAux(iSelectedChamber); return;
github
shayo/Planner-master
fnSetFullScreen.m
.m
Planner-master/Modules/ElectrodePlanning/Core and GUI/fnSetFullScreen.m
112
utf_8
7f5c0b0e3bba900f5370768b9fe98f0d
function fnSetFullScreen() global g_strctModule fnZoomAxes(g_strctModule.m_strctMouseOpMenu.m_hAxes); return;
github
shayo/Planner-master
fnMoveLightSource.m
.m
Planner-master/Modules/ElectrodePlanning/Core and GUI/fnMoveLightSource.m
107
utf_8
e4c5f1d8d359aada3de99d04fea0f27a
function fnMoveLightSource() global g_strctModule g_strctModule.m_strMouse3DMode = 'MoveLights'; return;
github
shayo/Planner-master
fnAbsoluteOrientation.m
.m
Planner-master/Modules/ElectrodePlanning/Core and GUI/fnAbsoluteOrientation.m
3,860
utf_8
94d9eaac3c80b4a10383bffdd1c59dff
% [s R T error] = absoluteOrientationQuaternion( A, B, doScale) % % Computes the orientation and position (and optionally the uniform scale % factor) for the transformation between two corresponding 3D point sets Ai % and Bi such as they are related by: % % Bi = sR*Ai+T % % Implementation is based on the paper by...
github
shayo/Planner-master
fnRotateAxesInPlane.m
.m
Planner-master/Modules/ElectrodePlanning/Core and GUI/fnRotateAxesInPlane.m
758
utf_8
47965e4ba50a52885340cecc7041f545
function fnRotateAxesInPlane(hAxes,afDelta) global g_strctModule if isempty(hAxes) return; end; switch hAxes case g_strctModule.m_strctPanel.m_strctXY.m_hAxes g_strctModule.m_strctCrossSectionXY = ... fnRotateInPlaneCrossSectionAux(g_strctModule.m_strctCrossSectionXY, afDelta(1)/100*pi); ...
github
shayo/Planner-master
fnSaveSession.m
.m
Planner-master/Modules/ElectrodePlanning/Core and GUI/fnSaveSession.m
544
utf_8
4ddc4eb89a7b24ddd45c798517b39ffa
function fnSaveSession() global g_strctModule %#ok [strFile,strPath]=uiputfile('PlannerSession.mat'); if strFile(1) == 0 return; end; if exist([strPath,strFile],'file') && fnFileSize([strPath,strFile]) > 0 % Generate a backup (only if the current file is not empty...) fprintf('Generating a backup file bef...
github
shayo/Planner-master
fnZoomAxes.m
.m
Planner-master/Modules/ElectrodePlanning/Core and GUI/fnZoomAxes.m
588
utf_8
975bc3798d0d92a79685dbfa9e79c28e
function fnZoomAxes(hAxes) global g_strctModule if ~isempty(hAxes) switch hAxes case g_strctModule.m_strctPanel.m_strctXY.m_hAxes fnZoomAxesAux('m_strctXY'); case g_strctModule.m_strctPanel.m_strctXZ.m_hAxes fnZoomAxesAux('m_strctXZ'); case g_strctModule.m_strctPanel.m_strctYZ.m_hAxes ...
github
shayo/Planner-master
fnShiftPlaneExact.m
.m
Planner-master/Modules/ElectrodePlanning/Core and GUI/fnShiftPlaneExact.m
1,565
utf_8
09e2ed08326e7f8be8aa7d490bb09d5a
function fnShiftPlaneExact(strctLastMouseDown, strctMouseOp) global g_strctModule % Transform MouseOp into a 3D Point. pt3fPosIn3DSpace=fnGet3DCoord(strctMouseOp); switch strctLastMouseDown.m_hAxesSelected case g_strctModule.m_strctPanel.m_strctXY.m_hAxes fDist = fnPointPlaneDist(g_strctModule.m_strctCr...
github
shayo/Planner-master
fnGetDistanceToLine.m
.m
Planner-master/Modules/ElectrodePlanning/Core and GUI/fnGetDistanceToLine.m
454
utf_8
6465f09dfa519a66e4a1542631d358ab
function [fDist, fDistFromCenter,afPenDir] = fnGetDistanceToLine(pt2fPos, hAxes) afX = get(hAxes,'xdata'); afY = get(hAxes,'ydata'); fDist = abs(((afX(2)-afX(1)) * (afY(1)-pt2fPos(2)) - (afX(1)-pt2fPos(1))*(afY(2)-afY(1))) / sqrt( (afX(2)-afX(1))^2 + (afY(2)-afY(1))^2)); fDistFromCenter = sqrt( (mean(afX) - pt2fPos(1)...
github
shayo/Planner-master
fnDrawControlableObject.m
.m
Planner-master/Modules/ElectrodePlanning/Core and GUI/fnDrawControlableObject.m
844
utf_8
1f52236c1ca8e517006351d1e50ffc48
function fnDrawControlableObject() global g_strctModule % Delete old contours. if isfield(g_strctModule,'m_ahControllableObjects') delete(g_strctModule.m_ahControllableObjects(ishandle(g_strctModule.m_ahControllableObjects))); end; ahRulerHandles = []; if isfield(g_strctModule.m_acAnatVol{g_strctModule.m_iCurrA...
github
shayo/Planner-master
fnSetNewPanLevel.m
.m
Planner-master/Modules/ElectrodePlanning/Core and GUI/fnSetNewPanLevel.m
1,303
utf_8
423eed163523e58596f40125df57893c
function fnSetNewPanLevel(hAxes, afDelta) global g_strctModule if ~isempty(hAxes) switch hAxes case g_strctModule.m_strctPanel.m_strctXY.m_hAxes pt3fCurrPos = g_strctModule.m_strctCrossSectionXY.m_a2fM(1:3,4); pt3fNewPos = pt3fCurrPos + ... -afDelta(1) * g_strctModule.m_strctCrossSect...
github
shayo/Planner-master
fnIntersectsControllableObject.m
.m
Planner-master/Modules/ElectrodePlanning/Core and GUI/fnIntersectsControllableObject.m
855
utf_8
e33aa5db21b64ea8a7163f526bd89a6d
function [bIntersects, strctObject, strWhat,iObjectIndex] = fnIntersectsControllableObject(strctMouseOp) global g_strctModule bIntersects = false; strctObject = []; strWhat = []; iObjectIndex = []; if isfield(g_strctModule.m_acAnatVol{g_strctModule.m_iCurrAnatVol},'m_acControllableObjects') iNumObjects = leng...