Join/Login

Business Software

Open Source Software

For Vendors

Blog

About

More

Articles

Create

SourceForge Podcast

Site Documentation

Subscribe to our Newsletter

Support Request

For Vendors Help Create Join Login

Business Software

Open Source Software

SourceForge Podcast

Resources

Articles

Case Studies

Blog

Menu

Help

Create

Join

Login

Home

Browse

Iris

Calliope

Iris Calliope

2-photon scanning software

Brought to you by: heinmatt, kellgeor

Summary

Reviews

Support

Wiki

Tickets ▾

Bugs

Tasks

Feature Requests

SVN ▾

Iris Main

Auxiliary Code

Calliope

Discussion

Menu ▾ ▴

Browse Commits

Browse Files

[r1139]: / RoiQuest / +gfx / createMainfigure.m  Maximize  Restore  History

Download this file

159 lines (140 with data), 5.1 kB

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158

function handles = createMainfigure()

% createMainfigure - Create the main figure and associated UI elements for

% the RoiQuest application.

%

% handles = createMainfigure() returns a structure of handles to various

% UI components created for the main figure of the RoiQuest application.

%

% Outputs:

% - handles: A structure containing handles to various UI components,

% including the main figure, axes, menu items, and submenus.

%

% Example:

% guiHandles = createMainfigure();

%

% See also: figure, uimenu, axes

%

% Author: Leonardo Lupori

% Date: 22.01.2024

%

% See also: figure, uimenu, axes

screenSize = get(0, 'ScreenSize');

width = floor(screenSize(3) * (2/4));

heigth = floor(screenSize(4) * (2/4));

% Create the main figure

handles.fig_img = figure('Color',[0.1,0.1,0.1],...

'Tag', 'fig_img',...

'Position',[(screenSize(3)-width)/2 (screenSize(4)-heigth)/2 width heigth],...

'Name','RoiQuest - The ROIing adventure begins now!',...

'NumberTitle','off',...

'Pointer','crosshair',...

'MenuBar','none');

% Create the axes inside the main figure

handles.ax_img = axes('Parent',handles.fig_img,...

'Units','normalized',...

'Position',[0 0 1 1], ... % axes is as large as the figure

'TickLength', [0,0] ... % makes ticks invisible

);

%--------------------------------------------------------------

% MENU BAR OF THE MAIN FIGURE

%--------------------------------------------------------------

% FILE MENU

% ---------------------------------------

handles.fileMenu = uimenu(handles.fig_img);

handles.fileMenu.Text = 'File';

% Save menu

handles.save = uimenu(handles.fileMenu);

handles.save.Text = 'Save';

% Save to AData menu

handles.saveAdata = uimenu(handles.fileMenu);

handles.saveAdata.Accelerator = 'S';

handles.saveAdata.Text = 'Save to AData';

% Revert to last saved

handles.revert = uimenu(handles.fileMenu);

handles.revert.Accelerator = 'R';

handles.revert.Text = 'Revert to last saved';

% VIEW MENU

% ---------------------------------------

handles.viewMenu = uimenu(handles.fig_img);

handles.viewMenu.Text = 'View';

% Set colormap

handles.setCmap = uimenu(handles.viewMenu);

handles.setCmap.Text = 'Colormap';

% Invert colormap

handles.invertCmap = uimenu(handles.setCmap);

handles.invertCmap.Text = 'Invert colormap';

handles.invertCmap.Tag = 'cmap_invert';

% Gray

handles.cmapGray = uimenu(handles.setCmap, 'Separator','on');

handles.cmapGray.Text = 'Gray';

% Copper

handles.cmapCopper = uimenu(handles.setCmap);

handles.cmapCopper.Text = 'Copper';

% Red

handles.cmapRed = uimenu(handles.setCmap);

handles.cmapRed.Text = 'Red';

% Parula

handles.cmapParula = uimenu(handles.setCmap);

handles.cmapParula.Text = 'Parula';

% Hot

handles.cmapHot = uimenu(handles.setCmap);

handles.cmapHot.Text = 'Hot';

% Adjusting Contrast

handles.contrast = uimenu(handles.viewMenu);

handles.contrast.Text = 'Contrast';

% Auto Min/Max

handles.minMax = uimenu(handles.contrast);

handles.minMax.Text = 'Min/Max';

handles.minMax.Tag = 'minMax';

% Auto BestFit

handles.bestFit = uimenu(handles.contrast);

handles.bestFit.Text = 'Best Fit';

handles.bestFit.Tag = 'bestFit';

% Custom

handles.customContr = uimenu(handles.contrast);

handles.customContr.Text = 'Custom';

handles.customContr.Tag = 'custom';

% Custom

handles.editCustomContr = uimenu(handles.contrast, 'Separator','on');

handles.editCustomContr.Text = 'Change custom contrast';

% Filter size

handles.setFiltSize = uimenu(handles.viewMenu);

handles.setFiltSize.Accelerator = 'F';

handles.setFiltSize.Text = 'Filter size';

% Show ROI numbers

handles.roiNums = uimenu(handles.viewMenu);

handles.roiNums.Text = 'Toggle ROI numbers';

% Check Registration

handles.checkReg = uimenu(handles.viewMenu);

handles.checkReg.Text = 'Check image registration';

% ROI MENU

% ---------------------------------------

handles.roiMenu = uimenu(handles.fig_img);

handles.roiMenu.Text = 'ROIs';

% Select all

handles.selectAll = uimenu(handles.roiMenu);

handles.selectAll.Accelerator = 'A';

handles.selectAll.Text = 'Select all';

% Select None

handles.selectNone = uimenu(handles.roiMenu);

handles.selectNone.Accelerator = 'N';

handles.selectNone.Text = 'Select none';

% Delete ROI

handles.deleteSelected = uimenu(handles.roiMenu, 'Separator','on');

handles.deleteSelected.Text = 'Delete selected';

% Add tag to ROI

handles.tagSelected = uimenu(handles.roiMenu, 'Separator','on');

handles.tagSelected.Text = 'Tag selected';

% Remove tag from selected ROIs

handles.untagSelected = uimenu(handles.roiMenu);

handles.untagSelected.Text = 'Untag selected';

% Remove tag from all ROIs

handles.untagAll = uimenu(handles.roiMenu);

handles.untagAll.Text = 'Untag all';

% HELP MENU

% ---------------------------------------

handles.helpMenu = uimenu(handles.fig_img);

handles.helpMenu.Text = 'Help';

% Print all commands

handles.printCommands = uimenu(handles.helpMenu);

handles.printCommands.Text = 'Print all commands';

SourceForge

Create a Project

Open Source Software

Business Software

Top Downloaded Projects

Company

About

Team

SourceForge Headquarters
225 Broadway Suite 1600
San Diego, CA 92101
+1 (858) 422-6466

Resources

Support

Site Documentation

Site Status

SourceForge Reviews

© 2025 Slashdot Media. All Rights Reserved.

Terms Privacy Opt Out Advertise

×
Want the latest updates on software, tech news, and AI?

Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.

Submit