File: BrainModelSurfaceCellAttributeAssignment.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 (111 lines) | stat: -rw-r--r-- 3,758 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

#ifndef __BRAIN_MODEL_SURFACE_CELL_ATTRIBUTE_ASSIGNMENT_H__
#define __BRAIN_MODEL_SURFACE_CELL_ATTRIBUTE_ASSIGNMENT_H__

#include <vector>

#include "BrainModelAlgorithm.h"

class BrainModelSurface;
class BrainModelSurfacePointLocator;
class CellProjectionFile;
class PaintFile;

/// class for assigning cell attributes
class BrainModelSurfaceCellAttributeAssignment : public BrainModelAlgorithm {
   public:
      /// attribute that is to be assigned
      enum ASSIGN_ATTRIBUTE {
         /// assign area attribute
         ASSIGN_ATTRIBUTE_AREA,
         /// assign geography attribute
         ASSIGN_ATTRIBUTE_GEOGRAPHY,
         /// assign region of interest attribute
         ASSIGN_ATTRIBUTE_REGION_OF_INTEREST
      };
      
      /// assignment method
      enum ASSIGNMENT_METHOD {
         /// assign append
         ASSIGNMENT_METHOD_APPEND, 
         /// assign clear
         ASSIGNMENT_METHOD_CLEAR, 
         /// assign replace
         ASSIGNMENT_METHOD_REPLACE 
      };
      
      // constructor
      BrainModelSurfaceCellAttributeAssignment(BrainSet* brainSetIn,
                             const BrainModelSurface* leftSurfaceIn,
                             const BrainModelSurface* rightSurfaceIn,
                             const BrainModelSurface* cerebellumSurfaceIn,
                             CellProjectionFile* cellProjectionFileIn,
                             const PaintFile* paintFileIn,
                             const std::vector<bool>& paintColumnsSelectedIn,
                             const float maximumDistanceFromSurfaceIn,
                             const ASSIGN_ATTRIBUTE assignAttributeIn,
                             const ASSIGNMENT_METHOD assignmentMethodIn,
                             const QString attributeIDIn,
                             const bool optionIgnoreUnknownValuesFlagIn);

      // destructor
      ~BrainModelSurfaceCellAttributeAssignment();     
      
      // execute the algorithm
      void execute() throw (BrainModelAlgorithmException);
      
      // get attribute names and values
      static void getAttributeNamesAndValues(std::vector<QString>& namesOut,
                                    std::vector<ASSIGN_ATTRIBUTE>& valuesOut);
                                       
      // get assignment names and values
      static void getAssignmentNamesAndValues(std::vector<QString>& namesOut,
                                    std::vector<ASSIGNMENT_METHOD>& valuesOut);
                                    
   protected:
      /// left surface
      const BrainModelSurface* leftSurface;

      /// right surface
      const BrainModelSurface* rightSurface;

      /// cerebellum surface
      const BrainModelSurface* cerebellumSurface;

      /// cell projection file
      CellProjectionFile* cellProjectionFile;

      /// paint file
      const PaintFile* paintFile;

      /// paint columns selected for assignment
      const std::vector<bool>& paintColumnsSelected;

      /// maximum distance from surface
      const float maximumDistanceFromSurface;

      /// attribute being assigned
      const ASSIGN_ATTRIBUTE assignAttribute;

      /// method of assignment
      const ASSIGNMENT_METHOD assignmentMethod;
      
      /// attribute id
      QString attributeID;
      
      /// ignore ??? values option
      const bool optionIgnoreUnknownValuesFlag;
      
      /// left surface point locator    
      BrainModelSurfacePointLocator* leftPointLocator;
      
      /// right surface point locator
      BrainModelSurfacePointLocator* rightPointLocator;
      
      /// cerebellum surface point locator
      BrainModelSurfacePointLocator* cerebellumPointLocator;

};

#endif // __BRAIN_MODEL_SURFACE_CELL_ATTRIBUTE_ASSIGNMENT_H__