Changeset 682 in Sophya for trunk/SophyaLib/Samba/localmap.h


Ignore:
Timestamp:
Dec 10, 1999, 5:56:03 PM (26 years ago)
Author:
ansari
Message:

Compilation Mac pour CodeWarrior PRO 5

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaLib/Samba/localmap.h

    r604 r682  
    6565
    6666LocalMap();
    67 LocalMap(int nx, int ny);
     67LocalMap(int_4 nx, int_4 ny);
    6868LocalMap(const LocalMap<T>& lm, bool share=false);
    6969virtual ~LocalMap();
     
    7171// ---------- Overloading of () to access pixel number k ----
    7272
    73 inline T& operator()(int k) {return(PixVal(k));}
    74 inline T const& operator()(int k) const {return(PixVal(k));}
    75 inline T& operator()(int ix, int iy) {return PixVal(iy*nSzX_+ix);};
    76 inline T const& operator()(int ix, int iy) const {return PixVal(iy*nSzX_+ix);};
     73inline T& operator()(int_4 k) {return(PixVal(k));}
     74inline T const& operator()(int_4 k) const {return(PixVal(k));}
     75inline T& operator()(int_4 ix, int_4 iy) {return PixVal(iy*nSzX_+ix);};
     76inline T const& operator()(int_4 ix, int_4 iy) const {return PixVal(iy*nSzX_+ix);};
    7777   
    7878// ---------- Definition of PixelMap abstract methods -------
     
    8080/* return/set the number of pixels */
    8181/*!    Return number of pixels */
    82 virtual int NbPixels() const;
    83 inline void setNbPixels(int n) {nPix_= n;}
     82virtual int_4 NbPixels() const;
     83inline void setNbPixels(int_4 n) {nPix_= n;}
    8484 
    8585/* return the value of pixel number k */
    8686/*!    Return value of pixel with index k */
    87 virtual T& PixVal(int k);
     87virtual T& PixVal(int_4 k);
    8888/*!   const version of previous method */
    89 virtual T const& PixVal(int k) const;
     89virtual T const& PixVal(int_4 k) const;
    9090
    9191/* Return true if teta,phi in map  */
     
    9393/* return the index of pixel at (theta,phi) */
    9494/*!    Return index of the pixel with spherical coordinates (theta,phi) */
    95 virtual int PixIndexSph(double theta,double phi) const;
     95virtual int_4 PixIndexSph(double theta,double phi) const;
    9696   
    9797/* return the spherical coordinates of center of pixel number k */
    9898/*!    Return (theta, phi) coordinates of pixel with index k */
    99 virtual void PixThetaPhi(int k,double& theta,double& phi) const;
     99virtual void PixThetaPhi(int_4 k,double& theta,double& phi) const;
    100100
    101101/*! Set all pixels to value v */
     
    108108    because of the projection scheme which is not yet fixed.
    109109*/ 
    110 virtual double PixSolAngle(int k) const;
     110virtual double PixSolAngle(int_4 k) const;
    111111
    112112// ---------- Specific methods ------------------------------
    113113
    114114/*!    Resize storage area for pixels */
    115 void ReSize(int nx, int ny);
     115void ReSize(int_4 nx, int_4 ny);
    116116
    117117inline virtual char* TypeOfMap() const {return "LOCAL";};
     
    124124virtual void SetOrigin(double theta=90.,double phi=0.,double angle=0.);
    125125/*!    set the referential of the map (angles in degrees) */
    126 virtual void SetOrigin(double theta,double phi,int x0,int y0,double angle=0.);
     126virtual void SetOrigin(double theta,double phi,int_4 x0,int_4 y0,double angle=0.);
    127127
    128128/* Pixel size (degres) */
     
    140140 
    141141/* provides a integer characterizing the pixelization refinement  (here : number of pixels) */
    142 inline virtual int SizeIndex() const {return(nPix_);}
    143 inline int Size_x() const {return nSzX_;}
    144 inline int XSize() const {return nSzX_;}
    145 inline void setSize_x(int n) {nSzX_= n;}
    146 inline int Size_y() const {return nSzY_;}
    147 inline int YSize() const {return nSzY_;}
    148 inline void setSize_y(int n) {nSzY_= n;}
    149 
    150 inline void Origin(double& theta,double& phi,int& x0,int& y0,double& angle) const {theta= theta0_; phi= phi0_; x0= x0_; y0= y0_;angle= angle_;}
     142inline virtual int_4 SizeIndex() const {return(nPix_);}
     143inline int_4 Size_x() const {return nSzX_;}
     144inline int_4 XSize() const {return nSzX_;}
     145inline void setSize_x(int_4 n) {nSzX_= n;}
     146inline int_4 Size_y() const {return nSzY_;}
     147inline int_4 YSize() const {return nSzY_;}
     148inline void setSize_y(int_4 n) {nSzY_= n;}
     149
     150inline void Origin(double& theta,double& phi,int_4& x0,int_4& y0,double& angle) const {theta= theta0_; phi= phi0_; x0= x0_; y0= y0_;angle= angle_;}
    151151
    152152inline void Aperture(double& anglex,double& angley) const {anglex= angleX_; angley= angleY_;}
     
    154154/* retourne le pointeur vers/remplit  le vecteur des contenus des pixels */
    155155inline const NDataBlock<T>* getDataBlock() const {return (&pixels_);}
    156 inline void setDataBlock(T* data, int n) {pixels_.FillFrom(n,data);}
     156inline void setDataBlock(T* data, int_4 n) {pixels_.FillFrom(n,data);}
    157157
    158158/*  Acces to the DataBlock  */
     
    169169void InitNul();
    170170/*!    Return 2 indices corresponding to the pixel number k */
    171 void Getij(int k,int& i,int& j) const;
     171void Getij(int_4 k,int_4& i,int_4& j) const;
    172172/*!    Transform a pair of coordinates (theta, phi) given in
    173173    reference coordinates into map coordinates
     
    189189// ---------- Variables internes ----------------------------
    190190
    191 int nSzX_;
    192 int nSzY_;
    193 int nPix_;
     191int_4 nSzX_;
     192int_4 nSzY_;
     193int_4 nPix_;
    194194bool originFlag_;
    195195bool extensFlag_;
    196 int x0_;
    197 int y0_;
     196int_4 x0_;
     197int_4 y0_;
    198198double theta0_;
    199199double phi0_;
Note: See TracChangeset for help on using the changeset viewer.