-
Notifications
You must be signed in to change notification settings - Fork 0
/
Image.h
50 lines (39 loc) · 1.16 KB
/
Image.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
#import <Cocoa/Cocoa.h>
#include "AccessorMacros.h"
@interface Image : NSObject <NSCopying> {
NSString *fileName;
float *data;
int nx;
int ny;
int error_status;
}
// create, describe, and destroy images
- (id) initWithFITS: (NSString *)file;
- (id) initWithValue:(float)val nx:(int)nrow ny:(int)ncol;
- (id) initWithData:(float *)pixels nx:(int)nrow ny:(int)ncol;
- (NSString *)description;
- (void) setValue:(float)val x:(int)xpos y:(int)ypos;
- (void) setValue:(float)val index:(long int)i;
- (void) clear;
//- (Image *) duplicate;
- (void) dealloc;
// get image values
- (float) value:(int)x :(int)y;
- (float) value:(long int)index;
- (NSMutableArray *) row:(int) y;
- (NSMutableArray *) column:(int) x;
// compute basic image statistics
- (float) min;
- (float) max;
- (float) total;
// trivial image processing
- (Image *) boxcar:(int)halfwidth;
//Accessor methods
- (float *) pixelData;
intAccessor_h(nx, setNx)
intAccessor_h(ny, setNy)
//Save as a FITS file
- (void) saveFITS:(NSString *)file;
//An autoreleased representation of the image for use in an NSImageView
- (NSBitmapImageRep *)createRepresentationWithMin:(float)min andMax:(float)max;
@end