File: BrainModelSurfaceConnectedSearch.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 (53 lines) | stat: -rw-r--r-- 1,674 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

#ifndef __BRAIN_MODEL_SURFACE_CONNECTED_SEARCH_H__
#define __BRAIN_MODEL_SURFACE_CONNECTED_SEARCH_H__

#include <vector>

#include "BrainModelAlgorithm.h"

class BrainModelSurface;

/// class that searches and identifies topologically connected nodes
class BrainModelSurfaceConnectedSearch : public BrainModelAlgorithm {
   public:
      /// Constructor
      BrainModelSurfaceConnectedSearch(BrainSet* bs, 
                                       const BrainModelSurface* bmsIn,
                                       const int startNodeIn,
                                       const std::vector<int>* limitToTheseNodesIn = NULL);
      
      /// Destructor
      virtual ~BrainModelSurfaceConnectedSearch();
      
      /// execute the search
      virtual void execute() throw (BrainModelAlgorithmException);
      
      /// see if a node is connected to the start node
      bool getNodeConnected(const int nodeNumber) const;
      
   protected:
      /// accept a node (override this to accept/reject nodes during the connected search)
      virtual bool acceptNode(const int nodeNumber);
      
      /// the brain model surface for searching
      const BrainModelSurface* bms;
      
      /// starting node for search
      int startNode;
      
      /// limit the search to these nodes
      const std::vector<int>* limitToTheseNodes;
      
      /// number of nodes in the surface
      int numNodes;
      
      /// node visited flag used during search
      std::vector<int> visited;
      
      /// node connected flag queried by user after search
      std::vector<int> nodeConnected;
      
};

#endif // __BRAIN_MODEL_SURFACE_CONNECTED_SEARCH_H__