isce3  0.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
Looks.h
1 // -*- C++ -*-
2 // -*- coding: utf-8 -*-
3 //
4 // Author: Heresh Fattahi, Bryan Riel
5 // Copyright 2018-
6 //
7 
8 #pragma once
9 
10 #include "forward.h"
11 
12 // pyre
13 #include <pyre/journal.h>
14 
15 #include <isce3/core/Utilities.h>
16 #include <isce3/io/Raster.h>
17 
18 namespace isce3 {
19 namespace signal {
20 
21 bool verifyComplexToRealCasting(isce3::io::Raster& input_raster,
22  isce3::io::Raster& output_raster, int& exponent);
23 }
24 } // namespace isce3
25 
26 template<class T>
28  public:
29  Looks() {};
30 
37  inline Looks(size_t colsLooks, size_t rowsLooks);
38 
39  ~Looks() {};
40 
50  void multilook(isce3::io::Raster& input_raster,
51  isce3::io::Raster& output_raster, int exponent = 0);
52 
54  void multilook(std::valarray<T>& input, std::valarray<T>& output);
55 
57  void multilook(std::valarray<T>& input, std::valarray<T>& output,
58  T noDataValue);
59 
62  void multilook(std::valarray<T>& input, std::valarray<bool>& mask,
63  std::valarray<T>& output);
64 
66  void multilook(std::valarray<T>& input, std::valarray<T>& weights,
67  std::valarray<T>& output);
68 
70  void multilook(std::valarray<std::complex<T>>& input,
71  std::valarray<std::complex<T>>& output);
72 
74  void multilook(std::valarray<std::complex<T>>& input,
75  std::valarray<std::complex<T>>& output,
76  std::complex<T> noDataValue);
77 
80  void multilook(std::valarray<std::complex<T>>& input,
81  std::valarray<bool>& mask,
82  std::valarray<std::complex<T>>& output);
83 
86  void multilook(std::valarray<std::complex<T>>& input,
87  std::valarray<T>& weights,
88  std::valarray<std::complex<T>>& output);
89 
100  void multilook(std::valarray<std::complex<T>>& input,
101  std::valarray<T>& output, int exponent);
102 
104  inline void nrows(int);
105 
107  inline void ncols(int);
108 
110  inline void rowsLooks(int);
111 
113  inline void colsLooks(int);
114 
116  inline void nrowsLooked(int);
117 
119  inline void ncolsLooked(int);
120 
121  private:
122  // number of columns before multilooking
123  size_t _ncols;
124 
125  // number of rows before multilooking
126  size_t _nrows;
127 
128  // number of columns after multilooking
129  size_t _ncolsLooked;
130 
131  // number of rows after multilooking
132  size_t _nrowsLooked;
133 
134  // number of looks in range direction (columns)
135  size_t _colsLooks;
136 
137  // numbe of looks in azimuth direction (rows)
138  size_t _rowsLooks;
139 
140  // multilooking method
141  // size_t _method;
142 };
143 
144 template<class T>
145 isce3::signal::Looks<T>::Looks(size_t colsLooks, size_t rowsLooks)
146  : _colsLooks(colsLooks), _rowsLooks(rowsLooks) {}
147 
148 // Get inline implementations for Looks
149 #define ISCE_SIGNAL_LOOKS_ICC
150 #include "Looks.icc"
151 #undef ISCE_SIGNAL_LOOKS_ICC
void colsLooks(int)
Set number of looks to be taken on columns.
Definition: Looks.icc:43
void multilook(isce3::io::Raster &input_raster, isce3::io::Raster &output_raster, int exponent=0)
Multi-looking with rasters.
Definition: Looks.cpp:32
void ncolsLooked(int)
Set number of columns after multi-looking.
Definition: Looks.icc:61
Definition: forward.h:8
void ncols(int)
Set number of columns in the data before multi-looking.
Definition: Looks.icc:25
void nrows(int)
Set number of rows in the data before multi-looking.
Definition: Looks.icc:16
void rowsLooks(int)
Set number of looks to be taken on rows.
Definition: Looks.icc:34
void nrowsLooked(int)
Set number rows after mult-looking.
Definition: Looks.icc:52
Data structure meant to handle Raster I/O operations.
Definition: Raster.h:34

Generated for ISCE3.0 by doxygen 1.8.5.