// This may look like C code, but it is really -*- C++ -*- // Classes image heritant de TMatrix // R.Ansari, C.Magneville 07/2000 // LAL (Orsay) / IN2P3-CNRS DAPNIA/SPP (Saclay) / CEA #ifndef CIMAGE_SEEN #define CIMAGE_SEEN #include "tmatrix.h" // ********************************************************** // Classe Image namespace SOPHYA { template class Image : public TMatrix { public: Image(); Image(uint_4 sizx, uint_4 sizy, r_8 szpx=1., r_8 szpy=1., r_8 orgx=0., r_8 orgy=0.); Image(const Image& a); Image(const Image& a, bool share); virtual ~Image(); // Inline element acces methods inline T const& operator()(uint_4 ix,uint_4 jy) const; inline T& operator()(uint_4 ix,uint_4 jy); inline uint_4 XSize() const {return NCols();} inline uint_4 YSize() const {return NRows();} inline r_8 XOrg() const {return org_x;} inline r_8 YOrg() const {return org_y;} inline r_8 XPixSize() const {return pxsz_x;} inline r_8 YPixSize() const {return pxsz_y;} inline void SetOrg(r_8 orgx=0., r_8 orgy=0.) { org_x = orgx; org_y = orgy; } inline void SetPixelSize(r_8 szx=1., r_8 szy=1.) { pxsz_x = szx; pxsz_y = szy; } protected: r_8 org_x,org_y; // Coordonnees pixel(0,0) r_8 pxsz_x, pxsz_y; // Taille des pixels }; template inline T const& Image::operator()(uint_4 ix, uint_4 jy) const { return (TMatrix::operator() (jy, ix)); } template inline T & Image::operator()(uint_4 ix, uint_4 jy) { return (TMatrix::operator() (jy, ix)); } typedef Image ImageU2; typedef Image ImageI4; typedef Image ImageR4; typedef Image ImageR8; class GeneralFit; class RzImage { public: RzImage() { } ~RzImage() { } inline uint_4 XSize() const {return 0;} inline uint_4 YSize() const {return 0;} inline r_8 XOrg() const {return 0;} inline r_8 YOrg() const {return 0;} inline r_8 XPixSize() const {return 1.;} inline r_8 YPixSize() const {return 1.;} inline r_8 DValue(int i, int j) const { return 0.; } // Resultats d'un GeneralFit inline RzImage* FitResidus(GeneralFit& gfit) { return NULL; } inline RzImage* FitFunction(GeneralFit& gfit) { return NULL; } }; } // End of namespace SOPHYA #endif