Changeset 682 in Sophya for trunk/SophyaLib/Samba/localmap.h
- Timestamp:
- Dec 10, 1999, 5:56:03 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaLib/Samba/localmap.h
r604 r682 65 65 66 66 LocalMap(); 67 LocalMap(int nx, intny);67 LocalMap(int_4 nx, int_4 ny); 68 68 LocalMap(const LocalMap<T>& lm, bool share=false); 69 69 virtual ~LocalMap(); … … 71 71 // ---------- Overloading of () to access pixel number k ---- 72 72 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, intiy) {return PixVal(iy*nSzX_+ix);};76 inline T const& operator()(int ix, intiy) const {return PixVal(iy*nSzX_+ix);};73 inline T& operator()(int_4 k) {return(PixVal(k));} 74 inline T const& operator()(int_4 k) const {return(PixVal(k));} 75 inline T& operator()(int_4 ix, int_4 iy) {return PixVal(iy*nSzX_+ix);}; 76 inline T const& operator()(int_4 ix, int_4 iy) const {return PixVal(iy*nSzX_+ix);}; 77 77 78 78 // ---------- Definition of PixelMap abstract methods ------- … … 80 80 /* return/set the number of pixels */ 81 81 /*! Return number of pixels */ 82 virtual int NbPixels() const;83 inline void setNbPixels(int n) {nPix_= n;}82 virtual int_4 NbPixels() const; 83 inline void setNbPixels(int_4 n) {nPix_= n;} 84 84 85 85 /* return the value of pixel number k */ 86 86 /*! Return value of pixel with index k */ 87 virtual T& PixVal(int k);87 virtual T& PixVal(int_4 k); 88 88 /*! const version of previous method */ 89 virtual T const& PixVal(int k) const;89 virtual T const& PixVal(int_4 k) const; 90 90 91 91 /* Return true if teta,phi in map */ … … 93 93 /* return the index of pixel at (theta,phi) */ 94 94 /*! Return index of the pixel with spherical coordinates (theta,phi) */ 95 virtual int PixIndexSph(double theta,double phi) const;95 virtual int_4 PixIndexSph(double theta,double phi) const; 96 96 97 97 /* return the spherical coordinates of center of pixel number k */ 98 98 /*! Return (theta, phi) coordinates of pixel with index k */ 99 virtual void PixThetaPhi(int k,double& theta,double& phi) const;99 virtual void PixThetaPhi(int_4 k,double& theta,double& phi) const; 100 100 101 101 /*! Set all pixels to value v */ … … 108 108 because of the projection scheme which is not yet fixed. 109 109 */ 110 virtual double PixSolAngle(int k) const;110 virtual double PixSolAngle(int_4 k) const; 111 111 112 112 // ---------- Specific methods ------------------------------ 113 113 114 114 /*! Resize storage area for pixels */ 115 void ReSize(int nx, intny);115 void ReSize(int_4 nx, int_4 ny); 116 116 117 117 inline virtual char* TypeOfMap() const {return "LOCAL";}; … … 124 124 virtual void SetOrigin(double theta=90.,double phi=0.,double angle=0.); 125 125 /*! set the referential of the map (angles in degrees) */ 126 virtual void SetOrigin(double theta,double phi,int x0,inty0,double angle=0.);126 virtual void SetOrigin(double theta,double phi,int_4 x0,int_4 y0,double angle=0.); 127 127 128 128 /* Pixel size (degres) */ … … 140 140 141 141 /* 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_;}142 inline virtual int_4 SizeIndex() const {return(nPix_);} 143 inline int_4 Size_x() const {return nSzX_;} 144 inline int_4 XSize() const {return nSzX_;} 145 inline void setSize_x(int_4 n) {nSzX_= n;} 146 inline int_4 Size_y() const {return nSzY_;} 147 inline int_4 YSize() const {return nSzY_;} 148 inline void setSize_y(int_4 n) {nSzY_= n;} 149 150 inline 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_;} 151 151 152 152 inline void Aperture(double& anglex,double& angley) const {anglex= angleX_; angley= angleY_;} … … 154 154 /* retourne le pointeur vers/remplit le vecteur des contenus des pixels */ 155 155 inline const NDataBlock<T>* getDataBlock() const {return (&pixels_);} 156 inline void setDataBlock(T* data, int n) {pixels_.FillFrom(n,data);}156 inline void setDataBlock(T* data, int_4 n) {pixels_.FillFrom(n,data);} 157 157 158 158 /* Acces to the DataBlock */ … … 169 169 void InitNul(); 170 170 /*! Return 2 indices corresponding to the pixel number k */ 171 void Getij(int k,int& i,int& j) const;171 void Getij(int_4 k,int_4& i,int_4& j) const; 172 172 /*! Transform a pair of coordinates (theta, phi) given in 173 173 reference coordinates into map coordinates … … 189 189 // ---------- Variables internes ---------------------------- 190 190 191 int nSzX_;192 int nSzY_;193 int nPix_;191 int_4 nSzX_; 192 int_4 nSzY_; 193 int_4 nPix_; 194 194 bool originFlag_; 195 195 bool extensFlag_; 196 int x0_;197 int y0_;196 int_4 x0_; 197 int_4 y0_; 198 198 double theta0_; 199 199 double phi0_;
Note:
See TracChangeset
for help on using the changeset viewer.