-
Notifications
You must be signed in to change notification settings - Fork 218
/
AppController.h
229 lines (186 loc) · 7.03 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
/*=========================================================================
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
#import <Growl/Growl.h>
#endif
#endif
#import <AppKit/AppKit.h>
#import "XMLRPCMethods.h"
@class ThreadPoolServer;
@class ThreadPerConnectionServer;
#import "IChatTheatreDelegate.h"
@class PreferenceController;
@class BrowserController;
@class SplashScreen;
@class DCMNetServiceDelegate;
enum
{
compression_sameAsDefault = 0,
compression_none = 1,
compression_JPEG = 2,
compression_JPEG2000 = 3
};
enum
{
always = 0,
cdOnly = 1,
notMainDrive = 2,
ask = 3
};
@class PluginFilter;
#ifdef __cplusplus
extern "C"
{
#endif
NSRect screenFrame();
NSString * documentsDirectoryFor( int mode, NSString *url);
NSString * documentsDirectory();
#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)
#else
@protocol GrowlApplicationBridgeDelegate
@end
#endif
@interface AppController : NSObject <GrowlApplicationBridgeDelegate>
{
IBOutlet BrowserController *browserController;
IBOutlet NSMenu *filtersMenu;
IBOutlet NSMenu *roisMenu;
IBOutlet NSMenu *othersMenu;
IBOutlet NSMenu *dbMenu;
IBOutlet NSWindow *dbWindow;
IBOutlet NSMenu *windowsTilingMenuRows, *windowsTilingMenuColumns;
NSDictionary *previousDefaults;
BOOL showRestartNeeded;
SplashScreen *splashController;
volatile BOOL quitting;
BOOL verboseUpdateCheck;
NSTask *theTask;
NSNetService *BonjourDICOMService;
BOOL xFlipped, yFlipped; // Dependent on current DCMView settings.
NSTimer *updateTimer;
DCMNetServiceDelegate *dicomNetServiceDelegate;
XMLRPCMethods *XMLRPCServer;
ThreadPoolServer *webServer;
BOOL checkAllWindowsAreVisibleIsOff;
int lastColumns, lastRows;
}
@property BOOL checkAllWindowsAreVisibleIsOff;
@property (readonly) NSMenu *filtersMenu, *windowsTilingMenuRows, *windowsTilingMenuColumns;
#pragma mark-
#pragma mark initialization of the main event loop singleton
+ (void) createNoIndexDirectoryIfNecessary:(NSString*) path;
+ (void) displayImportantNotice:(id) sender;
+ (AppController*) sharedAppController; /**< Return the shared AppController instance */
+ (void)checkForPagesTemplate; /**< Check for Pages report template */
+ (void) resizeWindowWithAnimation:(NSWindow*) window newSize: (NSRect) newWindowFrame;
+ (NSThread*) mainThread;
+ (void) pause;
+ (void) resetToolbars;
#pragma mark-
#pragma mark HTML Templates
+ (void)checkForHTMLTemplates;
#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) startDICOMBonjourSearch; /**< Use Bonjour to search for other DICOM services */
- (void) installPlugins: (NSArray*) pluginsArray;
#pragma mark-
#pragma mark static menu items
//===============OSIRIX========================
- (IBAction) about:(id)sender; /**< Display the about window */
- (IBAction) showPreferencePanel:(id)sender; /**< Show Preferences window */
- (IBAction) checkForUpdates:(id) sender; /**< Check for update */
//===============WINDOW========================
- (IBAction) setFixedTilingRows: (id) sender;
- (IBAction) setFixedTilingColumns: (id) sender;
- (void) initTilingWindows;
- (void) tileWindows:(id)sender; /**< Tile open window */
- (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;
//===============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;
#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 :(NSMutableArray*) pixList;
- (NSArray*) FindRelatedViewers:(NSMutableArray*) 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;
#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 Geneva University Hospital (HUG) specific function
- (void) HUGVerifyComPACSPlugin;
#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;
@end