spm_Welcome.m 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. function F = spm_Welcome
  2. % Open SPM's welcome splash screen
  3. % FORMAT F = spm_Welcome
  4. % F - welcome figure handle
  5. %__________________________________________________________________________
  6. % Copyright (C) 2014-2017 Wellcome Trust Centre for Neuroimaging
  7. % Guillaume Flandin
  8. % $Id: spm_Welcome.m 7478 2018-11-08 14:51:54Z guillaume $
  9. %-Open startup window, set window defaults
  10. %--------------------------------------------------------------------------
  11. RectW = spm('WinSize','W',1); % 500x280 figure
  12. Rect0 = spm('WinSize','0',1);
  13. Pos = [Rect0(1)+(Rect0(3)-RectW(3))/2,...
  14. Rect0(2)+(Rect0(4)-RectW(4))/2,...
  15. RectW(3),...
  16. RectW(4)];
  17. WS = [1 1 1 1]; % spm('WinScale')
  18. PF = spm_platform('fonts');
  19. PF.helvetica = 'helvetica';
  20. F = figure('IntegerHandle','off',...
  21. 'Name',spm('Version'),...
  22. 'NumberTitle','off',...
  23. 'Tag','Welcome',...
  24. 'Units','pixels',...
  25. 'Position',Pos,...
  26. 'Resize','on',...
  27. 'Pointer','arrow',...
  28. 'Color',[1 1 1]*.8,...
  29. 'MenuBar','none',...
  30. 'DefaultUicontrolFontName',PF.helvetica,...
  31. 'Visible','off');
  32. %-Text
  33. %--------------------------------------------------------------------------
  34. hA = axes('Parent',F,...
  35. 'Units','pixels',...
  36. 'Position',[10 10 80 260].*WS,...
  37. 'Visible','Off');
  38. text(0.5,0.5,'SPM',...
  39. 'Parent',hA,...
  40. 'FontName',PF.times,'FontSize',72,...
  41. 'FontAngle','Italic','FontWeight','Bold',...
  42. 'Rotation',90,...
  43. 'VerticalAlignment','Middle',...
  44. 'HorizontalAlignment','Center',...
  45. 'Color',[1 1 1]*.6);
  46. uicontrol(F,'Style','Text',...
  47. 'String','Statistical Parametric Mapping',...
  48. 'Position',[100 245 390 030].*WS,...
  49. 'FontName',PF.helvetica,'FontSize',18,'FontAngle','Italic',...
  50. 'FontWeight','Bold',...
  51. 'ForegroundColor',[1 1 1]*.5,...
  52. 'BackgroundColor',[1 1 1]*.8);
  53. uipanel('Parent',F,'Title','',...
  54. 'Units','pixels',...
  55. 'Position',[100 130 390 110].*WS,...
  56. 'BackgroundColor',[1 1 1]*.75);
  57. uipanel('Parent',F,'Title','',...
  58. 'Units','pixels',...
  59. 'Position',[100 030 390 085].*WS,...
  60. 'BackgroundColor',[1 1 1]*.75);
  61. uicontrol(F,'Style','Text',...
  62. 'String',spm('Ver'),...
  63. 'Position',[105 200 380 030].*WS,...
  64. 'FontName',PF.helvetica,'FontSize',22,'FontWeight','Bold',...
  65. 'ForegroundColor',[0 0.5 0],...
  66. 'BackgroundColor',[1 1 1]*.75);
  67. uicontrol(F,'Style','Text',...
  68. 'Position',[105 175 380 020].*WS,...
  69. 'String','developed by members and collaborators of',...
  70. 'FontName',PF.helvetica,'FontSize',10,'FontAngle','Italic',...
  71. 'BackgroundColor',[1 1 1]*.75);
  72. uicontrol(F,'Style','Text',...
  73. 'Position',[105 157 380 020].*WS,...
  74. 'String','The Wellcome Trust Centre for Neuroimaging',...
  75. 'FontName',PF.helvetica,'FontSize',12,'FontWeight','Bold',...
  76. 'BackgroundColor',[1 1 1]*.75);
  77. uicontrol(F,'Style','Text',...
  78. 'Position',[105 137 380 020].*WS,...
  79. 'String','Institute of Neurology, University College London',...
  80. 'FontName',PF.helvetica,'FontSize',11,...
  81. 'BackgroundColor',[1 1 1]*.75);
  82. uicontrol(F,'Style','Text',...
  83. 'String',['Copyright (c) 1991,1994-' datestr(now,'yyyy')],...
  84. 'Position',[100 005 390 020].*WS,...
  85. 'ForegroundColor',[1 1 1]*.5,...
  86. 'BackgroundColor',[1 1 1]*.8,...
  87. 'FontName',PF.helvetica,'FontSize',11,...
  88. 'HorizontalAlignment','center',...
  89. 'BackgroundColor',[1 1 1]*.8);
  90. %-Objects with Callbacks - PET, M/EEG, fMRI, About SPM, SPMweb, Quit
  91. %--------------------------------------------------------------------------
  92. set(F,'DefaultUicontrolFontSize',12,'DefaultUicontrolInterruptible','on');
  93. uicontrol(F,'Style','pushbutton',...
  94. 'String','PET & VBM',...
  95. 'Position',[135 075 100 030].*WS,...
  96. 'CallBack','delete(gcbf);spm(''Clean'');spm(''PET'')',...
  97. 'FontName',PF.helvetica,...
  98. 'ForegroundColor',[0.5 0 0]);
  99. uicontrol(F,'Style','pushbutton',...
  100. 'String','M/EEG',...
  101. 'Position',[245 075 100 030].*WS,...
  102. 'CallBack','delete(gcbf);spm(''Clean'');spm(''EEG'')',...
  103. 'FontName',PF.helvetica,...
  104. 'ForegroundColor',[0.5 0 0]);
  105. uicontrol(F,'Style','pushbutton',...
  106. 'String','fMRI',...
  107. 'Position',[355 075 100 030].*WS,...
  108. 'CallBack','delete(gcbf);spm(''Clean'');spm(''FMRI'')',...
  109. 'FontName',PF.helvetica,...
  110. 'ForegroundColor',[0.5 0 0]);
  111. uicontrol(F,'Style','pushbutton',...
  112. 'String','About SPM',...
  113. 'Position',[135 040 100 030].*WS,...
  114. 'CallBack','spm_help;',...
  115. 'FontName',PF.helvetica,...
  116. 'ForegroundColor',[0 0.5 0]);
  117. uicontrol(F,'Style','pushbutton',...
  118. 'String','SPMweb',...
  119. 'Position',[245 040 100 030].*WS,...
  120. 'CallBack','web(''https://www.fil.ion.ucl.ac.uk/spm/'')',...
  121. 'FontName',PF.helvetica,...
  122. 'ForegroundColor',[0 0.5 0]);
  123. uicontrol(F,'Style','pushbutton',...
  124. 'String','Quit',...
  125. 'FontName',PF.helvetica,...
  126. 'Position',[355 040 100 030].*WS,...
  127. 'CallBack','delete(gcbf)',...
  128. 'Interruptible','off',...
  129. 'ForegroundColor',[1 0 0]);
  130. if ~ismac
  131. set(findobj(F,'Style','pushbutton'),'BackgroundColor',[1 1 1]*0.75);
  132. end
  133. %-
  134. %--------------------------------------------------------------------------
  135. set(findobj(F),'Units','normalized');
  136. set(findobj(F,'FontUnits','points'),'FontUnits','normalized');
  137. set(F,'Visible','on');
  138. spm_figure('Focus',F);