File: BrainSetAutoLoaderFilePaintCluster.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 (115 lines) | stat: -rw-r--r-- 3,796 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
#ifndef __BRAIN_SET_AUTO_LOADER_FILE_PAINT_CLUSTER_H__
#define	__BRAIN_SET_AUTO_LOADER_FILE_PAINT_CLUSTER_H__

#include "BrainSetAutoLoaderFile.h"
#include "SceneFile.h"

class BrainModelSurface;
class VolumeFile;

class BrainSetAutoLoaderFilePaintCluster : public BrainSetAutoLoaderFile {
   public:
      /// constructor
      BrainSetAutoLoaderFilePaintCluster(BrainSet* bsIn,
                               const int autoLoaderIndexIn);

      /// destructor
      ~BrainSetAutoLoaderFilePaintCluster();

      /// reinitialize all display settings
      void reset();

      /// update any selections due to changes with loaded data files
      void update();

      /// apply a scene (set display settings)
      void showScene(const SceneFile::Scene& scene,
                             QString& errorMessage);

      /// create a scene (read display settings)
      void saveScene(SceneFile::Scene& scene,
                             const bool onlyIfSelectedFlag,
                             QString& errorMessage);

      /** get the auto load display surface */
      BrainModelSurface* getAutoLoadDisplaySurface() {
         return this->autoLoadDisplaySurface;
      }

      /** set the auto load display surface */
      void setAutoLoadDisplaySurface(BrainModelSurface* bms) {
         this->autoLoadDisplaySurface = bms;
      }

      /**
       * Get the last auto-loaded cluster metric column number.
       */
      int getAutoLoadLastMetricColumnNumber() const {
         return this->autoLoadClusterLastMetricColumnNumber;
      }

      /**
       * Set the last auto-loaded paint cluster number.
       */
      void setAutoLoadLastMetricColumnNumber(const int columnNumber)  {
         this->autoLoadClusterLastMetricColumnNumber = columnNumber;
      }

      // auto load the metric and volume file for the specified node (return error message)
      QString loadFileForNode(const int nodeNumber);

      /**
       * Get the last auto-loaded functional volume.
       */
      VolumeFile* getAutoLoadLastFunctionalVolume() {
         return this->autoLoadClusterLastFunctionalVolume;
      }

      /**
       * Set the last auto-loaded functional volume.
       */
      void setAutoLoadLastFunctionalVolume(VolumeFile* vf)  {
         this->autoLoadClusterLastFunctionalVolume = vf;
      }

      // Get the last auto load node number.
      int getLastAutoLoadNodeNumber() const;

      // Set the last auto load node number.
      void setLastAutoLoadNodeNumber(const int nodeNumber);

      /// get the selected paint column number
      int getPaintColumnNumber();

      /// set the selected paint column number
      void setPaintColumnNumber(const int columnNumber);

      /// Auto load the metric file for the specified voxel (return error message).
      QString loadFileForVoxel(const VoxelIJK& /*voxel*/) { return ""; } // NOT USED

   protected:
      /// get the number of previously node numbers. */
      int getNumberOfPreviouslyLoadedNodeNumbers() const { return previouslyLoadedNodeNumbers.size(); }

      /// get a previously node number (zero index is oldest).
      int getPreviouslyLoadedNodeNumber(const int indx) const { return previouslyLoadedNodeNumbers[indx]; }

      /// auto load cluster display surface
      BrainModelSurface* autoLoadDisplaySurface;

      /// column number of last auto-loaded metric (DO NOT SAVE TO SCENE)
      int autoLoadClusterLastMetricColumnNumber;

      /// last auto loaded functional volume (do not save to scene)
      VolumeFile* autoLoadClusterLastFunctionalVolume;

      /// previously loaded node numbers
      std::vector<int> previouslyLoadedNodeNumbers;

      /// selected paint column number
      int paintColumnNumber;

};

#endif	/* __BRAIN_SET_AUTO_LOADER_FILE_PAINT_CLUSTER_H__ */