isce3
0.1.0
Main Page
Related Pages
Namespaces
Classes
Files
Python classes
Issue Tracker
File List
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Pages
isce
cxx
isce3
unwrap
phass
ASSP.h
1
// Copyright (c) 2017-, California Institute of Technology ("Caltech"). U.S.
2
// Government sponsorship acknowledged.
3
// All rights reserved.
4
//
5
// Author(s):
6
//
7
// ----------------------------------------------------------------------------
8
// Author: Xiaoqing Wu
9
10
#pragma once
11
12
#include "Seed.h"
13
#include "Point.h"
14
#include "constants.h"
15
#include "DataPatch.h"
16
#include <complex>
17
#include <list>
18
#include <set>
19
#include <queue>
20
#include <vector>
21
22
using namespace
std;
23
24
typedef
unsigned
char
uchar;
25
typedef
unsigned
short
ushort;
26
typedef
unsigned
int
uint;
27
28
#define cost_scale 100
29
#define no_data_value -10000.0
30
31
#define noflow 0
32
#define flow_up 1
33
#define flow_down 2
34
#define flow_left 3
35
#define flow_right 4
36
37
#define edge_up 0x01
38
#define edge_down 0x02
39
#define edge_left 0x04
40
#define edge_right 0x08
41
#define edge_all 0x0F
42
43
44
#define flow_limit_per_arc 4
45
46
struct
Node
{
47
// uchar edge_flag; // First 4 bits for edge connections. The rest 4 bits reserved.
48
char
supply;
// 1: supply; -1: demand; 0: neutral.
49
// ushort rc; // right (pixel + 1) cost
50
// ushort dc; // down (line + 1) cost
51
uchar rc;
// right (pixel + 1) cost
52
uchar dc;
// down (line + 1) cost
53
};
54
55
56
57
struct
Flow
{
58
//ushort xstart;
59
//ushort ystart;
60
int
xstart;
61
int
ystart;
62
vector<uchar> flowdir;
// flow directions
63
};
64
65
struct
NodeFlow
{
66
char
toRight;
67
char
toDown;
68
};
69
70
71
// vector<Flow> solve_assp(DataPatch<Node> *node_patch);
72
73
DataPatch<NodeFlow>
*solve(
DataPatch<Node>
*node_patch);
74
75
DataPatch<Node>
*make_node_patch(
int
nr_lines,
int
nr_pixels,
float
**corr_data,
float
**phase_data,
double
qthresh = 0);
76
DataPatch<Node>
*make_node_patch(
DataPatch<fcomplex>
*int_patch,
double
qthresh = 0);
77
void
make_node_patch(
char
*int_file,
char
*corr_file,
char
*amp_file,
char
*layover_file,
78
int
start_line,
int
nr_lines,
int
nr_pixels,
double
corr_th,
double
phase_th,
double
amp_th,
79
DataPatch<Node>
**node_patch,
DataPatch<float>
**phase_patch,
double
minimum_corr = 0.0,
80
double
good_corr = 0.5,
double
const_phase_to_remove = 0.0,
int
sq = 1);
81
82
83
void
create_seeds(
DataPatch<NodeFlow>
*flows_patch,
int
minimum_nr_pixels,
int
& nr_seeds,
Seed
**seeds);
// seeds only
84
DataPatch<char>
* unwrap_adjust_seeds(
DataPatch<NodeFlow>
*flows_patch,
float
**phase_data,
int
nr_seeds,
Seed
*seeds);
85
DataPatch<char>
* unwrap_assp(
DataPatch<NodeFlow>
*flows_patch,
float
**phase_data,
int
nr_seeds,
Seed
*seeds);
86
87
88
//void flood_fill(int line, int pixel, vector<USPoint>& workv, queue<USPoint>& workq, int nr_lines, int nr_pixels, int **region_map, Node **nodes,
89
// char **visit, uchar curr_weight_th, uchar lower_cost_th);
90
//void flood_fill(int line, int pixel, queue<USPoint>& workq, int nr_lines, int nr_pixels, int **region_map, char **visit);
91
//void flood_fill_residues(int line, int pixel, queue<USPoint>& workq, int nr_lines, int nr_pixels, int **region_map, char **visit);
92
93
DataPatch<int>
* generate_regions(
DataPatch<NodeFlow>
*flows_patch,
int
nr_seeds,
Seed
*seeds);
94
void
generate_regions(
DataPatch<NodeFlow>
*flows_patch,
int
nr_seeds,
Seed
*seeds,
int
**region_map);
Flow
Definition:
ASSP.h:57
DataPatch
Definition:
DataPatch.h:28
Node
Definition:
ASSP.h:46
Seed
Definition:
Seed.h:12
NodeFlow
Definition:
ASSP.h:65
Generated for ISCE3.0 by
1.8.5.