Main Page   Class Overview   Pixels   Images   Geometry   Quick Index  

HxImageSeq.h

00001 /*
00002  *  Copyright (c) 2000, University of Amsterdam, The Netherlands.
00003  *  All rights reserved.
00004  *
00005  *  Author(s):
00006  *
00007  *  Dennis Koelma   (koelma@wins.uva.nl)
00008  *  TatHieu Nguyen  (tat@wins.uva.nl)
00009  *  Thang Pham      (vietp@wins.uva.nl)
00010  *
00011  */
00012 
00013 
00014 #ifndef HxImageSeq_h
00015 #define HxImageSeq_h
00016 
00017 #include "HxImageSeqIter.h"
00018 #include "HxString.h"
00019 #include "HxEnvironment.h"
00020 #include <vector>
00021 
00022 
00023 class HxImageSeqData;
00024 
00025 
00043 class HxImageSeq {
00044 public:
00046                         HxImageSeq();
00047 
00055                         HxImageSeq(HxString filename, int bufSize = 0);
00056 
00058                         HxImageSeq(const HxImageSeq& rhs);
00059 
00067     static HxImageSeq   constructMpegSoft(HxString fileName, int bufSize = 0,
00068                                           HxString indexFilename = "");
00069 
00071     virtual             ~HxImageSeq();
00072 
00074     HxImageSeq&         operator=(const HxImageSeq& rhs);
00075 
00077     int                 ident() const;
00078 
00080     int                 isNull() const;
00081 
00083     int                 frameWidth() const;
00084 
00086     int                 frameHeight() const;
00087 
00089     int                 frameDepth() const;
00090 
00092     int                 nrFrames() const;
00093 
00095     HxImageRep          getFrame(int nr) const;
00096 
00098     void                getRgb2d(int nr, int* pixels, 
00099                             HxString displayMode) const;
00100 
00101     void                getRgbPixels2d(int nr, int* pixels, 
00102                             HxString displayMode,
00103                             int resWidth = -1, int resHeight = -1,
00104                             HxGeoIntType gi = NEAREST) const;
00105 
00107     HxImageSeqIter      begin();
00108 
00110     HxImageSeqIter      end();
00111 
00112 
00114     static const int    MPEG_F;
00116     static const int    MIR_F;
00118     static const int    AVI_F;
00119 
00124     int                 writeFile(std::vector<int> frameList, HxString filename,
00125                                   int format);
00126 
00128     STD_OSTREAM&        put(STD_OSTREAM& os) const;
00129 
00130 private:
00131     HxRcPtr<HxImageSeqData> _pointee;
00132 
00133     HxImageSeqData*     pointee() const;
00134 
00135     friend class        HxImageSeqIter;
00136 };
00137 
00138 
00139 inline STD_OSTREAM&
00140 operator<<(STD_OSTREAM& os, const HxImageSeq& seq)
00141 {
00142     return seq.put(os);
00143 }
00144 
00145 inline HxString
00146 makeString(const HxImageSeq& seq)
00147 {
00148     return HxString("HxImageSeq") + makeString(seq.ident());
00149 }
00150 
00151 #endif

Generated on Tue Jan 8 13:59:13 2002 for C++Reference by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001