forked from pixmeo/osirix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSRController.h
155 lines (112 loc) · 4.83 KB
/
SRController.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
/*=========================================================================
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.
=========================================================================*/
#import <Cocoa/Cocoa.h>
#import "DCMPix.h"
#import "ColorTransferView.h"
#import "ViewerController.h"
#import "Window3DController.h"
// Fly Thru
#import "FlyThruController.h"
#import "FlyThru.h"
#import "SRFlyThruAdapter.h"
// ROIs Volumes
#define roi3Dvolume
@class SRView;
@class ROIVolume;
/** \brief Window Controller for Surface Rendering */
@interface SRController : Window3DController <NSWindowDelegate, NSToolbarDelegate>
{
IBOutlet NSView *toolsView, *LODView, *BlendingView, *export3DView, *perspectiveView, *OrientationsView, *BackgroundColorView;
IBOutlet SRView *view;
IBOutlet NSWindow *SRSettingsWindow;
BOOL fusionSettingsWindow;
NSToolbar *toolbar;
NSMutableArray *pixList;
NSArray *fileList;
BOOL blending;
NSData *blendingVolumeData;
NSMutableArray *blendingPixList;
ViewerController *blendingController;
NSData *volumeData;
// Fly Thru
SRFlyThruAdapter *FTAdapter;
// 3D Points
ViewerController *viewer2D;
NSMutableArray *roi2DPointsArray, *sliceNumber2DPointsArray, *x2DPointsArray, *y2DPointsArray, *z2DPointsArray;
// ROIs Volumes
NSMutableArray *roiVolumes;
float _firstSurface, _secondSurface, _resolution, _firstTransparency, _secondTransparency, _decimate;
int _smooth;
NSColor *_firstColor, *_secondColor;
BOOL _shouldDecimate, _shouldSmooth, _useFirstSurface, _useSecondSurface, _shouldRenderFusion;
NSMutableDictionary *settings, *blendingSettings;
NSTimeInterval flyThruRecordingTimeFrame;
// Backward compatibility for older xibs, to be delete in next release : not used !
float fusionFirstSurface, fusionSecondSurface, fusionResolution, fusionFirstTransparency, fusionSecondTransparency, fusionDecimate;
int fusionSmooth;
NSColor *fusionFirstColor, *fusionSecondColor;
BOOL fusionShouldDecimate, fusionShouldSmooth, fusionUseFirstSurface, fusionUseSecondSurface;
#ifdef _STEREO_VISION_
//Added SilvanWidmer 26-08-09
IBOutlet NSWindow *SRGeometrieSettingsWindow;
double _screenDistance;
double _screenHeight;
double _dolly;
double _camFocal;
IBOutlet NSTextField *distanceValue;
IBOutlet NSTextField *heightValue;
IBOutlet NSTextField *eyeDistance;
IBOutlet NSTextField *camFocalValue;
IBOutlet NSButton *parallelFlag;
IBOutlet NSView *stereoIconView;
#endif
}
@property float firstSurface, secondSurface, resolution, firstTransparency, secondTransparency, decimate;
@property int smooth;
@property (retain) NSColor *firstColor, *secondColor;
@property BOOL shouldDecimate, shouldSmooth, useFirstSurface, useSecondSurface, shouldRenderFusion;
// Backward compatibility for older xibs, to be delete in next release : not used !
@property float fusionFirstSurface, fusionSecondSurface, fusionResolution, fusionFirstTransparency, fusionSecondTransparency, fusionDecimate;
@property int fusionSmooth;
@property (retain) NSColor *fusionFirstColor, *fusionSecondColor;
@property BOOL fusionShouldDecimate, fusionShouldSmooth, fusionUseFirstSurface, fusionUseSecondSurface;
- (IBAction) setOrientation:(id) sender;
- (ViewerController*) blendingController;
- (id) initWithPix:(NSMutableArray*) pix :(NSArray*) f :(NSData*) vData :(ViewerController*) bC :(ViewerController*) vC;
- (void) setupToolbar;
- (void) setDefaultTool:(id) sender;
- (IBAction) ApplySettings:(id) sender;
- (void) ChangeSettings:(id) sender;
- (IBAction) SettingsPopup:(id) sender;
- (NSArray*) fileList;
- (IBAction)flyThruButtonMenu:(id)sender;
- (IBAction)flyThruControllerInit:(id)sender;
- (void)recordFlyThru;
// 3D Points
- (void) add2DPoint: (float) x : (float) y : (float) z;
- (void) remove2DPoint: (float) x : (float) y : (float) z;
- (void) add3DPoint: (NSNotification*) note;
- (void) remove3DPointROI: (ROI*) removedROI;
- (void) remove3DPoint: (NSNotification*) note;
- (void) createContextualMenu;
- (ViewerController *) viewer2D;
- (void)renderSurfaces;
- (void)renderFusionSurfaces;
#ifdef roi3Dvolume
- (void) computeROIVolumes;
- (NSMutableArray*) roiVolumes;
- (void) displayROIVolume: (ROIVolume*) v;
- (void) hideROIVolume: (ROIVolume*) v;
- (void) displayROIVolumes;
- (IBAction) roiGetManager:(id) sender;
#endif
- (BOOL) shouldRenderFusion;
@end