forked from pixmeo/osirix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCPRGenerator.h
57 lines (36 loc) · 1.7 KB
/
CPRGenerator.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
/*=========================================================================
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>
@class CPRGeneratorRequest;
@class CPRVolumeData;
@protocol CPRGeneratorDelegate;
@interface CPRGenerator : NSObject {
NSOperationQueue *_generatorQueue;
NSMutableSet *_observedOperations;
NSMutableArray *_finishedOperations;
id <CPRGeneratorDelegate> _delegate;
NSMutableArray *_generatedFrameTimes;
CPRVolumeData *_volumeData;
}
@property (nonatomic, readwrite, assign) id <CPRGeneratorDelegate> delegate;
@property (readonly) CPRVolumeData *volumeData;
+ (CPRVolumeData *)synchronousRequestVolume:(CPRGeneratorRequest *)request volumeData:(CPRVolumeData *)volumeData;
- (id)initWithVolumeData:(CPRVolumeData *)volumeData;
- (void)requestVolume:(CPRGeneratorRequest *)request;
- (void)runUntilAllRequestsAreFinished; // must be called on the main thread. Delegate callbacks will happen, but this method will not return until all outstanding requests have been processed
- (CGFloat)frameRate;
@end
@protocol CPRGeneratorDelegate <NSObject>
@required
- (void)generator:(CPRGenerator *)generator didGenerateVolume:(CPRVolumeData *)volume request:(CPRGeneratorRequest *)request;
@optional
- (void)generator:(CPRGenerator *)generator didAbandonRequest:(CPRGeneratorRequest *)request;
@end