brainrat-private  5.1.2
utility.h
Go to the documentation of this file.
1  /* Copyright (C) 2000-2013 CEA
2  *
3  * This software and supporting documentation were developed by
4  * bioPICSEL
5  * CEA/DSV/I²BM/MIRCen/LMN, Batiment 61,
6  * 18, route du Panorama
7  * 92265 Fontenay-aux-Roses
8  * France
9  */
10 
11 #ifndef BRAINRAT_UTILITY_UTILITY_H
12 #define BRAINRAT_UTILITY_UTILITY_H
13 
14 //--- brainrat ---------------------------------------------------------------
15 #include <brainrat/data/classes.h>
17 //--- aims -------------------------------------------------------------------
18 #include <aims/data/data_g.h>
19 #include <aims/utility/channel.h>
20 //--- cartobase --------------------------------------------------------------
21 #include <cartobase/smart/rcptr.h>
22 //----------------------------------------------------------------------------
23 
24 //============================================================================
25 // F O R W A R D D E C L A R A T I O N S
26 //============================================================================
27 
28 namespace obso_temp {
29 
30 //============================================================================
31 // U T I L I T I E S
32 //============================================================================
33 
34  template< typename T1, typename T2>
35  inline bool pair_key_comparer( const std::pair<T1, T2>& p1,
36  const std::pair<T1, T2>& p2 )
37  {
38  return p1.first < p2.first;
39  }
40 
41  // Get Dpy learning database syntax
42  carto::SyntaxSet & getDpySyntax();
43 
44  // Get Dpy learning database reader helpers
45  soma::PythonReader::HelperSet & getDpyReaderHelpers();
46 
47  // Get brain mask from RGB image
48  template <typename T>
49  AimsData<int16_t> getBrainMask( const AimsData<T> &image,
50  byte channel = GreenChannel);
51 
52 //============================================================================
53 // C O M P A R E R
54 //============================================================================
55 
56  template<class T>
58  {
59  public:
60 
62 
63  virtual ~ImageComparer() {}
64 
65  virtual AimsData<double> compare( const std::list<std::string> &imageFiles,
66  const std::list<std::string> &graphFiles,
67  const std::vector<uint32_t> &labels,
68  const std::vector<std::string> &rois );
69  };
70 
71 } // namespace obso_temp
72 
73 #endif
virtual ~ImageComparer()
Definition: utility.h:63
virtual AimsData< double > compare(const std::list< std::string > &imageFiles, const std::list< std::string > &graphFiles, const std::vector< uint32_t > &labels, const std::vector< std::string > &rois)
carto::SyntaxSet & getDpySyntax()
AimsData< int16_t > getBrainMask(const AimsData< T > &image, byte channel=GreenChannel)
Definition: utility_d.h:53
bool pair_key_comparer(const std::pair< T1, T2 > &p1, const std::pair< T1, T2 > &p2)
Definition: utility.h:35
soma::PythonReader::HelperSet & getDpyReaderHelpers()