Changeset 470 in Sophya for trunk/SophyaLib/Samba/pixelmap.h
- Timestamp:
- Oct 15, 1999, 5:43:30 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaLib/Samba/pixelmap.h
r228 r470 15 15 // LocalMap 16 16 17 template<class T> 18 class PixelMap 19 { 17 20 18 class PixelMap : public PPersist {19 21 public: 20 PixelMap():mInfo_(NULL) {} 21 virtual ~PixelMap() {} 22 23 PixelMap():mInfo_(NULL) {}; 24 virtual ~PixelMap() {}; 25 26 // Number of pixels 27 virtual int_4 NbPixels() const=0; 22 28 23 // Number of pixels 24 virtual int_4 NbPixels() const=0; 29 // Value of pixel number k 30 virtual T& PixVal(int_4 k)=0; 31 virtual T const& PixVal(int_4 k) const=0; 25 32 26 // Value of pixel number k 27 virtual r_8& PixVal(int_4 k)=0; 28 virtual r_8 const& PixVal(int_4 k) const=0; 29 30 // Index of pixel at (theta,phi) 31 virtual int_4 PixIndexSph(float theta, float phi) const=0; 33 // Index of pixel at (theta,phi) 34 virtual int_4 PixIndexSph(float theta, float phi) const=0; 32 35 33 34 virtual r_8&PixValSph(float theta, float phi)36 // Value of pixel number at (theta,phi) 37 virtual T& PixValSph(float theta, float phi) 35 38 {return PixVal(PixIndexSph(theta,phi));} 36 virtual r_8 const& PixValSph(float theta, float phi) const 37 {return PixVal(PixIndexSph(theta,phi));} 38 39 // Spherical coordinates of center of pixel number k 40 virtual void PixThetaPhi(int_4 k, float& theta, float& phi) const=0; 39 virtual T const& PixValSph(float theta, float phi) const 40 {return PixVal(PixIndexSph(theta,phi));} 41 41 42 // Pixel (steradians) 43 virtual r_8 PixSolAngle(int_4 k) const =0; 42 // Spherical coordinates of center of pixel number k 43 virtual void PixThetaPhi(int_4 k, float& theta, float& phi) const=0; 44 44 45 // Overloading of () to access pixel number k. 46 inline r_8& operator()(int_4 k) 47 {return(PixVal(k));} 48 inline r_8 const& operator()(int_4 k) const 49 {return(PixVal(k));} 45 // provides a integer characterizing the pixelization refinement 46 // (depending of the type of the map) 47 virtual int_4 SizeIndex() const=0; 48 virtual char* TypeOfMap() const =0; 50 49 51 // Note : no overloading of (float,float) to access pixel (theta,phi). 52 // overloading of (float,float) in SphericalMap 53 // overloading of (int,int) in CartesianMap 50 // Pixel (steradians) 51 virtual r_8 PixSolAngle(int_4 k) const =0; 52 53 // Overloading of () to access pixel number k. 54 inline T& operator()(int_4 k) {return(PixVal(k));} 55 inline T const& operator()(int_4 k) const {return(PixVal(k));} 56 57 // Note : no overloading of (float,float) to access pixel (theta,phi). 58 // overloading of (float,float) in SphericalMap 59 // overloading of (int,int) in CartesianMap 54 60 55 61 //++ 56 DVList& 62 DVList& Info() 57 63 // 58 // Renvoie une rM-ifM-irence sur l'objet DVList AssociM-i64 // Renvoie une reference sur l''objet DVList Associe 59 65 //-- 60 {61 if (mInfo_ == NULL) mInfo_ = new DVList;62 return(*mInfo_);63 }66 { 67 if (mInfo_ == NULL) mInfo_ = new DVList; 68 return(*mInfo_); 69 } 64 70 65 protected : 71 const DVList* ptrInfo() const 72 { 73 return mInfo_; 74 } 66 75 67 DVList* mInfo_; // Infos (variables) attachees 76 protected : 77 78 DVList* mInfo_; // Infos (variables) attachees 68 79 }; 69 70 80 #endif
Note:
See TracChangeset
for help on using the changeset viewer.