-
Notifications
You must be signed in to change notification settings - Fork 0
/
FeatureViewerController.h
155 lines (138 loc) · 5.49 KB
/
FeatureViewerController.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
//
// FeatureViewerController.h
//
// Created by Grogee on 9/25/10.
// Copyright 2010 __MyCompanyName__. All rights reserved.
//
#import <Cocoa/Cocoa.h>
#import <Accelerate/Accelerate.h>
#import <AGL/agl.h>
#import "FeatureView.h"
#import "WaveformsView.h"
#import "Cluster.h"
#import "readFeature.h"
#import "nptLoadingEngine.h"
#import "OpenPanelDelegate.h"
#import "utils.h"
#import "ProgressPanel.h"
#import "HistogramView.h"
#import "fileReaders.h"
#import "computeFeatures.h"
#import "RasterView.h"
#import "StimInfo.h"
#import "fileWriters.h"
@interface FeatureViewerController : NSController {
NSMutableArray *Clusters;
NSMutableArray *ClusterOptions;
//menu object for performing cluster options
NSMenu *clusterOptionsMenu;
Cluster *activeCluster,*selectedCluster;
NSArray *clusterModel;
NSPredicate *isValidCluster, *filterClustersPredicate;
NSIndexSet *selectedClusters;
NSMutableArray *clustersSortDescriptors;
NSSortDescriptor *clustersSortDescriptor;
NSData *vertex_data;
NSData *timestamps;
NSMutableArray *featureNames;
uint8_t *channelValidity;
header params;
BOOL dataloaded,autoLoadWaveforms, shouldShowRaster, shouldShowWaveforms;
NSInteger nchannels,nvalidChannels;
//name of current cluster set
NSString *currentBaseName;
NSString *waveformsFile;
NSOperationQueue *queue;
NSTimer *archiveTimer, *cycleTimer;
NSNumber *featureCycleInterval;
NSString *selectedWaveform;
NSAttributedString *releaseNotes;
StimInfo *stimInfo;
NSMenu *waveformsMenu;
IBOutlet FeatureView *fw;
IBOutlet WaveformsView *wfv;
IBOutlet NSComboBox *dim1;
IBOutlet NSComboBox *dim2;
IBOutlet NSComboBox *dim3;
IBOutlet NSButton *allActive;
IBOutlet NSPanel *filterClustersPanel;
IBOutlet NSPopUpButton *selectClusterOption;
IBOutlet ProgressPanel *progressPanel;
IBOutlet HistogramView *histView;
IBOutlet RasterView *rasterView;
IBOutlet NSPanel *inputPanel;
IBOutlet NSPanel *cyclePanel;
IBOutlet NSArrayController *clusterController;
IBOutlet NSPredicateEditor *filterPredicates;
IBOutlet NSMenu *clusterMenu;
IBOutlet NSPanel *clusterNotesPanel;
}
-(void)insertObject:(Cluster *)p inClustersAtIndex:(NSUInteger)index;
-(void)removeObjectFromClustersAtIndex:(NSUInteger)index;
-(void)removeAllObjectsFromClusters;
-(void)setClusters:(NSMutableArray *)a;
-(NSArray*)Clusters;
-(void)setClusterOptions:(NSMutableArray *)a;
-(NSArray*)ClusterOptions;
-(void)insertObject:(NSString *)p inClusterOptionsAtIndex:(NSUInteger)index;
-(void)removeObjectFromClusterOptionsAtIndex:(NSUInteger)index;
-(id)objectInClustersAtIndex: (NSUInteger)index;
-(void)addClusterOption:(NSString*)option;
-(void)ClusterStateChanged:(NSNotification*)notification;
-(void)mergeCluster: (Cluster *)cluster1 withCluster: (Cluster*)cluster2;
-(void)deleteCluster: (Cluster *)cluster;
-(void)loadWaveforms: (Cluster*)cluster;
-(void)readClusterModel:(NSString*)path;
-(void)performComputation:(NSString*)operationTitle usingSelector:(SEL)operationSelector;
-(void)archiveClusters;
-(void) openFeatureFile:(NSString*)path;
-(void) openWaveformsFile: (NSString*)path;
-(void) openClusterFile:(NSString *)path;
-(void) setAvailableFeatures:(NSArray*)channels;
-(void) receiveNotification:(NSNotification*)notification;
//This might go away
-(void) computeFeature:(NSData*)waveforms withNumberOfSpikes: (NSUInteger)nwaves andChannels:(NSUInteger)channels andTimepoints:(NSUInteger)timepoints;
-(void)addPointsToCluster:(Cluster*)cluster;
//
-(void)loadStimInfo;
- (IBAction) loadFeatureFile: (id)sender;
- (IBAction) loadClusterIds: (id)sender;
//- (IBAction) loadWaveforms: (id)sender;
- (IBAction) changeDim1: (id)sender;
- (IBAction) changeDim2: (id)sender;
- (IBAction) changeDim3: (id)sender;
- (IBAction) changeAllClusters: (id)sender;
- (IBAction) performClusterOption: (id)sender;
- (IBAction) saveClusters:(id)sender;
-(IBAction)saveTemplates:(id)sender;
- (IBAction) cycleDims: (id)sender;
- (IBAction) clusterThumbClicked: (id)sender;
//- (IBAction) chooseWaveforms: (id)sender;
- (IBAction) changeCycleInterval: (id)sender;
- (IBAction)saveFeatureSpace:(id)sender;
-(void)cycleDimensionsUsingTimer:(NSTimer*)timer;
//@property (assign) IBOutlet NSWindow *window;
@property (assign) IBOutlet FeatureView *fw;
@property (assign) IBOutlet WaveformsView *wfv;
@property (assign) IBOutlet NSComboBox *dim1;
@property (assign) IBOutlet NSComboBox *dim2;
@property (assign) IBOutlet NSComboBox *dim3;
@property (assign) IBOutlet HistogramView *histView;
@property (assign) IBOutlet RasterView *rasterView;
@property (assign) IBOutlet NSMenu *clusterMenu;
@property (assign) IBOutlet NSPanel *clusterNotesPanel;
@property (retain,readwrite) NSMutableArray *Clusters;
@property (retain,readwrite) NSMutableArray *ClusterOptions;
@property (retain, readwrite) NSPredicate *isValidCluster;
@property (retain, readwrite) NSPredicate *filterClustersPredicate;
@property (retain, readwrite) NSSortDescriptor *clustersSortDescriptor;
@property (retain, readwrite) NSMutableArray *clustersSortDescriptors;
@property (retain, readwrite) NSString *waveformsFile;
@property (assign,readwrite) Cluster *activeCluster, *selectedCluster;
@property (assign,readwrite) NSIndexSet *selectedClusters;
@property (retain,readwrite) NSString *selectedWaveform;
@property (retain,readwrite) NSNumber *featureCycleInterval;
@property (retain,readwrite) NSAttributedString *releasenotes;
@property (retain,readwrite) StimInfo *stimInfo;
@property (retain,readwrite) NSMenu *waveformsMenu;
@end