Horus Doc || C++ Reference || Class Overview   Pixels   Images   Detector   Geometry   Registry || Doxygen's quick Index  

HxNJet.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  *
00009  */
00010 
00011 
00012 #ifndef HxNJet_H
00013 #define HxNJet_H
00014 
00015 #include "HxImageRep.h"
00016 #include "HxImageList.h"
00017 #include <vector>
00018 
00019 
00020 class HxNJetData;
00021 
00022 
00060 class HxNJet {
00061 public:
00063                         HxNJet();
00064 
00068                         HxNJet(HxImageRep im, int N, double scale,
00069                                double precision = 3);
00070 
00073                         HxNJet(HxString fileName);
00074 
00076                         HxNJet(const HxNJet& rhs);
00077 
00079     virtual             ~HxNJet();
00080 
00081 
00084     bool                toFile(HxString fileName) const;
00085 
00087     HxNJet&             operator=(const HxNJet& rhs);
00088 
00090     int                 ident() const;
00091 
00093     int                 order() const;
00094 
00096     double              scale() const;
00097 
00099     int                 nrComponents() const;
00100 
00102     int                 isColor() const;
00103 
00104 
00106     HxImageRep          xy(int x, int y) const;
00107 
00109     HxImageRep          xyz(int x, int y, int z) const;
00110 
00112     HxImageRep          xyl(int x, int y, int l) const;
00113 
00115     HxImageRep          xyzl(int x, int y, int z, int l) const;
00116 
00118     HxImageRep          getLidx(int i) const;
00119 
00121     HxImageRep          getJidx(int i) const;
00122 
00124     HxImageRep          getMidx(int i) const;
00125 
00126 
00128     HxImageList         getLList() const;
00129 
00131     HxImageList         getJList() const;
00132 
00134     HxImageList         getMList() const;
00135 
00137     HxImageList         getList() const;
00138 
00140     HxImageRep          getLw() const;
00141 
00143     HxImageRep          getJw() const;
00144 
00146     HxImageRep          getMw() const;
00147 
00148     void                rotate(double phi);
00149     void                rotateDeg(double phi)
00150                             {rotate(phi*M_PI/180.);}
00151     void                rotate(HxImageRep phi);
00152     void                resample(double fac);
00153     void                truncate(int order);
00154     void                normalize();
00155 
00157     STD_OSTREAM&        put(STD_OSTREAM& os) const;
00158 
00160     int                 ord2idx(int i, int j) const
00161                             {   int n = i+j;
00162                                 return n*(n+1)/2+j;}
00163 
00165     int                 ord2idx(int i, int j, int k) const
00166                             {   int n = i+j;
00167                                 return n*(n+1)/2+j;}
00168 private:
00169     int                 _order;
00170     double              _scale;
00171     HxRcPtr<HxNJetData> _pointee;
00172     HxNJetData*         pointee() const;
00173 };
00174 
00175 
00176 inline STD_OSTREAM&
00177 operator<<(STD_OSTREAM& os, const HxNJet& jet)
00178 {
00179     return jet.put(os);
00180 }
00181 
00182 inline HxString
00183 makeString(const HxNJet& jet)
00184 {
00185     return HxString("HxNJet") + makeString(jet.ident());
00186 }
00187 
00188 #endif

Generated on Tue Feb 3 14:18:40 2004 for C++Reference by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001