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 | fnHideShowPlanes3D.m | .m | Planner-master/Modules/ElectrodePlanning/Core and GUI/fnHideShowPlanes3D.m | 604 | utf_8 | 662eead564b530e3c09ed27803e8cf05 |
function fnHideShowPlanes3D()
global g_strctModule
g_strctModule.m_strctGUIOptions.m_bShow3DPlanes = ~g_strctModule.m_strctGUIOptions.m_bShow3DPlanes ;
if g_strctModule.m_strctGUIOptions.m_bShow3DPlanes
set(g_strctModule.m_strctPanel.m_hPlaneXY,'visible','on');
set(g_strctModule.m_strctPanel.m_hPlaneXZ,'visi... |
github | shayo/Planner-master | fnSafeDelete.m | .m | Planner-master/Modules/ElectrodePlanning/Core and GUI/fnSafeDelete.m | 135 | utf_8 | 8c6d61ae058f41a99c78db13744cfca4 |
function fnSafeDelete(ahHandles)
if isempty(ahHandles)
return;
end
delete(ahHandles(ishandle(ahHandles)))
return;
|
github | shayo/Planner-master | fnSetFocus.m | .m | Planner-master/Modules/ElectrodePlanning/Core and GUI/fnSetFocus.m | 1,753 | utf_8 | f31a909e2711c8803bc9c2dd0afbe824 |
function fnSetFocus()
global g_strctModule
hAxes = g_strctModule.m_strctMouseOpMenu.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_st... |
github | shayo/Planner-master | fnInvalidateOverlayAxes.m | .m | Planner-master/Modules/ElectrodePlanning/Core and GUI/fnInvalidateOverlayAxes.m | 1,700 | utf_8 | 943ef37e6bc9c4502ec42d60603fa8b8 |
function fnInvalidateOverlayAxes()
global g_strctModule
set(g_strctModule.m_strctPanel.m_strctOverlayAxes.hLine2,'xdata',...
[g_strctModule.m_strctOverlay.m_pt2fLeft(1) g_strctModule.m_strctOverlay.m_pt2fRight(1)],...
'Ydata',[g_strctModule.m_strctOverlay.m_pt2fLeft(2) g_strctModule.m_strctOverlay.m_pt2fRight(... |
github | shayo/Planner-master | fnQuickAddVolume.m | .m | Planner-master/Modules/ElectrodePlanning/Core and GUI/fnQuickAddVolume.m | 12,788 | utf_8 | a9226bb4b289aa295ad42a3053cf71f5 | function strctAnatVol = fnQuickAddVolume(strFileName)
aiImageRes = [256,256];
strctMRI = MRIread(strFileName);
if size(strctMRI.vol,4) > 1
strctMRI.vol = strctMRI.vol(:,:,:,1);
end;
[strctCrossSectionHoriz,strctCrossSectionSaggital,strctCrossSectionCoronal] = fnSetDefaultCrossSectionsCorrect(strctMRI.volsize, strct... |
github | shayo/Planner-master | fnRotatePlaneExact.m | .m | Planner-master/Modules/ElectrodePlanning/Core and GUI/fnRotatePlaneExact.m | 3,204 | utf_8 | 8d547d8e4c15c25ab01de9b1e393c547 |
function fnRotatePlaneExact(strctMouseDown, strctMouseOp) %#ok
global g_strctModule
pt3fPosIn3DSpace=fnGet3DCoord(strctMouseOp);
switch strctMouseDown.m_hAxesLineSelected
case g_strctModule.m_strctPanel.m_strctXY.m_hLineYZ % bottom left, red
fRotationAngle=fnRotatePlaneExactAuxComputeRotationAngle(p... |
github | shayo/Planner-master | fnCopyOrientation.m | .m | Planner-master/Modules/ElectrodePlanning/Core and GUI/fnCopyOrientation.m | 1,122 | utf_8 | 6522f73232d1db669e2c87dcf56255cf |
function fnCopyOrientation(a,b,iAnatVolFrom) %#ok
global g_strctModule
g_strctModule.m_acAnatVol{g_strctModule.m_iCurrAnatVol}.m_strctCrossSectionCoronal = g_strctModule.m_acAnatVol{iAnatVolFrom}.m_strctCrossSectionCoronal;
g_strctModule.m_acAnatVol{g_strctModule.m_iCurrAnatVol}.m_strctCrossSectionHoriz = g_strctModul... |
github | shayo/Planner-master | fnChangeMouseMode.m | .m | Planner-master/Modules/ElectrodePlanning/Core and GUI/fnChangeMouseMode.m | 3,103 | utf_8 | c7f071b8ad5b6a7862062fab548f2d6d |
function fnChangeMouseMode(strMouseMode, strDescription, strMouseIcon)
global g_strctModule
if ~exist('strDescription','var')
switch strMouseMode
case 'Crosshair'
strDescription = 'Jump to new position';
case 'Scroll'
strDescription = 'Scroll Through Slices';
case 'C... |
github | shayo/Planner-master | fnGetRotationMatrixFromAxes.m | .m | Planner-master/Modules/ElectrodePlanning/Core and GUI/fnGetRotationMatrixFromAxes.m | 1,093 | utf_8 | 61a20425d2c3eda6f338dabcc25a5e14 | function rotHV = fnGetRotationMatrixFromAxes(ax,dt,dp)
a = get(ax, 'cameraposition' );
b = get(ax, 'cameratarget' );
dar = get(ax, 'dataaspectratio');
up = get(ax, 'cameraupvector' );
v = (b-a)./dar;
r = crossSimple(v, up./dar);
u = crossSimple(r, v);
dis = norm(v);
v = v/dis;
r = r/norm(r);
u = u/norm(u);
hax... |
github | shayo/Planner-master | fnRenameAnat.m | .m | Planner-master/Modules/ElectrodePlanning/Core and GUI/fnRenameAnat.m | 395 | utf_8 | e2f19903097cf304cab25eac6a73d044 |
function fnRenameAnat()
global g_strctModule
if g_strctModule.m_iCurrAnatVol == 0
return;
end;
answer=inputdlg({'New Anatomical Volume Name:'},'Change Volume Name',1,{g_strctModule.m_acAnatVol{g_strctModule.m_iCurrAnatVol}.m_strName});
if isempty(answer)
return;
end;
g_strctModule.m_acAnatVol{g_strctModule.m... |
github | shayo/Planner-master | fnLocalizeRegion.m | .m | Planner-master/Modules/ElectrodePlanning/Atlas/fnLocalizeRegion.m | 514 | utf_8 | 46d8b191e816ee489c70dd05bfaa09a4 |
function fnLocalizeRegion()
% Which region is selected?
global g_strctModule
jUIScrollPane = findjobj(g_strctModule.m_strctPanel.m_hAtlasTable);
jUITable = jUIScrollPane(2).getViewport.getView;
iRegion = jUITable.getSelectedRow + 1; % Java indexes start at 0
if iRegion == 0
return;
end;
pt3fCenterAtlasCoord ... |
github | shayo/Planner-master | fnToggleAtlas.m | .m | Planner-master/Modules/ElectrodePlanning/Atlas/fnToggleAtlas.m | 169 | utf_8 | 2c9befb17a93f84ca076ec5c68cfb2f6 |
function fnToggleAtlas()
global g_strctModule
g_strctModule.m_strctGUIOptions.m_bShowAtlas = ~g_strctModule.m_strctGUIOptions.m_bShowAtlas;
fnInvalidate();
return;
|
github | shayo/Planner-master | fnScaleAtlasMouse.m | .m | Planner-master/Modules/ElectrodePlanning/Atlas/fnScaleAtlasMouse.m | 75 | utf_8 | 644eb3b853cf35b1cacc24c297445b31 |
function fnScaleAtlasMouse()
fnChangeMouseMode('ScaleAtlas');
return; |
github | shayo/Planner-master | fnSearchAtlasRegion.m | .m | Planner-master/Modules/ElectrodePlanning/Atlas/fnSearchAtlasRegion.m | 577 | utf_8 | 4040eadeb8e985355c98c9bad080592d |
function fnSearchAtlasRegion()
global g_strctModule
strSearchPattern = get(g_strctModule.m_strctPanel.m_hRegionSearchEdit,'String');
jUIScrollPane = findjobj(g_strctModule.m_strctPanel.m_hAtlasTable);
jUITable = jUIScrollPane(2).getViewport.getView;
jUITable.setRowSelectionAllowed(0);
jUITable.setColumnSelectionAllo... |
github | shayo/Planner-master | fnRotateAtlasMouse.m | .m | Planner-master/Modules/ElectrodePlanning/Atlas/fnRotateAtlasMouse.m | 77 | utf_8 | e438b64007221b895d37d842bbc17993 |
function fnRotateAtlasMouse()
fnChangeMouseMode('RotateAtlas');
return;
|
github | shayo/Planner-master | fnMoveAtlasMouse.m | .m | Planner-master/Modules/ElectrodePlanning/Atlas/fnMoveAtlasMouse.m | 68 | utf_8 | c6256dcbee8d5e4e4cb3278967a71e6c |
function fnMoveAtlasMouse()
fnChangeMouseMode('MoveAtlas');
return; |
github | shayo/Planner-master | fnVirtualArmSave.m | .m | Planner-master/Modules/ElectrodePlanning/StereotaxMarkers/fnVirtualArmSave.m | 325 | utf_8 | c9c2d8fc7367e84a3b6b10dc8244abd0 |
function fnVirtualArmSave()
global g_strctModule
iNumSavedArms = length(g_strctModule.m_acAnatVol{g_strctModule.m_iCurrAnatVol}.m_acSavedVirtualArms);
g_strctModule.m_acAnatVol{g_strctModule.m_iCurrAnatVol}.m_acSavedVirtualArms{iNumSavedArms+1} = g_strctModule.m_strctVirtualArm;
fnInvalidateVirtualArmList();
retu... |
github | shayo/Planner-master | StereotaxMarkersGUI.m | .m | Planner-master/Modules/ElectrodePlanning/StereotaxMarkers/StereotaxMarkersGUI.m | 3,820 | utf_8 | f225c8e2e78b963800e52cca7f619091 | function varargout = StereotaxMarkersGUI(varargin)
% STEREOTAXMARKERSGUI MATLAB code for StereotaxMarkersGUI.fig
% STEREOTAXMARKERSGUI, by itself, creates a new STEREOTAXMARKERSGUI or raises the existing
% singleton*.
%
% H = STEREOTAXMARKERSGUI returns the handle to a new STEREOTAXMARKERSGUI or the hand... |
github | shayo/Planner-master | fnLinkFixValue.m | .m | Planner-master/Modules/ElectrodePlanning/StereotaxMarkers/fnLinkFixValue.m | 657 | utf_8 | abdc633578df7d61f440b23ded5ed71a |
function fnLinkFixValue(iLinkIndex)
global g_strctModule
bFixed = get(g_strctModule.m_strctPanel.m_ahLinkFixed(iLinkIndex),'value');
if ~bFixed
set(g_strctModule.m_strctPanel.m_ahLinkEdit(iLinkIndex),'enable','on');
set(g_strctModule.m_strctPanel.m_ahLinkSlider(iLinkIndex),'enable','on');
g_strctModule.m_s... |
github | shayo/Planner-master | fnSwitchStereoModel.m | .m | Planner-master/Modules/ElectrodePlanning/StereotaxMarkers/fnSwitchStereoModel.m | 2,614 | utf_8 | f5e98cb97b89c2178ae8480c7dcca5a9 |
function fnSwitchStereoModel()
global g_strctModule
iNewModel = get(g_strctModule.m_strctPanel.m_hStereoFramesList,'value');
% Warning, this will erase ALL previous information about current marker
% Current marker?
g_strctModule.m_iStereoModelSelected = iNewModel;
% Update the arm list
g_strctModule.m_iStereoArmSel... |
github | shayo/Planner-master | fnJointEdit.m | .m | Planner-master/Modules/ElectrodePlanning/StereotaxMarkers/fnJointEdit.m | 718 | utf_8 | cb5d81614ad7741e24aaa14b09d67a19 |
function fnJointEdit()
global g_strctModule
iSelectedMarker = get(g_strctModule.m_strctPanel.m_hMarkersList,'value');
if length(iSelectedMarker) > 1 || g_strctModule.m_iCurrAnatVol == 0
return;
end;
if ~isempty(iSelectedMarker) && iSelectedMarker > 0 && isfield(g_strctModule.m_acAnatVol{g_strctModule.m_iCurrAnatV... |
github | shayo/Planner-master | fnAddMarkerSmart.m | .m | Planner-master/Modules/ElectrodePlanning/StereotaxMarkers/fnAddMarkerSmart.m | 168 | utf_8 | aa70f2781e2eb18d9ff83c8a16cb04ae |
function fnAddMarkerSmart()
global g_strctModule
fnChangeMouseMode('AddTwoClickObject', 'Add Marker');
g_strctModule.m_hClickCallback = @fnAddMarkerSmartAux;
return;
|
github | shayo/Planner-master | fnRenameMarker.m | .m | Planner-master/Modules/ElectrodePlanning/StereotaxMarkers/fnRenameMarker.m | 683 | utf_8 | 5bdb54c2b44e093b322cb0033ec48de6 |
function fnRenameMarker()
global g_strctModule
if isempty(g_strctModule.m_iCurrAnatVol)
return;
end;
iSelectedMarker = get(g_strctModule.m_strctPanel.m_hMarkersList,'value');
if length(iSelectedMarker) > 1
msgbox('This option is available for only one marker');
return;
end;
if iSelectedMarker > 0
answe... |
github | shayo/Planner-master | fnRotateMarker.m | .m | Planner-master/Modules/ElectrodePlanning/StereotaxMarkers/fnRotateMarker.m | 70 | utf_8 | 400ca2f19bbc88e09237c423561dec9f |
function fnRotateMarker()
fnChangeMouseMode('RotateMarker');
return;
|
github | shayo/Planner-master | fnAddMarkerSmartAux.m | .m | Planner-master/Modules/ElectrodePlanning/StereotaxMarkers/fnAddMarkerSmartAux.m | 4,449 | utf_8 | 21f656820a72cdf28868c5c2d23b314b |
function fnAddMarkerSmartAux(strctMouseOpStart,strctMouseOpEnd)
global g_strctModule
a2fXYZ_To_CRS = inv(g_strctModule.m_acAnatVol{g_strctModule.m_iCurrAnatVol}.m_a2fM) * inv(g_strctModule.m_acAnatVol{g_strctModule.m_iCurrAnatVol}.m_a2fReg); %#ok
a2fCRS_To_XYZ = inv(a2fXYZ_To_CRS); %#ok
strctCrossSection=fnAxesHandl... |
github | shayo/Planner-master | fnShowHideMarkers.m | .m | Planner-master/Modules/ElectrodePlanning/StereotaxMarkers/fnShowHideMarkers.m | 176 | utf_8 | 00f4efb155e02b467d215dfc9fae9542 |
function fnShowHideMarkers()
global g_strctModule
g_strctModule.m_strctGUIOptions.m_bShowMarkers = ~g_strctModule.m_strctGUIOptions.m_bShowMarkers;
fnInvalidate();
return;
|
github | shayo/Planner-master | fnMoveMarker.m | .m | Planner-master/Modules/ElectrodePlanning/StereotaxMarkers/fnMoveMarker.m | 67 | utf_8 | 8da67ac307ea0aa2632609859a43ddb4 |
function fnMoveMarker()
fnChangeMouseMode('MoveMarker');
return;
|
github | shayo/Planner-master | fnSwitchVirtualArm.m | .m | Planner-master/Modules/ElectrodePlanning/StereotaxMarkers/fnSwitchVirtualArm.m | 460 | utf_8 | c7f495c1514501854ede07aca0ed8631 |
function fnSwitchVirtualArm()
global g_strctModule
iSelectedArm = get(g_strctModule.m_strctPanel.m_hVirtualArmList,'value');
iNumSavedArms = length(g_strctModule.m_acAnatVol{g_strctModule.m_iCurrAnatVol}.m_acSavedVirtualArms);
if iSelectedArm > iNumSavedArms
return;
end;
g_strctModule.m_strctVirtualArm = g_strctM... |
github | shayo/Planner-master | fnMoveMarkerAux.m | .m | Planner-master/Modules/ElectrodePlanning/StereotaxMarkers/fnMoveMarkerAux.m | 1,570 | utf_8 | e59c6cd93df2eaa427fb5f50a63bed83 |
function fnMoveMarkerAux(strctMouseOp, afDelta)
global g_strctModule
if isempty(g_strctModule.m_acAnatVol{g_strctModule.m_iCurrAnatVol}.m_astrctMarkers )
return;
end;
strctCrossSection=fnAxesHandleToStrctCrossSection(strctMouseOp.m_hAxes);
if isempty(strctCrossSection)
return;
end;
iCurrMarker = get(g_strct... |
github | shayo/Planner-master | fnSwitchJoint.m | .m | Planner-master/Modules/ElectrodePlanning/StereotaxMarkers/fnSwitchJoint.m | 630 | utf_8 | 1f1ac88ffa008818acfd2cccd877f38e |
function fnSwitchJoint()
global g_strctModule
iSelectedMarker = get(g_strctModule.m_strctPanel.m_hMarkersList,'value');
if length(iSelectedMarker) > 1 || g_strctModule.m_iCurrAnatVol == 0 || ~isfield(g_strctModule.m_acAnatVol{g_strctModule.m_iCurrAnatVol},'m_astrctMarkers')
return;
end;
g_strctModule.m_iJointSelec... |
github | shayo/Planner-master | fnRotateMarkerAux.m | .m | Planner-master/Modules/ElectrodePlanning/StereotaxMarkers/fnRotateMarkerAux.m | 1,755 | utf_8 | 7972ba4c472c491821c5e90aa17792db |
function fnRotateMarkerAux(hAxes, afDelta)
global g_strctModule
strctCrossSection=fnAxesHandleToStrctCrossSection(hAxes);
if ~isfield(g_strctModule.m_acAnatVol{g_strctModule.m_iCurrAnatVol},'m_astrctMarkers') || ...
isempty(g_strctModule.m_acAnatVol{g_strctModule.m_iCurrAnatVol}.m_astrctMarkers) || ...
... |
github | shayo/Planner-master | fnChangeVirtualArmType.m | .m | Planner-master/Modules/ElectrodePlanning/StereotaxMarkers/fnChangeVirtualArmType.m | 1,062 | utf_8 | 68e031495c9c639834b84770b7261fbf |
function fnChangeVirtualArmType()
global g_strctModule
% First, delete current controllers.
try
delete([g_strctModule.m_strctPanel.m_ahLinkEdit,g_strctModule.m_strctPanel.m_ahLinkFixed,g_strctModule.m_strctPanel.m_ahLinkSlider]);
catch %#ok
end
iNewManipulatorIndex = get(g_strctModule.m_strctPanel.m_hVirtualArmTyp... |
github | shayo/Planner-master | fnInvalidateVirtualArmList.m | .m | Planner-master/Modules/ElectrodePlanning/StereotaxMarkers/fnInvalidateVirtualArmList.m | 763 | utf_8 | 22d3245fe64b5ab3b860b0d8ceb31b34 |
function fnInvalidateVirtualArmList()
global g_strctModule
if ~isfield(g_strctModule.m_acAnatVol{g_strctModule.m_iCurrAnatVol},'m_acSavedVirtualArms')
g_strctModule.m_acAnatVol{g_strctModule.m_iCurrAnatVol}.m_acSavedVirtualArms = {};
end
iNumSavedArms = length(g_strctModule.m_acAnatVol{g_strctModule.m_iCurrAnatV... |
github | shayo/Planner-master | fnSetArmOnMarker.m | .m | Planner-master/Modules/ElectrodePlanning/StereotaxMarkers/fnSetArmOnMarker.m | 2,613 | utf_8 | 08eb18cf0f6ae4126ef237c023f8e1a6 |
function fnSetArmOnMarker()
global g_strctModule
iSelectedMarker = get(g_strctModule.m_strctPanel.m_hMarkersList,'value');
if length(iSelectedMarker) > 1 || g_strctModule.m_iCurrAnatVol == 0
return;
end;
if ~isempty(iSelectedMarker) && iSelectedMarker > 0 && isfield(g_strctModule.m_acAnatVol{g_strctModule.m_iCurrA... |
github | shayo/Planner-master | fnLinkEditValue.m | .m | Planner-master/Modules/ElectrodePlanning/StereotaxMarkers/fnLinkEditValue.m | 1,381 | utf_8 | 6ae0d8266f967771a257d6cbfca4629c |
function fnLinkEditValue(iLinkIndex)
global g_strctModule
fNewValue = str2num(get(g_strctModule.m_strctPanel.m_ahLinkEdit(iLinkIndex),'string')); %#ok
if isempty(fNewValue) || ~isreal(fNewValue)
% recover old value...
set(g_strctModule.m_strctPanel.m_ahLinkEdit(iLinkIndex),'string',sprintf('%.2f',g_strctModu... |
github | shayo/Planner-master | fnSelectMarker.m | .m | Planner-master/Modules/ElectrodePlanning/StereotaxMarkers/fnSelectMarker.m | 5,308 | utf_8 | 9b08acd67056e5fd4aa140aa7b90145e |
function fnSelectMarker()
global g_strctModule
iSelectedMarker = get(g_strctModule.m_strctPanel.m_hMarkersList,'value');
if length(iSelectedMarker) > 1 || g_strctModule.m_iCurrAnatVol == 0
return;
end;
if ~isempty(iSelectedMarker) && iSelectedMarker > 0 && isfield(g_strctModule.m_acAnatVol{g_strctModule.m_iCurrAna... |
github | shayo/Planner-master | fnSwitchStereoArm.m | .m | Planner-master/Modules/ElectrodePlanning/StereotaxMarkers/fnSwitchStereoArm.m | 1,181 | utf_8 | df7b0b46c87731d5461ce757831dfcd9 |
function fnSwitchStereoArm()
global g_strctModule
g_strctModule.m_iStereoArmSelected = get(g_strctModule.m_strctPanel.m_hStereoArmsList,'value');
iSelectedMarker = get(g_strctModule.m_strctPanel.m_hMarkersList,'value');
if length(iSelectedMarker) > 1 || g_strctModule.m_iCurrAnatVol == 0
return;
end;
if ~isempty(i... |
github | shayo/Planner-master | fnRefreshStereoModels.m | .m | Planner-master/Modules/ElectrodePlanning/StereotaxMarkers/fnRefreshStereoModels.m | 1,084 | utf_8 | 0c91eba3b48011d02c33bc115507aeea |
function fnRefreshStereoModels()
global g_strctModule
%%
% Initialize stereotaxtic models
iNumModels = length(g_strctModule.m_strctConfig.m_acStereoModels.m_strctModel);
for iModelIter=1:iNumModels
astrctStereoTaxticModels(iModelIter).m_strName = g_strctModule.m_strctConfig.m_acStereoModels.m_strctModel{iModelIte... |
github | shayo/Planner-master | fnChangeVirtualArmTypeAux.m | .m | Planner-master/Modules/ElectrodePlanning/StereotaxMarkers/fnChangeVirtualArmTypeAux.m | 875 | utf_8 | 030cdc84482368994b5f76e9b90e8fd6 |
function fnChangeVirtualArmTypeAux()
global g_strctModule
iStartY = 590;
[g_strctModule.m_strctPanel.m_ahLinkFixed,g_strctModule.m_strctPanel.m_ahLinkSlider, g_strctModule.m_strctPanel.m_ahLinkEdit, iNextY] = ...
fnGenerateControllersForVirtualArm(g_strctModule.m_strctPanel,g_strctModule.m_strctVirtualArm.m_astrct... |
github | shayo/Planner-master | fnAddBloodVesselMode.m | .m | Planner-master/Modules/ElectrodePlanning/Blood Surface/fnAddBloodVesselMode.m | 76 | utf_8 | 0175c1ae20071bc3302028994ba1fd05 |
function fnAddBloodVesselMode()
fnChangeMouseMode('AddBloodVessel');
return |
github | shayo/Planner-master | fnAddBloodVessels.m | .m | Planner-master/Modules/ElectrodePlanning/Blood Surface/fnAddBloodVessels.m | 326 | utf_8 | 8d3aafda4d5164b7fc0139f5e18b0c5b |
function fnAddBloodVessels()
global g_strctModule
if g_strctModule.m_iCurrAnatVol == 0
return;
end;
X = BloodVesselHelper(g_strctModule.m_acAnatVol{g_strctModule.m_iCurrAnatVol});
if ~isempty(X)
g_strctModule.m_acAnatVol{g_strctModule.m_iCurrAnatVol} = X;
fnUpdateSurfacePatch();
fnInvalidate();
end
ret... |
github | shayo/Planner-master | fnGenerateBloodVesselSurfacePatch.m | .m | Planner-master/Modules/ElectrodePlanning/Blood Surface/fnGenerateBloodVesselSurfacePatch.m | 1,394 | utf_8 | a5ec48431b4b3edd377d242ef0714749 |
function fnGenerateBloodVesselSurfacePatch()
global g_strctModule
strctIsoCRS = g_strctModule.m_acAnatVol{g_strctModule.m_iCurrAnatVol}.m_strctBloodSurface;
if isfield(g_strctModule.m_strctPanel,'m_hBloodSurface') && ~isempty(g_strctModule.m_strctPanel.m_hBloodSurface) && ishandle(g_strctModule.m_strctPanel.m_hBloodSu... |
github | shayo/Planner-master | fnShowHideBloodVessels.m | .m | Planner-master/Modules/ElectrodePlanning/Blood Surface/fnShowHideBloodVessels.m | 191 | utf_8 | 3242fe06d9382e18bc52769e7d70603f |
function fnShowHideBloodVessels()
global g_strctModule
g_strctModule.m_strctGUIOptions.m_bShowBloodVessels = ~g_strctModule.m_strctGUIOptions.m_bShowBloodVessels;
fnInvalidate();
return;
|
github | shayo/Planner-master | fnOverlayBlood.m | .m | Planner-master/Modules/ElectrodePlanning/Blood Surface/fnOverlayBlood.m | 206 | utf_8 | 9b870a3143486f72322150439d4c92b4 |
function a3fCrossSection = fnOverlayBlood(a3fCrossSection,a2bBlood)
for k=2:3
A=a3fCrossSection(:,:,k);
A(a2bBlood) = (double(k == 3) || double(k == 2));
a3fCrossSection(:,:,k) = A;
end
return; |
github | shayo/Planner-master | fnHideShowBloodVessels.m | .m | Planner-master/Modules/ElectrodePlanning/Blood Surface/fnHideShowBloodVessels.m | 573 | utf_8 | 05a3e91319d97062a979b5a9d2e9e18b |
function fnHideShowBloodVessels()
global g_strctModule
g_strctModule.m_strctGUIOptions.m_bShowBloodVessels = ~g_strctModule.m_strctGUIOptions.m_bShowBloodVessels;
if isfield(g_strctModule.m_strctPanel,'m_hBloodSurface') && ~isempty(g_strctModule.m_strctPanel.m_hBloodSurface) && ishandle(g_strctModule.m_strctPanel.m_hB... |
github | shayo/Planner-master | wm_seg_afd.m | .m | Planner-master/PublicLib/FreeSurfer/wm_seg_afd.m | 4,031 | utf_8 | 03c0f76b820e08c6c288273081c05822 | function [Dice,pval]=wm_seg_adf(subject, th_pval)
% For the subject "subject": computes the Dice coefficient D=2Nab/Na+Nb
% where:
% Na is the volume of the WM obtrained trough the volume-based labeling
% Nb is the volume of the WM segmented in the surface-based stream
% Nab is the volume of the overlap
% Uses... |
github | shayo/Planner-master | load_dicom_series.m | .m | Planner-master/PublicLib/FreeSurfer/load_dicom_series.m | 3,330 | utf_8 | a3016fa46e79b652f627f470a66eb4a1 | function [vol, M, tmpdcminfo, mr_parms] = load_dicom_series(seriesno,dcmdir,dcmfile)
% [vol, M, dcminfo] = load_dicom_series(seriesno,<dcmdir>,<dcmfile>)
%
% Reads in a dicom series given:
% 1. The series number and directory, or
% 2. A dicom file from the desired series
%
% If the series number is given but no dcmdi... |
github | shayo/Planner-master | fast_mkdesignmtx.m | .m | Planner-master/PublicLib/FreeSurfer/fast_mkdesignmtx.m | 10,708 | utf_8 | 1d7f844d2dd85ce151fb2a19cb56f2e5 | function r = fast_mkdesignmtx(varargin)
% r = fast_mkdesignmtx(varargin)
% '$Id: fast_mkdesignmtx.m,v 1.1 2003/03/04 20:47:38 greve Exp $'
version = '$Id: fast_mkdesignmtx.m,v 1.1 2003/03/04 20:47:38 greve Exp $';
fprintf(1,'%s\n',version);
r = 1;
%% Print usage if there are no arguments %%
if(nargin == 0)
print_us... |
github | shayo/Planner-master | fast_fxcfg_fourier.m | .m | Planner-master/PublicLib/FreeSurfer/fast_fxcfg_fourier.m | 4,741 | utf_8 | 7600a211afc3f0d82e1f4b7d2043be56 | function rt = fast_fxcfg_fourier(DoWhat,thing)
% Handle configuration for a fourier regressor. This is
% not an Event Response Model.
%
% rt = fast_fxcfg_spmhrf(DoWhat,thing)
%
% DoWhat can be:
% iserm - returns 0 because this is not an erm. thing not needed.
% nparams - returns number of parameters in model (3). th... |
github | shayo/Planner-master | rawplot.m | .m | Planner-master/PublicLib/FreeSurfer/rawplot.m | 4,511 | utf_8 | 510ebe21f46bbce6ff4e3260ddbe13b3 | function varargout = rawplot(varargin)
% rawplot Application M-file for rawplot.fig
% fig = rawplot launch rawplot GUI.
% rawplot('callback_name', ...) invoke the named callback.
if(nargin == 0)
% Launch new GUI
fig = openfig(mfilename,'new');
set(fig,'name','FSFAST Raw Plot');
% Use system color scheme ... |
github | shayo/Planner-master | fast_fxcfg_fir.m | .m | Planner-master/PublicLib/FreeSurfer/fast_fxcfg_fir.m | 5,950 | utf_8 | e8a7131f34d11f5fca206120b41322c1 | function rt = fast_fxcfg_fir(DoWhat,thing)
% rt = fast_fxcfg_fir(DoWhat,thing)
%
% DoWhat can be:
% iserm - returns 1 if erm, 0 otherwise. thing not needed.
% nparams - returns number of parameters in model (5). thing not needed.
% nregressors - number of regressors in current X matrix. thing=flacfg
% matrix - X m... |
github | shayo/Planner-master | fmri_lddat.m | .m | Planner-master/PublicLib/FreeSurfer/fmri_lddat.m | 2,750 | utf_8 | 81bf39e75fbb9c58a0a0e054bb86ce53 | function [nNNC,nHEst,DOF,TR,nRuns,nTP,nRows,nCols,nSkip,DTOrder,...
Rescale,TW,TPS,HanRad,BASeg,GammaFit, gfDelta, gfTau, ...
NullCondId, SumXtX] = fmri_lddat(datfile)
%
% Load information and parameters from a data file.
%
% [nNNC,nHEst,DOF,TR,nRuns,nTP,nRows,nCols,nSkip,DTOrder,Rescale,TW,TPS]
%... |
github | shayo/Planner-master | fast_compute_cvm.m | .m | Planner-master/PublicLib/FreeSurfer/fast_compute_cvm.m | 6,025 | utf_8 | 9b2de5de4d869ecb35aced7ef52e545e | function r = fast_compute_cvm(varargin)
% r = fast_compute_cvm(varargin)
% '$Id: fast_compute_cvm.m,v 1.1 2003/03/04 20:47:37 greve Exp $'
%
% Computes the temporal covariance matrix (CVM) of a functional volume.
% Options:
% - compute CVM from a set of voxels specified in mask
% - compute complementary CVM from the ... |
github | shayo/Planner-master | hdrview.m | .m | Planner-master/PublicLib/FreeSurfer/hdrview.m | 9,982 | utf_8 | 22078169ec3474d69d01f5b01ebc9cf0 | function hfig = hdrview(varargin)
%
% hdrview(string,options)
% hfig = hdrview('init',hsa,Nnnc,<TR>,<tPreStim>)
% hdrview('CurPixel',hFig,[r c]);
%
% $Id: hdrview.m,v 1.1 2003/03/04 20:47:41 greve Exp $
if(nargin == 0)
msg = 'USAGE: hdrview(string,options)';
qoe(msg);error(msg);
end
cbflag = varargin{1};
if(~is... |
github | shayo/Planner-master | showfigxy.m | .m | Planner-master/PublicLib/FreeSurfer/showfigxy.m | 5,666 | utf_8 | 335626e187ee0717e5d1d27556bad6f4 | function showfigxy(varargin)
% Displays the last clicked point and current mouse point
% in the current figure. If there is an image in the window,
% the value at the point is also printed out.
%
% To use, create the figure (eg, using plot or image), then, with that
% figure as the current figure, run showfigxy;
%
% Ru... |
github | shayo/Planner-master | univarlab.m | .m | Planner-master/PublicLib/FreeSurfer/univarlab.m | 31,509 | utf_8 | 75ce7bae1612e30c048225ec0e877ea8 | function varargout = univarlab(varargin)
% UNIVARLAB Application M-file for univarlab.fig
% FIG = UNIVARLAB launch univarlab GUI.
% UNIVARLAB('callback_name', ...) invoke the named callback.
% Last Modified by GUIDE v2.0 20-Aug-2003 23:16:15
% $Id: univarlab.m,v 1.8 2003/08/21 03:39:01 greve Exp $
% To do:
% C... |
github | shayo/Planner-master | fast_selxavg.m | .m | Planner-master/PublicLib/FreeSurfer/fast_selxavg.m | 45,633 | utf_8 | 3ae3f24e207b69f34cdf526e96b1ed2b | function r = fast_selxavg(varargin)
% r = fast_selxavg(varargin)
% '$Id: fast_selxavg.m,v 1.22.2.2 2006/09/29 21:54:40 greve Exp $'
version = '$Id: fast_selxavg.m,v 1.22.2.2 2006/09/29 21:54:40 greve Exp $';
fprintf(1,'%s\n',version);
r = 1;
%% Print useage if there are no arguments %%
if(nargin == 0)
print_usage;
... |
github | shayo/Planner-master | fast_spatev.m | .m | Planner-master/PublicLib/FreeSurfer/fast_spatev.m | 7,864 | utf_8 | a3722d16664fdb32a6a2e39464565e8b | function r = fast_spatev(varargin)
% r = fast_spatev(varargin)
% '$Id: fast_spatev.m,v 1.1 2003/03/04 20:47:39 greve Exp $'
version = '$Id: fast_spatev.m,v 1.1 2003/03/04 20:47:39 greve Exp $';
fprintf(1,'%s\n',version);
r = 1;
%% Print usage if there are no arguments %%
if(nargin == 0)
print_usage;
return;
end
... |
github | shayo/Planner-master | fast_fxcfg.m | .m | Planner-master/PublicLib/FreeSurfer/fast_fxcfg.m | 12,410 | utf_8 | f217765d50dc00a991bc2565eaaef9a9 | function rt = fast_fxcfg(DoWhat,thing)
% rt = fast_fxcfg(DoWhat,thing)
%
% DoWhat - string instruction
% thing - either an fla or fx line. An fx line is only needed
% for parseline.
%
% The fla has three fields that may or may not need to be set
% prior to calling fast_fxcfg:
% nthfx
% nthrun
% sesspath
... |
github | shayo/Planner-master | fast_intergroupavg.m | .m | Planner-master/PublicLib/FreeSurfer/fast_intergroupavg.m | 11,971 | utf_8 | cb8f606a623648b0e8279e7d65940b1f | function r = fast_intergroupavg(varargin)
% Name: fast_intergroupavg
% Purpose: implements inter-group averaging
%
% Author: Douglas Greve
% Questions or Comments: analysis-bugs@nmr.mgh.harvard.edu
% Version: $Id: fast_intergroupavg.m,v 1.1 2003/03/04 20:47:38 greve Exp $
% r = fast_isxavg_fe(varargin)
r = 1;
%% Prin... |
github | shayo/Planner-master | yak2.m | .m | Planner-master/PublicLib/FreeSurfer/yak2.m | 28,075 | utf_8 | 8ffe7fafcfbf078b09071e215f10eeeb | function yak2(varargin)
% a1,underlay,pmin)
%
% yak displays images. It can display a significance
% map over a structural. Multiple images can be viewed
% by hitting the '+' and '-' keys. The sign of the tail
% can be toggled by hitting 't'. Text in the figure gives
% the current status of the image, including num... |
github | shayo/Planner-master | fast_volview.m | .m | Planner-master/PublicLib/FreeSurfer/fast_volview.m | 8,289 | utf_8 | 26742bf0f1ab153d3bc3f2ccd680c81d | function r = fast_volview(varargin)
% Name: fast_volview(varargin)
% Author: Douglas Greve
% Questions or Comments: analysis-bugs@nmr.mgh.harvard.edu
% Version: $Id: fast_volview.m,v 1.1 2003/03/04 20:47:39 greve Exp $
r = 1;
%% Print usage if there are no arguments %%
if(nargin == 0) print_usage; return; end
%% P... |
github | shayo/Planner-master | fmri_lddat3.m | .m | Planner-master/PublicLib/FreeSurfer/fmri_lddat3.m | 3,702 | utf_8 | 8a5f671548e3a6e0ba486c84f885dd2c | function hdrdat = fmri_lddat3(datfile)
%
% Load information and parameters from a data file into an hdrdata
% structure. Upgrade for fmri_lddat2().
%
% datfile - (string) name of data file
%
% $Id: fmri_lddat3.m,v 1.1 2003/03/04 20:47:39 greve Exp $
if(nargin ~= 1)
msg = 'Usage: hdrdat = fmri_lddat3(datfile)'
qoe... |
github | shayo/Planner-master | fast_isxavg_fe.m | .m | Planner-master/PublicLib/FreeSurfer/fast_isxavg_fe.m | 8,144 | utf_8 | 12a8f76dd126e13466de85969561c253 | function r = fast_isxavg_fe(varargin)
% Name: fast_isxavg_fe
% Purpose: implements fixed-effects intersession averaging
% for output of selxavg
% Author: Douglas Greve
% Questions or Comments: analysis-bugs@nmr.mgh.harvard.edu
% Version: $Id: fast_isxavg_fe.m,v 1.1 2003/03/04 20:47:38 greve Exp $
% r = fast_is... |
github | shayo/Planner-master | fast_isxavg_re.m | .m | Planner-master/PublicLib/FreeSurfer/fast_isxavg_re.m | 14,164 | utf_8 | b97503f56b7f783a425859a7dcefcec0 | function r = fast_isxavg_re(varargin)
% r = fast_isxavg_re(varargin)
% Random effects intersubect averaging
r = 1;
%% Print useage if there are no arguments %%
if(nargin == 0)
print_usage;
return;
end
%% Parse the arguments %%
s = parse_args(varargin);
if(isempty(s)) return; end
s = check_params(s);
if(isempty(s... |
github | shayo/Planner-master | boldview.m | .m | Planner-master/PublicLib/FreeSurfer/boldview.m | 5,795 | utf_8 | 27821a1239b17d9321ef61501ba01a1d | function boldview(cbflag,data)
global imgvol;
if(strcmp(cbflag,'subject'))
ud = new_boldview_userdata;
ud.subject = data
%ud.cor = tstimg;
%ud.cor = fmri_ldcor('dougg');
%imgvol = fmri_ldcor('dougg');
%ud.subject = 'nouchine';
imgvol = fmri_ldcor(ud.subject);
volmin = min(reshape1d(imgvol));
volmax... |
github | shayo/Planner-master | fast_fxcfg_gamma.m | .m | Planner-master/PublicLib/FreeSurfer/fast_fxcfg_gamma.m | 7,502 | utf_8 | 69825138d4c36391be0112d3863224d5 | function rt = fast_fxcfg_gamma(DoWhat,thing)
% rt = fast_fxcfg_gamma(DoWhat,thing)
%
% DoWhat can be:
% iserm - returns 1 because this is an erm. thing not needed.
% nparams - returns number of parameters in model (9). thing not needed.
% nregressors - number of regressors in current X matrix. thing=flacfg
% matri... |
github | shayo/Planner-master | fast_functwf.m | .m | Planner-master/PublicLib/FreeSurfer/fast_functwf.m | 11,688 | utf_8 | 239cc14fb0953c58df82b1875e67b161 | function r = fast_functwf(varargin)
% r = fast_functwf(varargin)
% '$Id: fast_functwf.m,v 1.1 2003/03/04 20:47:38 greve Exp $'
%
% Temporal analysis of functional data.
tic;
version = '$Id: fast_functwf.m,v 1.1 2003/03/04 20:47:38 greve Exp $';
fprintf(1,'%s\n',version);
r = 1;
%% Print useage if there are no argumen... |
github | shayo/Planner-master | yvpltraw.m | .m | Planner-master/PublicLib/FreeSurfer/yvpltraw.m | 13,872 | utf_8 | 74d8c47af11225dff2490c0f7f20b829 | function h = yvpltraw(varargin)
% h = yvpltraw(varargin)
%
% ('-init',hdatfile)
% ('-base',base)
% ('-plot',c,r,s)
%
% Plots raw time courses from an analysis.
%
% Things to do:
% 1. allow user to spec analysis
% 2. per-run or full session
if(nargin == 0)
fprintf('USAGE: h = yvpltraw(string,options)\n');
ret... |
github | shayo/Planner-master | cc_cut_dir_afd.m | .m | Planner-master/PublicLib/FreeSurfer/cc_cut_dir_afd.m | 9,023 | utf_8 | 1d5d36ff9e36e18f7e18e8583b148eec | function [ddr, ddl, Isubj]=cc_cut_dir_adf(dirname, th_pval)
% For each subject in the directory "dirname":
% Computes the Dice coefficients measuring the overlap
% of the WM volume in right and left hemispheres to check
% if the corpus_callosum is correctly located.
%
% Uses the p values
%
%
% cc_cut_dir_afd.m
%... |
github | shayo/Planner-master | ribbon_afd.m | .m | Planner-master/PublicLib/FreeSurfer/ribbon_afd.m | 7,668 | utf_8 | 786b95ca01f42471a7084e51df0a5cbc | function [Dice]=ribbon_adf(subject, th_pval)
% For each subject "subject":
% Computes the Dice coefficients measuring the overlap of the
% Cortical Ribbon volume computed
% 1- from the subcortical labeling
% 2- as the space between the white and the pial surface
%
% Uses the pvalues, tr... |
github | shayo/Planner-master | swapview.m | .m | Planner-master/PublicLib/FreeSurfer/swapview.m | 18,064 | utf_8 | 8162c5a1a0d0047640e73cb9f8806a85 | function r = swapview(varargin)
% r = swapview(varargin)
version = '$Id: swapview.m,v 1.10 2004/05/18 21:40:02 greve Exp $';
r = 1;
%% Print usage if there are no arguments %%
if(nargin == 0)
print_usage;
return;
end
hcurrentfig = get(0,'CurrentFigure');
%--------------- Initialize if needed -----------------%
... |
github | shayo/Planner-master | subcortical_labeling_afd.m | .m | Planner-master/PublicLib/FreeSurfer/subcortical_labeling_afd.m | 4,879 | utf_8 | 1bdcddfa9475ba4f00c87248505f5f08 | function [y]=check_ROI(SubjectDir,th_pval)
%
% For one subject: check if the size of 20 ROIs is within the normal range
% The 20 following ROIs are checked: Left-Lateral-Ventricle Right-Lateral-Ventricle
% Left-Hippocampus Right-Hippocampus Left-Thalamus-Proper Right-Thalamus-Proper
% Left-Caudate Right-Cauda... |
github | shayo/Planner-master | fast_ldroisum.m | .m | Planner-master/PublicLib/FreeSurfer/fast_ldroisum.m | 1,780 | utf_8 | 0c6583af028faaf7c613c8433da6193a | function [subjlist, roisum] = fast_ldroisum(roisumfile,trps)
% [subjlist, roisum] = fast_ldroisum(roisumfile,trps)
% reads in and sorts the text file created by roisummary-sess
% roisum is a structure.
%
% $Id: fast_ldroisum.m,v 1.1 2003/03/23 06:34:08 greve Exp $
subjlist = [];
roisum = [];
if(nargin ~= 1 & nargin ~... |
github | shayo/Planner-master | fast_func2roi.m | .m | Planner-master/PublicLib/FreeSurfer/fast_func2roi.m | 11,072 | utf_8 | 831bc4effe1c71e67e89513c2cc31df8 | function r = fast_func2roi(varargin)
% r = fast_func2roi(varargin)
% '$Id'
version = '$Id: fast_func2roi.m,v 1.1 2003/03/04 20:47:38 greve Exp $';
fprintf(1,'%s\n',version);
r = 1;
%% Print usage if there are no arguments %%
if(nargin == 0)
print_usage;
return;
end
%% Parse the arguments %%
s = parse_args(vararg... |
github | shayo/Planner-master | unwarp_resample.m | .m | Planner-master/PublicLib/FreeSurfer/unwarp_resample.m | 11,255 | utf_8 | 6dda3068ea272807d4a4a564c829f7db | function [imvol_out, M_out] = unwarp_resample(imvol,M,imvol_out_size,M_out,Mdc,unwarpflag,Jacobianflag,plotflag,interp_method,inflag,thruflag,gradfilename)
%
% In this file:
%
% unwarp_resample - from AD's unwarp_and_resample_vol
% proj, jdproj - for projecting out e.g. throughplane component of
% displ... |
github | shayo/Planner-master | fast_anovamtx.m | .m | Planner-master/PublicLib/FreeSurfer/fast_anovamtx.m | 1,421 | utf_8 | 8911b6ff253b4a5b7b296345bd51cc45 | function M = fast_anovamtx(nlevels,factorlist)
% M = fast_anovamtx(nlevels,<factorlist>)
%
% nlevels is a vector of the number of levels in each
% factor. nfactors = length(nlevels);
%
% factorlist are the factors to test for an interaction
% across. To test the main effect of a factor, list
% only that factor in the... |
github | shayo/Planner-master | cortical_labeling_afd_txt.m | .m | Planner-master/PublicLib/FreeSurfer/cortical_labeling_afd_txt.m | 7,137 | utf_8 | d8c61de88002de5a122dabb6e2619630 | function [A_lh, A_rh]=cortical_label_adf(subject, p_val)
% Computes the area of the different cortical labels
% and compare them to the normal range
% Uses p_value to detect the abnormal areas
% Uses the lh/rh.parc.txt files
%
%
% cortical_labeling_afd_txt.m
%
% Original Author: Laurence Wastiaux
% CVS Revision Info... |
github | shayo/Planner-master | fast_hypospec2cmtx.m | .m | Planner-master/PublicLib/FreeSurfer/fast_hypospec2cmtx.m | 7,164 | utf_8 | 3660bd7d97f0726c562c6c45af716259 | function cmtx = fast_hypospec2cmtx(hsfile)
%
% cmtx = fast_hypospec2cmtx(hsfile)
%
% Converts a hypothesis specification file into
% a contrast matrix.
cmtx = [];
if(nargin ~= 1)
msg = 'USAGE: cmtx = fast_hypospec2cmtx(hsfile)';
qoe(msg); error(msg);
end
fid = fopen(hsfile);
if(fid == -1)
msg = sprintf('Error ... |
github | shayo/Planner-master | hdrviewlite.m | .m | Planner-master/PublicLib/FreeSurfer/hdrviewlite.m | 14,193 | utf_8 | 18f8ddc6bdfe2a897cd403d9be6d7568 | function hdrviewlite(varargin)
%
% hdrview(string,options)
% hdrview('init',hFig,t,dof);
% hdrview('plot',hFig,havg,hstd, CurrPixel);
% hdrview('tmarker',tmarker)
% hdrview('kbd')
% hdrview('wbd')
%
% $Id: hdrviewlite.m,v 1.1 2003/03/04 20:47:40 greve Exp $
if(nargin == 0)
msg = 'USAGE: hdrviewlite(string,options)'... |
github | shayo/Planner-master | editmask.m | .m | Planner-master/PublicLib/FreeSurfer/editmask.m | 12,662 | utf_8 | 84f9a15b3b06433dd074c4568904c8c9 | function r = editmask(varargin)
% r = editmask(varargin)
% Edit a functional mask
% '$Id: editmask.m,v 1.1 2003/03/04 20:47:34 greve Exp $'
version = '$Id: editmask.m,v 1.1 2003/03/04 20:47:34 greve Exp $';
r = 1;
%% Print usage if there are no arguments %%
if(nargin == 0)
print_usage;
return;
end
hcurrentfig = ... |
github | shayo/Planner-master | fast_inorm.m | .m | Planner-master/PublicLib/FreeSurfer/fast_inorm.m | 20,249 | utf_8 | 9f2e514ad56a59a75ed5ae5de8321bed | function r = fast_inorm(varargin)
% r = fast_inorm(varargin)
% Intensity normalizes and does some simple data hygene analysis.
% '$Id'
version = '$Id';
fprintf(1,'%s\n',version);
r = 1;
%% Print useage if there are no arguments %%
if(nargin == 0)
print_usage;
return;
end
%% Parse the arguments %%
s = parse_args(... |
github | shayo/Planner-master | yak.m | .m | Planner-master/PublicLib/FreeSurfer/yak.m | 28,248 | utf_8 | 47a1fc68be72907b71c77869cb3f1a93 | function yak(varargin)
% a1,underlay,pmin)
%
% yak displays images. It can display a significance
% map over a structural. Multiple images can be viewed
% by hitting the '+' and '-' keys. The sign of the tail
% can be toggled by hitting 't'. Text in the figure gives
% the current status of the image, including numb... |
github | shayo/Planner-master | fast_ar1w_opt.m | .m | Planner-master/PublicLib/FreeSurfer/fast_ar1w_opt.m | 2,601 | utf_8 | e2dffe1a72b5dd9e5581ec818bc939d7 | function [alpha, rho, mse, niters] = fast_ar1w_opt(Mr,R,tol,ncycles,alpharho0)
% [alpha, rho, mse, niters] = fast_ar1w_opt(Mr,R,tol,ncycles,alpharho0)
alpha = [];
rho = [];
e = [];
if(nargin ~= 4 & nargin ~= 5)
fprintf('[alpha, rho, e] = fast_ar1w_opt(Mr,R,tol,ncycles,<alpharho0>)\n');
return;
end
if(0)
niters =... |
github | shayo/Planner-master | cc_cut_afd.m | .m | Planner-master/PublicLib/FreeSurfer/cc_cut_afd.m | 7,840 | utf_8 | 64b17bdab2b10298acacbc656a17297a | function [dr,dl]=cc_cut_adf(subject, name,th_pval)
% For each subject "subject":
% Computes the Dice coefficients measuring the overlap
% of the WM volume in right and left hemispheres to check
% if the corpus_callosum is correctly located.
%
% Uses .lta transform and p values
%
%
% cc_cut_afd.m
%
% O... |
github | shayo/Planner-master | load_dicom_fl.m | .m | Planner-master/PublicLib/FreeSurfer/load_dicom_fl.m | 5,542 | utf_8 | 2b58f232704202f499db204a03f464fa | function [vol, M, dcminfo, mr_parms] = load_dicom_fl(flist)
% [vol, M, dcminfo, mr_parms] = load_dicom_fl(flist)
%
% Loads a volume from the dicom files in flist.
%
% The volume dimensions are arranged such that the
% readout dimension is first, followed by the phase-encode,
% followed by the slices (this is not implem... |
github | shayo/Planner-master | fast_glm2anova_mtx.m | .m | Planner-master/PublicLib/FreeSurfer/fast_glm2anova_mtx.m | 3,841 | utf_8 | 3d6cf6acc65d87ec9bcbebcf23f8c5f0 | function M = fast_glm2anova_mtx(cflmap,nlevels,ncond,vr,nesttot)
% M = fast_glm2anova_mtx(cflmap,nlevels,<ncond>,<vr>,<nesttot>);
%
% Creates a matrix that will convert a glm parameter vector (beta)
% into a vector of population means suitable for applying
% an ANOVA contrast matrix to. See fast_anovamtx.m.
%
% Each ro... |
github | shayo/Planner-master | fast_bfileconvert.m | .m | Planner-master/PublicLib/FreeSurfer/fast_bfileconvert.m | 9,236 | utf_8 | 93cd9227db17f6cfbee9dd4a819b57f2 | function r = fast_bfileconvert(varargin)
% r = fast_bfileconvert(varargin)
% Converts a bfile into another bfile. Eg, bfloat into bshort,
% Little endian into big endian, etc.
% '$Id: fast_bfileconvert.m,v 1.4 2004/04/09 19:03:42 greve Exp $'
version = '$Id: fast_bfileconvert.m,v 1.4 2004/04/09 19:03:42 greve Exp $';
... |
github | shayo/Planner-master | fmri_synthpar3.m | .m | Planner-master/PublicLib/FreeSurfer/fmri_synthpar3.m | 5,478 | utf_8 | 5519d2abed50b4796e9e4773d85118e7 | function [par,t0avg] = fmri_synthpar3(npercond,tpercond,nruns,trun,tres,tprescan)
% [par,t0avg] = fmri_synthpar3(npercond,tpercond,nruns,trun,tres,tprescan)
%
% npercond - number of presentations per NON-NULL condition, all runs
% tpercond - stimulus duration of each NON-NULL condition
% nruns - number of runs
% tr... |
github | shayo/Planner-master | convert_unwarp_resample.m | .m | Planner-master/PublicLib/FreeSurfer/convert_unwarp_resample.m | 14,057 | utf_8 | ce80d374ae431ec50cbc9f99ca9a2c8b | function convert_unwarp_resample(infile,series,outfile,corfovflag,unwarpflag,jacflag,interp_method,user_gradwarpfile,called_by_script)
%
%% convert_unwarp_resample.m contains:
% convert_unwarp_resample()
% load_dicom_and_stuff()
% mdc()
% header2map(), type2map(), map2manuf() refer to TABLE = GRADWARPPATH/table.mat
%
... |
github | shayo/Planner-master | fast_condfit.m | .m | Planner-master/PublicLib/FreeSurfer/fast_condfit.m | 16,369 | utf_8 | b2219a2ab88123204345cfe09c531b65 | function r = fast_condfit(varargin)
% r = fast_condfit(varargin)
% Random effects fit of conditions to a weight
r = 1;
%% Print useage if there are no arguments %%
if(nargin == 0)
print_usage;
return;
end
% Pre-define for compilation
hd = 0;
Nrows = 0;
Ncols = 0;
Ahat = 0;
Acov = 0;
CtC = 0;
eres_std = 0;
nsubje... |
github | shayo/Planner-master | afni2bvol.m | .m | Planner-master/PublicLib/FreeSurfer/afni2bvol.m | 3,473 | utf_8 | 94286712f7fff418aebec46faa724c2f | function r = afni2bvol(varargin)
% r = afni2bvol(varargin)
% '$Id'
%% Print useage if there are no arguments %%
if(nargin == 0)
print_usage;
return;
end
%% Parse the arguments %%
s = parse_args(varargin);
if(isempty(s)) return; end
s = check_params(s);
if(isempty(s)) return; end
brik = ReadBRIK2(s.inbrik);
if(i... |
github | shayo/Planner-master | talairaching_dir_afd.m | .m | Planner-master/PublicLib/FreeSurfer/talairaching_dir_afd.m | 5,787 | utf_8 | b4f3d492f6c26dc661132116b971c41a | function [probas, Isubj,nf]=taldir(dirname, th_pval, DirTable)
%
% Computes the probability of the Talairach transform matrices
% of all the subjects found in the directory "dirname".
% Uses the mean vector and covariance matrix obtained with talairachin_table.m from
% the data set (default data set: /space/... |
github | shayo/Planner-master | fast_cmpdesign_nsd.m | .m | Planner-master/PublicLib/FreeSurfer/fast_cmpdesign_nsd.m | 21,081 | utf_8 | 992cd8a8b36490a6a3fe1589c5a5dcaa | function r = fast_cmpdesign_nsd(varargin)
% r = fast_cmpdesign_nsd
%
% Compares two designs based on non-schedule dependent parameters.
% '$Id: fast_cmpdesign_nsd.m,v 1.1 2003/03/04 20:47:37 greve Exp $'
%
version = '$Id: fast_cmpdesign_nsd.m,v 1.1 2003/03/04 20:47:37 greve Exp $';
fprintf(1,'%s\n',version);
r = 1;
%... |
github | shayo/Planner-master | fast_kmeans.m | .m | Planner-master/PublicLib/FreeSurfer/fast_kmeans.m | 3,456 | utf_8 | 04b7d553dac6dbb45b88a19fb66e7736 | function [kmeans, kmap, dmin, niters, yhat] = fast_kmeans(y,nc,kmeans0,nitersmax,nfix)
% [kmeans, kmap, dmin, niters, yhat] = fast_kmeans(y,nc,<kmeans0>,<nitersmax>,<nfix>)
%
% nc is number of classes (a better name would have been nk)
% If nitersmax is not specified, uses 100.
% If kmeans0 is not specified, uses first... |
github | shayo/Planner-master | flacview.m | .m | Planner-master/PublicLib/FreeSurfer/flacview.m | 15,129 | utf_8 | 999afb63187c7191e8b3e7e99ebad5d7 | function r = flacview(varargin)
% r = flacview(varargin)
version = '$Id: flacview.m,v 1.2 2005/01/23 17:11:05 greve Exp $';
r = 1;
%% Print usage if there are no arguments %%
if(nargin == 0)
print_usage;
return;
end
hcurrentfig = get(0,'CurrentFigure');
init = 0;
flag = deblank(varargin{1});
%fprintf('flag1 = %s... |
github | shayo/Planner-master | fast_spatevfilter.m | .m | Planner-master/PublicLib/FreeSurfer/fast_spatevfilter.m | 7,551 | utf_8 | ab561e6ab4093e0e57177b1842157bd4 | function r = fast_spatevfilter(varargin)
% r = fast_spatev(varargin)
% '$Id: fast_spatevfilter.m,v 1.1 2003/03/04 20:47:39 greve Exp $'
version = '$Id: fast_spatevfilter.m,v 1.1 2003/03/04 20:47:39 greve Exp $';
fprintf(1,'%s\n',version);
r = 1;
%% Print usage if there are no arguments %%
if(nargin == 0)
print_usag... |
github | shayo/Planner-master | wm_seg_dir_afd.m | .m | Planner-master/PublicLib/FreeSurfer/wm_seg_dir_afd.m | 4,730 | utf_8 | 454a9814dff748c2c6e96eaa84f4de9f | function [Dice, Pval, Isubj]=wm_seg_dir_adf(dirname, th_pval)
% For all the subjects in the directory "dirname":
% Computes the Dice coefficients D=2Nab/Na+Nb
% where:
% Na is the volume of the WM obtained trough the volume-based labeling
% Nb is the volume of the WM ... |
github | shayo/Planner-master | fast_fxcfg_extreg.m | .m | Planner-master/PublicLib/FreeSurfer/fast_fxcfg_extreg.m | 4,815 | utf_8 | 8e531ba88d79e3af71e5904df6a10d39 | function rt = fast_fxcfg_extreg(DoWhat,thing)
% rt = fast_fxcfg_extreg(DoWhat,thing)
%
% DoWhat can be:
% iserm - returns 0 because this is not an erm. thing not needed.
% nparams - returns number of parameters in model. thing not needed.
% nregressors - number of regressors in current X matrix. thing=flacfg
% mat... |
github | shayo/Planner-master | fast_mergesxa.m | .m | Planner-master/PublicLib/FreeSurfer/fast_mergesxa.m | 7,960 | utf_8 | b254de6148aac85c62bbbfb9ea34084d | function r = fast_mergesxa(varargin)
% r = fast_mergesxa(varargin)
% '$Id: fast_mergesxa.m,v 1.1 2003/03/04 20:47:38 greve Exp $';
version = '$Id: fast_mergesxa.m,v 1.1 2003/03/04 20:47:38 greve Exp $';
fprintf(1,'%s\n',version);
r = 1;
%% Print useage if there are no arguments %%
if(nargin == 0)
print_usage;
ret... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.