brainrat-private  5.1.2
vol_diff.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 
12 #ifndef BRAINRAT_OVERLAP_VOL_DIFF_H
13 #define BRAINRAT_OVERLAP_VOL_DIFF_H
14 
15 #include <math.h>
16 #include <aims/data/data.h>
18 
19 template< class T >
20 class Vol_Diff : public Overlap_Method<T>
21 {
22 public:
23 
24  Vol_Diff() ;
25  virtual ~Vol_Diff() { }
26 // virtual double doit( T ref, T test, T true_positive, T ); --> pr calcul specificity
27  virtual double doit( T ref, T test, T true_positive);
28 
29 };
30 
31 template< class T > inline
33 {
34 }
35 
36 
37 template< class T > inline
38 // double Vol_Diff< T >::doit( T ref, T test, T true_positive, T ) --> pr calcul specificity
39 double Vol_Diff< T >::doit( T ref, T test, T true_positive)
40 {
41  double out;
42  out = 2 * std::abs( (double)ref - (double)test )/
43  ( (double)ref + (double)test );
44  return (out);
45 }
46 
47 #endif
Vol_Diff()
Definition: vol_diff.h:32
virtual double doit(T ref, T test, T true_positive)
Definition: vol_diff.h:39
virtual ~Vol_Diff()
Definition: vol_diff.h:25