YaDICs  V04.14.a
Yet another Digital Image Correlation software: platform dedicated to 2/3D Fluid and Solid kinematics field measurements.
 All Classes Files Functions Variables Pages
Cpeak_max.h
Go to the documentation of this file.
1 /**********************************************************************
2  * Copyright (C) 2012, The YaDICs Project Developers.
3  * See the COPYRIGHT file at the top-level directory of this distribution ./COPYRIGHT.
4  * See ./COPYING file for copying and redistribution conditions.
5  *
6  * This file is part of YaDICs.
7  * YaDICs is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * YaDICs is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with YaDICs. If not, see <http://www.gnu.org/licenses/>.
19  *
20  * Information about how to use the software are provided at http://yadic.univ-lille1.fr/
21  **********************************************************************/
22 
23 
24 #ifndef CPEAK_MAX
25 #define CPEAK_MAX
26 
36 #include "Cpeak.h"
37 
40 template<typename T>
41 class Cpeak_max: public Cpeak<T>
42 {
43 
49  public:
50 
51  std::string class_name;
52 
53  Cpeak_max(): Cpeak<T>()
54  {//constructor
55 
56  class_name = "Cpeak_max";
57 
58  }
59 
60  virtual void peak_detection(CImg<T> &img)
61  {// peak_detection (max)
62 
67  this->m_mag=img.get_stats()[1];// get max magnitude
68 
69  for (int i=0; i<this->m_pos.size(); i++)
70  {
71  this->m_pos[i]=img.get_stats()[8+i];//get max along dimension "i"
72  }
73  //get_stats()[8] = Xmax, get_stats()[9] = Ymax, get_stats()[10] = Zmax,
74 
75  }
76 
77 };
78 
79 #endif
This class localizes the most important peak within an image, removes it and provide peak statistics...
Definition: Cpeak.h:47
Definition: Cpeak_max.h:41
virtual void peak_detection(CImg< T > &img)
Definition: Cpeak_max.h:60