File: BrainSetAutoLoaderManager.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 (93 lines) | stat: -rw-r--r-- 3,006 bytes parent folder | download
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
#ifndef __BRAIN_SET_AUTOLOADER_MANAGER_H__
#define	__BRAIN_SET_AUTOLOADER_MANAGER_H__

#include "SceneFile.h"
#include "VoxelIJK.h"

class BrainSet;
class BrainSetAutoLoaderFile;
class BrainSetAutoLoaderFileFunctionalVolume;
class BrainSetAutoLoaderFileMetric;
class BrainSetAutoLoaderFileMetricByNode;
class BrainSetAutoLoaderFilePaintCluster;

/// processes automatic loading of data files
class BrainSetAutoLoaderManager {

   public:
      /// number of metric auto loaders
      enum { NUMBER_OF_METRIC_AUTO_LOADERS = 4 };

      /// number of metric node auto loaders
      enum { NUMBER_OF_METRIC_NODE_AUTO_LOADERS = 4 };

      /// number of functional volume auto loaders
      enum { NUMBER_OF_FUNCTIONAL_VOLUME_AUTO_LOADERS = 1 };

      /// number of cluster auto loaders
      enum { NUMBER_OF_CLUSTER_AUTO_LOADERS = 2 };

      // constructor
      BrainSetAutoLoaderManager(BrainSet* bs);

      // destructor
      ~BrainSetAutoLoaderManager();

      // process autoloading for a voxel.
      QString processAutoLoading(const float xyzIn[3]);

      // Process autoloading for a node. 
      QString processAutoLoading(const int nodeNumber);

      /// get a metric autoloader
      BrainSetAutoLoaderFileMetric* getMetricAutoLoader(const int indx);

      /// get a metric by node autoloader
      BrainSetAutoLoaderFileMetricByNode* getMetricNodeAutoLoader(const int indx);

      /// get a functional volume auto loader
      BrainSetAutoLoaderFileFunctionalVolume* getFunctionalVolumeAutoLoader(const int indx);

      /// get a cluster auto loader
      BrainSetAutoLoaderFilePaintCluster* getClusterAutoLoader(const int indx);

      // see if any auto loaders are selected
      bool getAnyAutoLoaderSelected();

      // 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);

   protected:
      /// the brain set
      BrainSet* brainSet;

      /// metric auto loaders
      BrainSetAutoLoaderFileMetric* metricAutoLoaders[NUMBER_OF_METRIC_AUTO_LOADERS];

      /// metric node auto loaders
      BrainSetAutoLoaderFileMetricByNode* metricNodeAutoLoaders[NUMBER_OF_METRIC_NODE_AUTO_LOADERS];

      /// functional volume auto loaders
      BrainSetAutoLoaderFileFunctionalVolume* functionalVolumeAutoLoaders[NUMBER_OF_FUNCTIONAL_VOLUME_AUTO_LOADERS];

      /// cluster auto loaders
      BrainSetAutoLoaderFilePaintCluster* clusterAutoLoaders[NUMBER_OF_CLUSTER_AUTO_LOADERS];

      /// all of the auto loaders
      std::vector<BrainSetAutoLoaderFile*> allFileAutoLoaders;

};
#endif	/* __BRAIN_SET_AUTOLOADER_MANAGER_H__ */