Takes in a 2-D array, convolves with boxcar filter of size specified.
Uses a recursion technique (but the function does not actually call
itself recursively) to compute the result, so there may be roundoff
errors.
Traps common signals that by default cause the program to abort.
Sets (pointer to function) Handler as the signal handler for all.
Note that SIGKILL usually cannot be caught. No return value.
Computes the cycle array of a phase 2D phase array. Input arrays
should be type float ** and signed char ** with memory pre-allocated.
Numbers of rows and columns in phase array should be passed.
Residue array will then have size nrow-1 x ncol-1. Residues will
always be -1, 0, or 1 if wrapped phase is passed in.
Computes the total cost of the flow array and prints it out. Pass nrow
and ncol if in grid mode (primary network), or pass nrow=ntiles and
ncol=0 for nongrid mode (secondary network).
Given an unwrapped phase array, parse the data and find the flows.
Assumes only integer numbers of cycles have been added to get the
unwrapped phase from the wrapped pase. Gets memory and writes
wrapped phase to passed pointer. Assumes flows fit into short ints.
Given a wrapped phase array and an unwrapped phase array, subtracts
the unwrapped data elementwise from the wrapped data and stores
the result, rewrapped to [0,2pi), in the wrapped array.
This function frees the dynamically allocated memory for a 2D
array. Pass in a pointer to a pointer cast to a void **.
The function assumes the array is of the form arr[rows][cols]
so that nrow is the number of elements in the pointer array.
Allocates memory for 2D array. The array will have 2*nrow-1 rows.
The first nrow-1 rows will have ncol columns, and the rest will
have ncol-1 columns. Memory is initialized to zero.
Grows contiguous regions demarcated by arcs whose residual costs are
less than some threshold. Numbers the regions sequentially from 1.
Writes out byte file of connected component mask, with 0 for any pixels
not assigned to a component.
This function takes row and column flow information and integrates
wrapped phase to create an unwrapped phase field. The unwrapped
phase field will be the same size as the wrapped field. The array
rowflow should have size N-1xM and colflow size NxM-1 where the
phase fields are NxM. Output is saved to a file.
This function takes a double and returns a nonzero value if
the arguemnt is finite (not NaN and not infinite), and zero otherwise.
Different implementations are given here since not all machines have
these functions available.
Returns pointer to 2D array where passed array is in center and
edges are padded by mirror reflections. If the pad dimensions are
too large for the array size, a pointer to the original array is
returned.
Compute residue of node from wrapped phase. Assumes that memory
exists and that row and col are in bounds of the 2-D array of
wrapped phase values passed.
Given a filename, separates it into path and base filename. Output
buffers should be at least MAXSTRLEN characters, and filename buffer
should be no more than MAXSTRLEN characters. The output path
has a trailing “/” character.
Gets memory and reads single array from a file. Array should be in the
file line by line starting with the row array (size nrow-1 x ncol) and
followed by the column array (size nrow x ncol-1). Both arrays
are placed into the passed array as they were in the file.
Similar to Read2DRowColFile(), except reads only row (horizontal) data
at specified locations. tileparams->nrow is treated as the number of
rows of data to be read from the RowCol file, not the number of
equivalent rows in the orginal pixel file (whose arcs are represented
in the RowCol file).
Read in the data from a file containing magnitude and phase
data. File should have one line of magnitude data, one line
of phase data, another line of magnitude data, etc.
ncol refers to the number of complex elements in one line of
data.
Read only the phase data from a file containing magnitude and phase
data. File should have one line of magnitude data, one line
of phase data, another line of magnitude data, etc.
ncol refers to the number of complex elements in one line of
data.
Reads file of real alternating floats from separate images. Format is
real0A, real0B, real1A, real1B, real2A, real2B,…
ncol is the number of samples in each image (note the number of
floats per line in the specified file).
Read signed byte mask value; set magnitude to zero where byte mask
is zero or where pixel is close enough to edge as defined by
edgemask parameters; leave magnitude unchanged otherwise.
Reads file of complex floats of the form real,imag,real,imag…
ncol is the number of complex samples (half the number of real
floats per line). Ensures that phase values are in the range
[0,2pi).
Reads the interferogram magnitude in the specfied file if it exists.
Memory for the magnitude array should already have been allocated by
ReadInputFile().
Create a list of node pointers to be sources for each set of
connected pixels (not disconnected by masking). Return the number
of sources (ie, the number of connected sets of pixels).
Set the global variable dumpresults_global to TRUE if SIGINT or SIGHUP
signals recieved. Also sets requestedstop_global if SIGINT signal
received. This function should only be called via signal() when
a signal is caught.
Uses strtod to convert a string to a double, but also does error checking.
If any part of the string is not converted, the function does not make
the assignment and returns TRUE. Otherwise, returns FALSE.
Uses strtol to convert a string to a base-10 long, but also does error
checking. If any part of the string is not converted, the function does
not make the assignment and returns TRUE. Otherwise, returns FALSE.
Write data in a two dimensional array to a file. Data elements are
have the number of bytes specified by size (use sizeof() when
calling this function.
Write data in a 2-D row-and-column array to a file. Data elements
have the number of bytes specified by size (use sizeof() when
calling this function. The format of the array is nrow-1 rows
of ncol elements, followed by nrow rows of ncol-1 elements each.