forked from bettar/miele-lxiv
-
Notifications
You must be signed in to change notification settings - Fork 0
/
AppController.h
282 lines (230 loc) · 8.73 KB
/
AppController.h
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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
/*=========================================================================
Program: OsiriX
Copyright (c) OsiriX Team
All rights reserved.
Distributed under GNU - LGPL
See http://www.osirix-viewer.com/copyright.html for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.
=========================================================================*/
// This will be added to the main inded page of the Doxygen documentation
/** \mainpage OsiriX index page
* <img src= "../../../osirix/Binaries/Icons/SmallLogo.tif">
* \section Intro OsiriX DICOM workstation
* Osirix is a free open source DICOM workstation with full 64 bit support.
*
* We extend out thanks to other in the open source community.
*
* VTK, ITK, and DCMTK open source projects are extensively used in OsiriX.
*
* The OsiriX team.
*/
#ifdef OSIRIX_VIEWER
#ifndef OSIRIX_LIGHT
#ifndef MACAPPSTORE
#import <Growl/Growl.h>
#endif
#endif
#endif
#import <AppKit/AppKit.h>
#import "XMLRPCMethods.h"
//@class ThreadPoolServer;
//@class ThreadPerConnectionServer;
//#import "IChatTheatreDelegate.h"
@class PreferenceController;
@class BrowserController;
@class SplashScreen;
@class DCMNetServiceDelegate;
@class WebPortal;
enum
{
compression_sameAsDefault = 0,
compression_none = 1,
compression_JPEG = 2,
compression_JPEG2000 = 3,
compression_JPEGLS = 4
};
enum
{
always = 0,
cdOnly = 1,
notMainDrive = 2,
ask = 3
};
@class PluginFilter;
#ifdef __cplusplus
extern "C"
{
#endif
NSRect screenFrame();
NSString * documentsDirectoryFor( int mode, NSString *url) __deprecated;
NSString * documentsDirectory() __deprecated;
#ifdef __cplusplus
}
#endif
/** \brief NSApplication delegate
*
* NSApplication delegate
* Primarily manages the user defaults and server
* Also controls some general main items
*
*
*/
//#if defined(OSIRIX_VIEWER) && !defined(OSIRIX_LIGHT) && !defined(MACAPPSTORE)
//#else
//@protocol GrowlApplicationBridgeDelegate
//@end
//#endif
@class AppController, ToolbarPanelController, ThumbnailsListPanel, BonjourPublisher;
extern AppController* OsiriX;
@interface AppController : NSObject <NSNetServiceBrowserDelegate, NSNetServiceDelegate, NSSoundDelegate, NSMenuDelegate> // GrowlApplicationBridgeDelegate
{
IBOutlet BrowserController *browserController;
IBOutlet NSMenu *filtersMenu;
IBOutlet NSMenu *roisMenu;
IBOutlet NSMenu *othersMenu;
IBOutlet NSMenu *dbMenu;
IBOutlet NSWindow *dbWindow;
IBOutlet NSMenu *windowsTilingMenuRows, *windowsTilingMenuColumns;
IBOutlet NSMenu *recentStudiesMenu;
NSDictionary *previousDefaults;
BOOL showRestartNeeded;
SplashScreen *splashController;
volatile BOOL quitting;
BOOL verboseUpdateCheck;
NSNetService *BonjourDICOMService;
NSTimer *updateTimer;
XMLRPCInterface *XMLRPCServer;
BOOL checkAllWindowsAreVisibleIsOff, isSessionInactive;
int lastColumns, lastRows, lastCount;
BonjourPublisher* _bonjourPublisher;
}
@property BOOL checkAllWindowsAreVisibleIsOff, isSessionInactive;
@property (readonly) NSMenu *filtersMenu, *recentStudiesMenu, *windowsTilingMenuRows, *windowsTilingMenuColumns;
@property(readonly) NSNetService* dicomBonjourPublisher;
@property (readonly) XMLRPCInterface *XMLRPCServer;
@property(readonly) BonjourPublisher* bonjourPublisher;
+ (BOOL) isFDACleared;
+ (BOOL) willExecutePlugin;
+ (BOOL) willExecutePlugin:(id) filter;
+ (BOOL) hasMacOSXLion;
+ (BOOL) hasMacOSXSnowLeopard;
+ (BOOL) hasMacOSXLeopard;
+ (BOOL) hasMacOSXMaverick;
+(NSString*)UID;
#pragma mark-
#pragma mark initialization of the main event loop singleton
+ (void) createNoIndexDirectoryIfNecessary:(NSString*) path __deprecated;
+ (void) displayImportantNotice:(id) sender;
+ (AppController*) sharedAppController; /**< Return the shared AppController instance */
+ (void) resizeWindowWithAnimation:(NSWindow*) window newSize: (NSRect) newWindowFrame;
+ (void) pause __deprecated;
+ (ThumbnailsListPanel*)thumbnailsListPanelForScreen:(NSScreen*)screen;
+ (NSString*)printStackTrace:(NSException*)e __deprecated; // use -[NSException printStackTrace] form NSException+N2
+ (BOOL) isKDUEngineAvailable;
#pragma mark-
#pragma mark HTML Templates
+ (void)checkForHTMLTemplates __deprecated;
#pragma mark-
#pragma mark Server management
- (void) terminate :(id) sender; /**< Terminate listener (Q/R SCP) */
- (void) restartSTORESCP; /**< Restart listener (Q/R SCP) */
- (void) startSTORESCP:(id) sender; /**< Start listener (Q/R SCP) */
- (void) startSTORESCPTLS:(id) sender; /**< Start TLS listener (Q/R SCP) */
- (void) installPlugins: (NSArray*) pluginsArray;
- (BOOL) isStoreSCPRunning;
#pragma mark-
#pragma mark static menu items
//===============OSIRIX========================
- (IBAction) about:(id)sender; /**< Display the about window */
- (IBAction) showPreferencePanel:(id)sender; /**< Show Preferences window */
#ifndef OSIRIX_LIGHT
#ifndef MACAPPSTORE
- (IBAction) checkForUpdates:(id) sender; /**< Check for update */
#endif
- (IBAction) autoQueryRefresh:(id)sender;
#endif
//===============WINDOW========================
- (IBAction) setFixedTilingRows: (id) sender;
- (IBAction) setFixedTilingColumns: (id) sender;
- (void) initTilingWindows;
- (IBAction) tileWindows:(id)sender; /**< Tile open window */
- (IBAction) tile3DWindows:(id)sender; /**< Tile 3D open window */
- (void) tileWindows:(id)sender windows: (NSMutableArray*) viewersList display2DViewerToolbar: (BOOL) display2DViewerToolbar displayThumbnailsList: (BOOL) displayThumbnailsList;
- (void) scaleToFit:(id)sender; /**< Scale opened windows */
- (IBAction) closeAllViewers: (id) sender; /**< Close All Viewers */
- (void) checkAllWindowsAreVisible:(id) sender;
- (void) checkAllWindowsAreVisible:(id) sender makeKey: (BOOL) makeKey;
//- (IBAction)toggleActivityWindow:(id)sender;
//===============HELP==========================
- (IBAction) sendEmail: (id) sender; /**< Send email to lead developer */
- (IBAction) openOsirixWebPage: (id) sender; /**< Open OsiriX web page */
- (IBAction) openOsirixDiscussion: (id) sender; /**< Open OsiriX discussion web page */
- (IBAction) osirix64bit: (id) sender;
//---------------------------------------------
- (IBAction) help: (id) sender; /**< Open help window */
//=============================================
- (IBAction) killAllStoreSCU:(id) sender;
- (id) splashScreen;
#pragma mark-
#pragma mark window routines
- (IBAction) updateViews:(id) sender; /**< Update Viewers */
- (NSScreen *)dbScreen; /**< Return monitor with DB */
- (NSArray *)viewerScreens; /**< Return array of monitors for displaying viewers */
/**
* Find the WindowController with the named nib and using the pixList
* This is commonly used to find the 3D Viewer associated with a ViewerController.
* Conversely this could be used to find the ViewerController that created a 3D Viewer
* Each 3D Viewer has its own distinctly named nib as does the ViewerController.
* The pixList is the Array of DCMPix that the viewer uses. It should uniquely identify related viewers
*/
- (id) FindViewer:(NSString*) nib :(NSArray*) pixList;
- (NSArray*) FindRelatedViewers:(NSArray*) pixList; /**< Return an array of all WindowControllers using the pixList */
- (IBAction) cancelModal: (id) sender;
- (IBAction) okModal: (id) sender;
- (NSString*) privateIP;
- (void) killDICOMListenerWait:(BOOL) w;
- (void) runPreferencesUpdateCheck:(NSTimer*) timer;
+ (void) checkForPreferencesUpdate: (BOOL) b;
+ (BOOL) USETOOLBARPANEL;
+ (void) setUSETOOLBARPANEL: (BOOL) b;
+ (NSRect) usefullRectForScreen: (NSScreen*) screen;
- (void) addStudyToRecentStudiesMenu: (NSManagedObjectID*) studyID;
- (void) loadRecentStudy: (id) sender;
- (void) buildRecentStudiesMenu;
- (NSMenu*) viewerMenu;
- (NSMenu*) fileMenu;
- (NSMenu*) exportMenu;
- (NSMenu*)imageTilingMenu;
- (NSMenu*) orientationMenu;
- (NSMenu*) opacityMenu;
- (NSMenu*) wlwwMenu;
- (NSMenu*) convMenu;
- (NSMenu*) clutMenu;
- (NSMenu*) workspaceMenu;
#pragma mark-
#pragma mark growl
- (void) growlTitle:(NSString*) title description:(NSString*) description name:(NSString*) name;
//- (NSDictionary *) registrationDictionaryForGrowl;
//#pragma mark-
//#pragma mark display setters and getters
//- (IBAction) saveLayout: (id)sender;
#pragma mark-
#pragma mark 12 Bit Display support.
+ (BOOL)canDisplay12Bit;
+ (void)setCanDisplay12Bit:(BOOL)boo;
+ (void)setLUT12toRGB:(unsigned char*)lut;
+ (unsigned char*)LUT12toRGB;
+ (void)set12BitInvocation:(NSInvocation*)invocation;
+ (NSInvocation*)fill12BitBufferInvocation;
#pragma mark -
-(WebPortal*)defaultWebPortal;
#ifndef OSIRIX_LIGHT
-(NSString*)weasisBasePath;
#endif
-(void)setReceivingIcon;
-(void)unsetReceivingIcon;
-(void)setBadgeLabel:(NSString*)label;
- (void)playGrabSound;
@end