Changeset 2973 in Sophya for trunk/SophyaLib/SkyMap/pixelmap.h
- Timestamp:
- Jun 20, 2006, 6:01:49 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaLib/SkyMap/pixelmap.h
r2322 r2973 6 6 #include "dvlist.h" 7 7 #include "spherepos.h" 8 #include "datatype.h" 8 9 #include <iostream> 10 #include <typeinfo> 9 11 10 12 namespace SOPHYA { … … 100 102 inline PixelMap<T>& operator = (T v) { return(SetT(v)); } 101 103 104 //! Ascii print of synthetic information about the pixelmap on stream os 105 virtual void Show(ostream& os) const; 106 //! Show information on \b cout 107 inline void Show() const { Show(cout); } 102 108 103 109 104 // ++110 //! Return a reference to the associated DVList object 105 111 DVList& Info() 106 //107 // Renvoie une reference sur l''objet DVList Associe108 //--109 112 { 110 113 if (mInfo_ == NULL) mInfo_ = new DVList; … … 122 125 }; 123 126 127 template <class T> 128 inline ostream& operator << (ostream& s, const PixelMap<T> & a) 129 { a.Show(s); return(s); } 124 130 125 131 template <class T> … … 151 157 } 152 158 159 template <class T> 160 void PixelMap<T>::Show(ostream& os) const 161 { 162 os << "PixelMap<T>::Show() class: " << typeid(*this).name() 163 << " T= " << DataTypeInfo<T>::getTypeName() << endl; 164 double solang = 0.; 165 if (NbPixels() > 0) solang = PixSolAngle(NbPixels()/2); 166 double frac = NbPixels()*solang*100/(4.*M_PI); 167 if (frac > 100.) frac = 100.; 168 os << " NbPixels()= " << NbPixels() << " ResolArcMin ~=" 169 << Angle(sqrt(solang)).ToArcMin() << " SphereFrac ~= " 170 << frac << " % of 4Pi" << endl; 171 } 172 153 173 154 174 } // Fin du namespace
Note:
See TracChangeset
for help on using the changeset viewer.