Changeset 1159 in Sophya for trunk/SophyaLib/NTools/cimage.h
- Timestamp:
- Aug 29, 2000, 6:13:31 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaLib/NTools/cimage.h
r1104 r1159 8 8 9 9 #include "tmatrix.h" 10 #include "fioarr.h" 10 11 11 12 … … 61 62 } 62 63 64 ///////////////////////////////////////////////////////////////////////// 65 //! Class for persistent management of Image 66 template <class T> 67 class FIO_Image : public FIO_TArray<T> { 68 public: 69 FIO_Image(); 70 FIO_Image(string const & filename); 71 FIO_Image(const Image<T> & obj); 72 FIO_Image(Image<T> * obj); 73 // virtual ~FIO_Image(); 74 virtual void SetDataObj(AnyDataObj & o); 75 inline operator Image<T>() { return(*(dynamic_cast<Image<T> * >dobj)); } 76 protected : 77 virtual void ReadSelf(PInPersist&); 78 virtual void WriteSelf(POutPersist&) const; 79 }; 80 81 /*! \ingroup Image \fn operator<<(POutPersist&,Image<T>&) 82 \brief Write Image \b obj into POutPersist stream \b os */ 83 template <class T> 84 inline POutPersist& operator << (POutPersist& os, Image<T> & obj) 85 { FIO_Image<T> fio(&obj); fio.Write(os); return(os); } 86 87 /*! \ingroup Image \fn operator>>(PInPersist&,Image<T>&) 88 \brief Read Image \b obj from PInPersist stream \b os */ 89 template <class T> 90 inline PInPersist& operator >> (PInPersist& is, Image<T> & obj) 91 { FIO_Image<T> fio(&obj); fio.Read(is); return(is); } 92 93 63 94 64 95 typedef Image<uint_2> ImageU2;
Note:
See TracChangeset
for help on using the changeset viewer.