39 #define cimg_plugin "plugins/add_fileformat.h"
40 #define cimg_use_netcdf
42 #ifdef cimg_use_netcdf
43 #include "../NetCDF.Tool/struct_parameter_NetCDF.h"
46 #define cimg_plugin2 "plugins/netcdf_file_format4CImg2.h"
47 #define cimglist_plugin2 "plugins/netcdf_file_format4CImgList2.h"
48 #include "../CImg.Tool/CImg_NetCDF.h"
52 #include "Cpeak_factory.h"
53 #include "CImg_math.h"
60 std::string class_name;
61 std::vector<Cpeak<T>*> m_Npeak;
69 CNpeak(std::string &type,
const int &number=3,
const int &dim=2)
72 class_name =
"CNpeak";
85 for (
int i=0; i< m_Npeak.size(); i++)
92 void init(std::string &type)
97 for (
int i=0; i<=m_nbPeak; i++)
102 Cpeak<T>* pPeak=peak_factory.create(type);
103 pPeak->m_verbose = m_verbose;
104 m_Npeak.push_back(pPeak);
107 m_Nstat.assign(m_dim+2,1,1,1,m_nbPeak+1,0);
113 void store(
const int &i,
const int &j)
115 m_Nstat(j,0,0,0,i) = (*m_Npeak[i]).content()[j];
124 for (
int i=0; i<m_Npeak.size(); i++)
127 m_Npeak[i]->exec(img);
129 for (
int j=0; j<m_Nstat.size(); j++)
140 void snr(CImgList<T> snRatio)
143 for (
int i=0; i<m_nbPeak; i++)
145 snRatio(1,0,0,0,i) = snRatio(1,0,0,0,i+1)*100/snRatio(1,0,0,0,i);
void init(std::string &type)
Definition: CNpeak.h:92
This class localizes the most important peak within an image, removes it and provide peak statistics...
Definition: Cpeak.h:47
Definition: Cpeak_factory.h:46
void exec(CImg< T > &img)
Definition: CNpeak.h:118