File: BrainModelVolumeToSurfaceMapperAlgorithmParameters.h

package info (click to toggle)
caret 5.6.4~dfsg.1-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, wheezy
  • size: 31,904 kB
  • ctags: 28,901
  • sloc: cpp: 378,050; python: 6,718; ansic: 5,507; makefile: 333; sh: 46
file content (307 lines) | stat: -rw-r--r-- 12,849 bytes parent folder | download | duplicates (2)
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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307

#ifndef __BRAIN_MODEL_VOLUME_TO_SURFACE_MAPPER_ALGORITHM_PARAMETERS_H__
#define __BRAIN_MODEL_VOLUME_TO_SURFACE_MAPPER_ALGORITHM_PARAMETERS_H__

/*LICENSE_START*/
/*
 *  Copyright 1995-2002 Washington University School of Medicine
 *
 *  http://brainmap.wustl.edu
 *
 *  This file is part of CARET.
 *
 *  CARET is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  CARET is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with CARET; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 */
/*LICENSE_END*/

#include <vector>

#include <QString>

class PreferencesFile;

/// class for volume to surface algorithm parameters
class BrainModelVolumeToSurfaceMapperAlgorithmParameters {
   public:
      /// mapping algorithm
      enum ALGORITHM {
         /// metric average nodes mapping algorithm
         ALGORITHM_METRIC_AVERAGE_NODES,
         /// metric average voxel mapping algorithm
         ALGORITHM_METRIC_AVERAGE_VOXEL,
         /// metric enclosing voxel mapping algorithm
         ALGORITHM_METRIC_ENCLOSING_VOXEL,
         /// metric gaussian mapping algorithm
         ALGORITHM_METRIC_GAUSSIAN,
         /// metric interpolated voxel mapping algorithm
         ALGORITHM_METRIC_INTERPOLATED_VOXEL,
         /// metric maximum voxel mapping algorithm
         ALGORITHM_METRIC_MAXIMUM_VOXEL,
         /// metric MCW brainfish mapping algorithm
         ALGORITHM_METRIC_MCW_BRAINFISH,
         /// metric strongest voxel mapping algorithm
         ALGORITHM_METRIC_STRONGEST_VOXEL,
         /// paint enclosing voxel mapping algorithm
         ALGORITHM_PAINT_ENCLOSING_VOXEL
      };
      
      // constructor
      BrainModelVolumeToSurfaceMapperAlgorithmParameters();
      
      // destructor
      ~BrainModelVolumeToSurfaceMapperAlgorithmParameters();
      
      // transfer parameters from preferences file
      void transferParametersFromPreferencesFile(const PreferencesFile* pf);
      
      // transfer parameters to preferences file
      void transferParametersToPreferncesFile(PreferencesFile* pf,
                                              const bool writePreferencesFileFlag);
      
      // get algorithm
      ALGORITHM getAlgorithm() const;
      
      // set algorithm
      void setAlgorithm(const ALGORITHM alg);
      
      // get the algorithm names and values
      static void getAlgorithmNamesAndValues(std::vector<QString>& namesOut,
                                             std::vector<ALGORITHM>& valuesOut);
                                             
      // get the algorithm name
      static QString getAlgorithmName(const ALGORITHM alg);
      
      // get algorithm from string
      static ALGORITHM getAlgorithmFromNameString(const QString& s);
      
      // get algorithm parameter as string for comment usage
      QString getAlgorithmParametersForComment() const;
      
      // get the algorithm parameters as a equal and semicolon separated string
      QString getAlgorithmParametersAsString() const;
      
      // set the algorithm parameters from a string
      void setAlgorithmParametersFromString(const QString& s);
      
      // get the average voxel parameters
      void getAlgorithmMetricAverageVoxelParameters(float& neighborsOut) const;
      
      // set the average voxel parameters
      void setAlgorithmMetricAverageVoxelParameters(const float neighborsIn);
      
      // get the maximum voxel parameters
      void getAlgorithmMetricMaximumVoxelParameters(float& neighborsOut) const;
      
      // set the maximum voxel parameters
      void setAlgorithmMetricMaximumVoxelParameters(const float neighborsIn);
      
      // get the strongest voxel parameters
      void getAlgorithmMetricStrongestVoxelParameters(float& neighborsOut) const;
      
      // set the strongest voxel parameters
      void setAlgorithmMetricStrongestVoxelParameters(const float neighborsIn);
      
      // set gaussian algorithm parameters
      void getAlgorithmMetricGaussianParameters(float& gaussianNeighborsOut,
                                          float& gaussianSigmaNormOut,
                                          float& gaussianSigmaTangOut,
                                          float& gaussianNormBelowCutoffOut,
                                          float& gaussianNormAboveCutoffOut,
                                          float& gaussianTangCutoffOut) const;
                                          
      // set gaussian algorithm parameters
      void setAlgorithmMetricGaussianParameters(const float gaussianNeighborsIn,
                                          const float gaussianSigmaNormIn,
                                          const float gaussianSigmaTangIn,
                                          const float gaussianNormBelowCutoffIn,
                                          const float gaussianNormAboveCutoffIn,
                                          const float gaussianTangCutoffIn);
       
      // get the mcw brainfish algorithm parameters
      void getAlgorithmMetricMcwBrainFishParameters(float& mcwBrainFishMaxDistanceOut,
                                              int& mcwBrainFishSplatFactorOut) const;
                                              
      // set the mcw brainfish algorithm parameters
      void setAlgorithmMetricMcwBrainFishParameters(const float mcwBrainFishMaxDistanceIn,
                                              const int mcwBrainFishSplatFactorIn);
   
      /// get PALS metric average fiducial mapping enabled
      bool getPalsMetricAverageFiducialMappingEnabled() const { return palsMetricAverageFiducialMappingEnabled; }
      
      /// get PALS metric multi fiducial mapping enabled
      bool getPalsMetricMultiFiducialMappingEnabled() const { return palsMetricMultiFiducialMappingEnabled; }
      
      /// get PALS metric minimum enabled
      bool getPalsMetricMinimumEnabled() const { return palsMetricMinimumEnabled; }
      
      /// get PALS metric maximum enabled
      bool getPalsMetricMaximumEnabled() const { return palsMetricMaximumEnabled; }
      
      /// get PALS metric standard deviation enabled
      bool getPalsMetricStandardDeviationEnabled() const { return palsMetricStandardDeviationEnabled; }
      
      /// get PALS metric standard error enabled
      bool getPalsMetricStandardErrorEnabled() const { return palsMetricStandardErrorEnabled; }
      
      /// get PALS metric all cases enabled
      bool getPalsMetricAllCasesEnabled() const { return palsMetricAllCasesEnabled; }
      
      /// get PALS paint average fiducial mapping enabled
      bool getPalsPaintAverageFiducialMappingEnabled() const { return palsPaintAverageFiducialMappingEnabled; }
      
      /// get PALS paint most common enabled
      bool getPalsPaintMostCommonEnabled() const { return palsPaintMostCommonEnabled; }
      
      /// get PALS paint most common exlude unidentified enabled
      bool getPalsPaintMostCommonExcludeUnidentifiedEnabled() const { return palsPaintMostCommonExcludeUnidentifiedEnabled; }
      
      /// get PALS paint all cases enabled
      bool getPalsPaintAllCasesEnabled() const { return palsPaintAllCasesEnabled; }
      
      /// PALS metric average fiducial mapping enabled
      void setPalsMetricAverageFiducialMappingEnabled(const bool b) { palsMetricAverageFiducialMappingEnabled = b; }
      
      /// PALS metric multi fiducial mapping enabled
      void setPalsMetricMultiFiducialMappingEnabled(const bool b) { palsMetricMultiFiducialMappingEnabled = b; }
      
      /// PALS metric minimum enabled
      void setPalsMetricMinimumEnabled(const bool b) { palsMetricMinimumEnabled = b; }
      
      /// PALS metric maximum enabled
      void setPalsMetricMaximumEnabled(const bool b) { palsMetricMaximumEnabled = b; }
      
      /// PALS metric standard deviation enabled
      void setPalsMetricStandardDeviationEnabled(const bool b) { palsMetricStandardDeviationEnabled = b; }
      
      /// PALS metric standard error enabled
      void setPalsMetricStandardErrorEnabled(const bool b) { palsMetricStandardErrorEnabled = b; }
      
      /// PALS metric all cases enabled
      void setPalsMetricAllCasesEnabled(const bool b) { palsMetricAllCasesEnabled = b; }
      
      /// PALS paint average fiducial mapping enabled
      void setPalsPaintAverageFiducialMappingEnabled(const bool b) { palsPaintAverageFiducialMappingEnabled = b; }
      
      /// PALS paint most common enabled
      void setPalsPaintMostCommonEnabled(const bool b) { palsPaintMostCommonEnabled = b; }
      
      /// PALS paint most common exlude unidentified enabled
      void setPalsPaintMostCommonExcludeUnidentifiedEnabled(const bool b) { palsPaintMostCommonExcludeUnidentifiedEnabled = b; }
      
      /// PALS paint all cases enabled
      void setPalsPaintAllCasesEnabled(const bool b) { palsPaintAllCasesEnabled = b; }

      /// get the metric average nodes algorithm name
      static QString getAlgorithmMetricAverageNodesName() { return "METRIC_AVERAGE_NODES"; }
   
      /// get the metric average voxel algorithm name
      static QString getAlgorithmMetricAverageVoxelName() { return "METRIC_AVERAGE_VOXEL"; }
   
      /// get the metric enclosing voxel algorithm name
      static QString getAlgorithmMetricEnclosingVoxelName() { return "METRIC_ENCLOSING_VOXEL"; }
   
      /// get the metric gaussian algorithm name
      static QString getAlgorithmMetricGaussianName() { return "METRIC_GAUSSIAN"; }
   
      /// get the metric interpolated voxel algorithm name
      static QString getAlgorithmMetricInterpolatedVoxelName() { return "METRIC_INTERPOLATED_VOXEL"; }
   
      /// get the metric maximum voxel algorithm name
      static QString getAlgorithmMetricMaximumVoxelName() { return "METRIC_MAXIMUM_VOXEL"; }
   
      /// get the metric mcw brainfish algorithm name
      static QString getAlgorithmMetricMcwBrainFishName() { return "METRIC_MCW_BRAIN_FISH"; }
   
      /// get the metric strongest voxel algorithm name
      static QString getAlgorithmMetricStrongestVoxelName() { return "METRIC_STRONGEST_VOXEL"; }
   
      /// get the paint enclosing voxel algorithm name
      static QString getAlgorithmPaintEnclosingVoxel() { return "PAINT_ENCLOSING_VOXEL"; }
      
   protected:
      /// algorithm used for mapping
      ALGORITHM algorithm;
      
      /// average voxel neighbors
      float averageVoxelNeighbors;
      
      /// maximum voxel neighbors
      float maximumVoxelNeighbors;
      
      /// strongest voxel neighbors
      float strongestVoxelNeighbors;
      
      /// gaussian  neighbors
      float gaussianNeighbors;
      
      /// gaussian sigma norm
      float gaussianSigmaNorm;
      
      /// gaussian sigma tang
      float gaussianSigmaTang;
      
      /// gaussian norm below cutoff
      float gaussianNormBelowCutoff;
      
      /// gaussian norm above cutoff
      float gaussianNormAboveCutoff;
      
      /// gaussian tang cutoff
      float gaussianTangCutoff;
      
      /// mcw brain fish max distance
      float mcwBrainFishMaxDistance;
      
      /// mcw brain fish splat factor
      int mcwBrainFishSplatFactor;
      
      /// PALS metric average fiducial mapping enabled
      bool palsMetricAverageFiducialMappingEnabled;
      
      /// PALS metric multi fiducial mapping enabled
      bool palsMetricMultiFiducialMappingEnabled;
      
      /// PALS metric minimum enabled
      bool palsMetricMinimumEnabled;
      
      /// PALS metric maximum enabled
      bool palsMetricMaximumEnabled;
      
      /// PALS metric standard deviation enabled
      bool palsMetricStandardDeviationEnabled;
      
      /// PALS metric standard error enabled
      bool palsMetricStandardErrorEnabled;
      
      /// PALS metric all cases enabled
      bool palsMetricAllCasesEnabled;
      
      /// PALS paint average fiducial mapping enabled
      bool palsPaintAverageFiducialMappingEnabled;
      
      /// PALS paint most common enabled
      bool palsPaintMostCommonEnabled;
      
      /// PALS paint most common exlude unidentified enabled
      bool palsPaintMostCommonExcludeUnidentifiedEnabled;
      
      /// PALS paint all cases enabled
      bool palsPaintAllCasesEnabled;
      
};

#endif // __BRAIN_MODEL_VOLUME_TO_SURFACE_MAPPER_ALGORITHM_PARAMETERS_H__