File: productinfo.hh

package info (click to toggle)
doris 4.06~beta2%2Bdfsg-3
  • links: PTS, VCS
  • area: contrib
  • in suites: jessie, jessie-kfreebsd, stretch
  • size: 4,132 kB
  • ctags: 1,923
  • sloc: cpp: 42,573; csh: 3,636; sh: 2,869; python: 1,180; ansic: 650; makefile: 246
file content (123 lines) | stat: -rwxr-xr-x 4,358 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
/*
 * Copyright (c) 1999-2009 Delft University of Technology, The Netherlands
 *
 * This file is part of Doris, the Delft o-o radar interferometric software.
 *
 * Doris program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * Doris is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 *
 */
/****************************************************************
 * $Source: /users/kampes/DEVELOP/DORIS/doris/src/RCS/productinfo.hh,v $        *
 * $Revision: 3.10 $                                            *
 * $Date: 2005/08/24 10:03:18 $                                 *
 * $Author: kampes $                                            *
 *                                                              *
 * The productinfo class contains the definition of the data    *
 * and functions for 'products' (i.e. not slc images, but the   *
 * interferogram, coherence image, DEM etc.)                    *
 * Data mainly public because this used to be a struct and I    *
 * did not want to change the other code.                       *
 * It also consists of functions reading files etc.             *
 #%// BK 25-Aug-2000
 ****************************************************************/


#ifndef PRODUCTINFO_H
#define PRODUCTINFO_H

using namespace std;                    // BK 29-Mar-2003, new compiler?

// Jia defined this for compilation under windows
// Bert Kampes, 24-Aug-2005
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000


#include "constants.hh"                 // typedefs
#include <cstring>                      // strcpy, req. on some systems



// ====== Define template functions (no member no friend) ======
// ______ (matrix class is declared way below) ______
template <class Type> class matrix;




// ====== Struct slcimage: information on master/slave ======
class productinfo                               // info on 'products'
  {
  public:
    char          file[EIGHTY];                   // current filename
    // ______ window / multilook factors ______
    window        win;                            // current window, line(1:N) etc
    uint          multilookL;                     // multilookfactor in line (azi) dir.
    uint          multilookP;                     // multilookfactor in pixel (ra) dir.
    // ______ file format ______
    int16         formatflag;                     // current read formatflag


    // ______ Public function in struct ______
    // ______ constructor ______
    productinfo()               
      {
      formatflag = -1;// undefined
      multilookL =  1;
      multilookP =  1;
      } // rest ==0

    // ______ fill it from info in resultfiles ______
    void fillproductinfo(const char *file, const char *iden);

    // ______ assignment operator ______
    productinfo& operator = (productinfo X)
      {
      if (this != &X)
        {
        strcpy(file,X.file);
        win        = X.win;
        multilookL = X.multilookL;
        multilookP = X.multilookP;
        formatflag = X.formatflag;
        }
      return *this;
      };

    // ______ show content ______
    inline void showdata() const                  // show content
      {DEBUG << "\ncurrent file: \t" << file
             << "\nformatflag:   \t" << formatflag
             << "\nmultilook:    \t" << multilookL << " " << multilookP
             << "\nwindow:       \t" << win.linelo << " " << win.linehi
                              << " " << win.pixlo  << " " << win.pixhi;
       DEBUG.print();
      }

    // ______ read data from file ______
    matrix<real4> readphase(window win) const;

    // ______ read data from file ______
    matrix<complr4> readdata(window win) const;
    matrix<real4> readdatar4(window win) const; // [MA]

  }; // END class productinfo


#endif // PRODUCTINFO_H