-
Notifications
You must be signed in to change notification settings - Fork 217
/
CPRMPRDCMView.h
142 lines (107 loc) · 4.6 KB
/
CPRMPRDCMView.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
/*=========================================================================
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 "DCMView.h"
#import "VRController.h"
#import "N3Geometry.h"
#import "CPRCurvedPath.h"
#import "CPRProjectionOperation.h"
enum _CPRViewClippingRangeMode {
CPRViewClippingRangeVRMode = CPRProjectionModeVR, // don't use this, it is not implemented
CPRViewClippingRangeMIPMode = CPRProjectionModeMIP,
CPRViewClippingRangeMinIPMode = CPRProjectionModeMinIP,
CPRViewClippingRangeMeanMode = CPRProjectionModeMean
};
typedef CPRProjectionMode CPRViewClippingRangeMode;
enum _CPRMPRDCMViewCPRType { // more than kinda ridiculous, move this and the equivalent CPRType constants to a single consts file.....
CPRMPRDCMViewCPRStraightenedType = 0,
CPRMPRDCMViewCPRStretchedType = 1
};
typedef NSInteger CPRMPRDCMViewCPRType;
@class CPRController;
@class CPRDisplayInfo;
@class CPRTransverseView;
@class OSIROIManager;
@protocol CPRViewDelegate;
@interface CPRMPRDCMView : DCMView
{
id <CPRViewDelegate> delegate;
int viewID;
VRView *vrView;
DCMPix *pix;
Camera *camera;
CPRController *windowController;
CPRCurvedPath *curvedPath;
CPRDisplayInfo *displayInfo;
NSInteger editingCurvedPathCount;
CPRCurvedPathControlToken draggedToken;
float angleMPR;
CPRMPRDCMViewCPRType _CPRType;
OSIROIManager *_ROIManager;
BOOL dontUseAutoLOD;
float crossLinesA[2][3];
float crossLinesB[2][3];
int viewExport;
float fromIntervalExport, toIntervalExport;
float LOD, previousResolution, previousPixelSpacing, previousOrientation[ 9], previousOrigin[ 3];
BOOL rotateLines;
BOOL moveCenter;
BOOL displayCrossLines;
BOOL lastRenderingWasMoveCenter;
float rotateLinesStartAngle;
BOOL dontReenterCrossReferenceLines;
BOOL dontCheckRoiChange;
}
@property (assign) id <CPRViewDelegate> delegate;
@property (readonly) DCMPix *pix;
@property (retain) Camera *camera;
@property (nonatomic, copy) CPRCurvedPath *curvedPath;
@property (nonatomic, copy) CPRDisplayInfo *displayInfo;
@property (nonatomic) float angleMPR, fromIntervalExport, toIntervalExport, LOD;
@property int viewExport;
@property (nonatomic) BOOL displayCrossLines, dontUseAutoLOD;
@property (readonly) VRView *vrView;
@property (readonly) BOOL rotateLines, moveCenter;
@property (nonatomic, assign) CPRMPRDCMViewCPRType CPRType;
- (BOOL)is2DTool:(short)tool;
- (void) setDCMPixList:(NSMutableArray*)pix filesList:(NSArray*)files roiList:(NSMutableArray*)rois firstImage:(short)firstImage type:(char)type reset:(BOOL)reset;
- (void) setVRView: (VRView*) v viewID:(int) i;
- (void) updateViewMPR;
- (void) updateViewMPR:(BOOL) computeCrossReferenceLines;
- (void) setCrossReferenceLines: (float[2][3]) a and: (float[2][3]) b;
- (void) saveCamera;
- (void) restoreCamera;
- (void) restoreCameraAndCheckForFrame: (BOOL) v;
- (void) updateMousePosition: (NSEvent*) theEvent;
- (void) detect2DPointInThisSlice;
- (void) magicTrick;
- (void) removeROI: (NSNotification*) note;
- (void)setCrossCenter:(NSPoint)crossCenter;
- (N3AffineTransform)pixToDicomTransform; // converts points in the DCMPix's coordinate space ("Slice Coordinates") into the DICOM space (patient space with mm units)
- (N3Plane)plane;
- (NSString *)planeName;
- (NSColor *)colorForPlaneName:(NSString *)planeName;
@end
@protocol CPRViewDelegate <NSObject>
@optional
- (void)CPRViewWillEditCurvedPath:(id)CPRMPRDCMView;
- (void)CPRViewDidUpdateCurvedPath:(id)CPRMPRDCMView;
- (void)CPRViewDidEditCurvedPath:(id)CPRMPRDCMView; // the controller will use didBegin and didEnd to log the undo
- (void)CPRViewWillEditDisplayInfo:(id)CPRMPRDCMView;
- (void)CPRViewDidEditDisplayInfo:(id)CPRMPRDCMView;
- (void)CPRViewDidEditAssistedCurvedPath:(id)CPRMPRDCMView;
- (void)CPRViewDidChangeGeneratedHeight:(id)CPRMPRDCMView;
- (void)CPRView:(CPRMPRDCMView*)CPRMPRDCMView setCrossCenter:(N3Vector)crossCenter;
- (void)CPRTransverseViewDidChangeRenderingScale:(CPRTransverseView*)CPRTransverseView;
@end
@interface DCMView (CPRAdditions)
- (N3AffineTransform)viewToPixTransform; // converts coordinates in the NSView's space to coordinates on a DCMPix object in "Slice Coordinates"
@end