| [658] | 1 | // This may look like C code, but it is really -*- C++ -*-
 | 
|---|
 | 2 | 
 | 
|---|
 | 3 | // Operations non elementaires sur les images.
 | 
|---|
 | 4 | // Les operations elementaires sont des methodes de la classe.
 | 
|---|
 | 5 | 
 | 
|---|
 | 6 | //    C. Magneville  (Version C)  E. Aubourg / R. Ansari C++
 | 
|---|
 | 7 | 
 | 
|---|
 | 8 | // LAL (Orsay) / IN2P3-CNRS  DAPNIA/SPP (Saclay) / CEA
 | 
|---|
 | 9 | 
 | 
|---|
 | 10 | #ifndef IMAGEOP_H_SEEN
 | 
|---|
 | 11 | #define IMAGEOP_H_SEEN
 | 
|---|
 | 12 | 
 | 
|---|
 | 13 | #include "cimage.h"
 | 
|---|
 | 14 | #include "cspline.h"
 | 
|---|
 | 15 | #include "dynccd.h"
 | 
|---|
 | 16 | 
 | 
|---|
 | 17 | template <class T>
 | 
|---|
 | 18 | void CleanImages(int nImg, Image<T>** imgTab, double nSig=1,
 | 
|---|
 | 19 |                  double lowbad=-1e20, double highbad=1e20);
 | 
|---|
 | 20 | 
 | 
|---|
 | 21 | 
 | 
|---|
 | 22 | template <class T>
 | 
|---|
 | 23 | float ImgFondCielHisto(Image<T> const& img, float binWidth=1, int degre=2, 
 | 
|---|
 | 24 |                        float frac=0.5f,
 | 
|---|
 | 25 |                        float low=-999999.0, float high=999999.0,
 | 
|---|
 | 26 |                        int debug=0);
 | 
|---|
 | 27 | template <class T>
 | 
|---|
 | 28 | float ImgSigmaCiel(Image<T> const& img, int ndata, int binWidth, int taille,
 | 
|---|
 | 29 |                    float frac=0.5f, int degre=2,
 | 
|---|
 | 30 |                    float low=-999999.0, float high=999999.0,
 | 
|---|
 | 31 |                    int debug=0);
 | 
|---|
 | 32 | 
 | 
|---|
 | 33 | int CalFondImage(RzImage *pim, double low, double high, int action);
 | 
|---|
 | 34 | 
 | 
|---|
 | 35 | int FondSigmaCiel(RzImage *pim, float low, float high, int pvsz=100
 | 
|---|
 | 36 |               ,float nbsig1=3.5f,float nbsig2=7.f,float nbsig3=5.f
 | 
|---|
 | 37 |               ,float binsg=0.5f,float frac=0.33f,int modu=1,int deb=0);
 | 
|---|
 | 38 | 
 | 
|---|
 | 39 | int RzFondSig2Ciel(RzImage * pim, int vitesse, float FracMax, int NbSigmas, int NBin, 
 | 
|---|
 | 40 |                        float *MinPix, float *MaxPix, float *Fond, float *SigFond,
 | 
|---|
 | 41 |                    float *MinAff, float *MaxAff, float *FracNul, float *FracSature);
 | 
|---|
 | 42 | 
 | 
|---|
 | 43 | template <class T>
 | 
|---|
 | 44 | float FondLocal(Image<T> const & image, float xcentre, float ycentre,
 | 
|---|
 | 45 |                 float rayon1, float rayon2, float fraclow, float frachigh, int lp=0);
 | 
|---|
 | 46 | 
 | 
|---|
 | 47 | // Filtrage / convolution d'images 
 | 
|---|
 | 48 | 
 | 
|---|
 | 49 | template <class T>
 | 
|---|
 | 50 | Image<T> * FilterImage(Image<T> const * pim, Image<T> * pom, ImageR4 *matx);
 | 
|---|
 | 51 | 
 | 
|---|
 | 52 | // Calcul une image de bruit prenant en compte le filtre de convolution
 | 
|---|
 | 53 | ImageR4* NoiseFiltImage(ImageR4& img, ImageR4& filtre, DynCCD& dynccd);
 | 
|---|
 | 54 | 
 | 
|---|
 | 55 | ///////////////////////////////////////////////////////////////////
 | 
|---|
 | 56 | //// Filtre statistique d'images
 | 
|---|
 | 57 | template <class T>
 | 
|---|
 | 58 | Image<T> * FilterStat(Image<T> const * pim, Image<T> * pom
 | 
|---|
 | 59 |                      ,int N,int M,float lowbad,float highbad);
 | 
|---|
 | 60 | ///////////////////////////////////////////////////////////////////
 | 
|---|
 | 61 | //// Spline d'images
 | 
|---|
 | 62 | template <class T>
 | 
|---|
 | 63 | Image<T> * CSplineImage(Image<T> const& f1,double pxsz=1.,double x0=0.,double y0=0.
 | 
|---|
 | 64 |                        ,int natural=(int)CSpline::NaturalAll);
 | 
|---|
 | 65 | ///////////////////////////////////////////////////////////////////
 | 
|---|
 | 66 | 
 | 
|---|
 | 67 | 
 | 
|---|
 | 68 | 
 | 
|---|
 | 69 | #endif
 | 
|---|