API

ReconTPCF.C2_initialiseMethod

Compute the C2 count in an image. Serves as a starting point for a reconstruction

ReconTPCF.C2_pdist4Function
C2_pdist4(im, maxrng::Int64, SN::Array{Float64,1}=Array{Float64}(undef, 0))

Fast total computation of the C2 count for a

ReconTPCF.blas_stat4Method
blas_stat4(indx, step::Float64, maxrng)::Array{Int64,1}

Computes a very fast multithreaded probabilistic S2 count. Employs kernel density estimation in place of a true histogram. Gives hilarious results when used for reconstruction.

ReconTPCF.blas_stat5Method

Compute the S2 count (multithreaded, O(N) memory)

For a list of N CartesianIndex tuples, compute and bin the L2 norm between all pixel pairs in the list.

ReconTPCF.blas_stat_st2Method
blas_stat_st2(indx, step, maxrng)

For a set of N points, compute the unique distance between all possible pairs of points. Bins distance measurements with a histogram of bin width step and length maxrng Single threaded implementation, greedy with memory. Good for smaller computations

ReconTPCF.check_edgeMethod

Prevent fetch_locale from colliding with image edges by providing a reduced window if an edge is collided with

ReconTPCF.cluster_statMethod
cluster_stat(clusters, step::Float64, maxrng)

Fast compution of S2 count for an array of arrays of cartesian indices. Multithreaded in the sense that

ReconTPCF.compute_change!Method

Sloppy computation to find the contribution to C2 count from the old state and the new, and hence the difference between them.

ReconTPCF.disk_strelMethod

Compute a binary disk-shaped structure element given radius r on the basis of (areal) interpolation

ReconTPCF.fetch_localeMethod

Fetch the region around a pixel selection; give a reduced window if near an edge

ReconTPCF.find_equivalentMethod

Computes equivalent position of unique entry in a shortlist to an entry in a master list. Uses a much more sensible tupled pick

ReconTPCF.find_unique_regionsMethod

Examine which clusters are present in multiple windows simultaneously to determine which clusters are due to change from a pixel swap

ReconTPCF.fragment!Method

Compute the L2 norm between points (xi, yi) and the arrays (arrx, arry) and write to preallocated array dist

ReconTPCF.get_rand_pixMethod
get_rand_pix((pix))::Tuple{Array{CartesianIndex{2},1},Array{CartesianIndex{2},1}}

Select a random white and black pixel from a tupled pair of lists of cartesian coordinates

ReconTPCF.get_region_namesMethod

Find all unique values present in a small window into the region adjacent to a pixel selection. Used to interrogate a cluster labelled image

ReconTPCF.inner_blas2Method
inner_blas2(x, y, dist, len)

compute the lower triangular self-interaction matrix of a list of N items. gives a flat vector of F32, of length (N(N-1)/2). Interaction here is computing the L2 norm, but could be otherwise.

ReconTPCF.make_rand_imMethod
make_rand_im(philen, dims)

create a random binary array of size dims with philen white pixels set within it. Also return a coordinate list for white and black pixels

ReconTPCF.monodisp_circMethod

Generate isotropically distributed circles that may overlap. Keep the implied phase fraction ϕ below 0.3 if possible

ReconTPCF.pre_procMethod
pre_proc(im)

convolve image with a disk-shaped structure element

ReconTPCF.surf_optMethod

Get list of all surface pixels from a 2d binary image using convolution to discriminate Sanitised version to prevent the function returning nothing

ReconTPCF.surf_opt2Method

Get list of all surface pixels from a 2d binary image using convolution to discriminate

ReconTPCF.surf_randMethod

Find the intersection between two tupled lists of cartesian indices We use this to create a segment of a list that maintains ordering

ReconTPCF.swap_pixMethod

Update tuple of 2 cartesian indices by swapping elements from each list at linear index wpick (for 1) and bpick (for 0)

ReconTPCF.update_C2_BNMethod

Computes the C2 count change between a pair of images with one pixel swapped between them

ReconTPCF.update_S2_BNMethod

Compute the update to S2 count. Find the contribution from all white pixel's distance from wpick and bpick, and the difference between them