Learn R Programming

Funding Acknowledgements

The development of the initial version of Retistruct was supported by a Programme Grant from the UK Wellcome Trust (G083305) from 2008-2013.

Improvements to image handing and refactoring the code (released in v0.6.0) were supported by The Jackson Laboratory (Bar Harbor, ME, USA) Scientific Services Innovation Fund from 2016-2017 and an NIH R21 grant (EY027894) from 2018-2020 to Dr. Mark P. Krebs, The Jackson Laboratory.

The capabilities to reconstruct tissue comprised of separate fragments (released in v0.7.0) and to reconstruct 3D data comprising an overhead image and depth map (released in v0.7.2), and user interface improvements (released in v0.7.0) were supported by an NIH R21 grant (EY027894) from 2018-2020 to Dr. Mark P. Krebs, The Jackson Laboratory.

For full details go to the home page: http://davidcsterratt.github.io/retistruct/

Copy Link

Version

Install

install.packages('retistruct')

Monthly Downloads

285

Version

0.8.1

License

CC BY-NC-SA 4.0

Maintainer

David Sterratt

Last Published

June 8th, 2025

Functions in retistruct (0.8.1)

Ecart

The deformation energy function
FeatureSetCommon

Class containing functionality common to FeatureSets and ReconstructedFeatureSets
LandmarkSet

Subclass of FeatureSet to represent points
CountSet

Subclass of FeatureSet to represent counts centred on points
AnnotatedOutline

Class containing functions and data relating to annotating outlines
Fragment

Construct an outline object. This sanitises the input points P, as described below.
FeatureSet

Superclass containing functions and data relating to sets of features in flat Outlines
E

The deformation energy function
Fcart

The deformation energy gradient function
Outline

Class containing basic information about flat outlines
OutlineCommon

Class containing functionality common to flat and reconstructed outlines
ReconstructedOutline

Class containing functions to reconstruct StitchedOutlines and store the associated data
ReconstructedCountSet

Class containing functions and data to map CountSets to ReconstructedOutlines
R6_to_list

Convert an R6 object into a list, ignoring functions and environments
PointSet

Subclass of FeatureSet to represent points
ReconstructedLandmarkSet

Class containing functions and data to map LandmarkSets to ReconstructedOutlines
PathOutline

Add point fullcuts to the outline
ReconstructedPointSet

Class containing functions and data to map PointSets to ReconstructedOutlines
Rcart

Restore points to spherical manifold
ReconstructedFeatureSet

Class containing functions and data to map FeatureSets to ReconstructedOutlines
StitchedOutline

Class containing functions and data relating to Stitching outlines
RetinalOutline

Class containing functions and data relating to retinal outlines
azel.to.sphere.colatitude

Convert azimuth-elevation coordinates to spherical coordinates
TriangulatedOutline

Class containing functions and data relating to Triangulation
azimuthal.equidistant

Azimuthal equidistant projection
bary.to.sphere.cart

Convert barycentric coordinates of points in mesh on sphere to cartesian coordinates
azimuthal.conformal

Azimuthal conformal or stereographic or Wulff projection
azimuthal.equalarea

Lambert azimuthal equal area projection
TriangulatedFragment

Class to triangulate Fragments
RetinalReconstructedOutline

A version of ReconstructedOutline that is specific to retinal datasets
central.angle

Central angle between two points on a sphere
checkDatadir

Check the whether directory contains valid data
depthplot3D

Draw the "flat" outline in 3D with depth information
csv.read.dataset

Read a retinal dataset in CSV format
create.polar.cart.grid

Create grid on projection of hemisphere onto plane
circle

Return points on the unit circle
compute.kernel.estimate

Kernel estimate over grid
directories

File system directories used by shinyFiles
f

Piecewise smooth function used in area penalty
compute.intersections.sphere

Find the intersection of a plane with edges of triangles on a sphere
dE

The deformation energy gradient function
flatplot.StitchedOutline

Flat plot of AnnotatedOutline
flatplot.TriangulatedOutline

Plot flat TriangulatedOutline.
flipped.triangles

Determine indices of triangles that are flipped
kde.compute.concentration

Find the optimal concentration for a set of data
interpolate.image

Interpolate values in image
kde.fhat

Kernel density estimate on sphere using Fisherian density with polar coordinates
ijroimulti.read.dataset

Read a retinal dataset in IJROI format
list_to_R6

Convert an list created by R6_to_list() into an R6 object.
ijroi.read.dataset

Read a retinal dataset in IJROI format
fire

The FIRE algorithm
list.datasets

List datasets underneath a directory
idt.read.dataset

Read one of the Thompson lab's retinal datasets
kde.fhat.cart

Kernel density estimate on sphere using Fisherian density with Cartesian coordinates
fp

Piecewise smooth function used in area penalty
identity.transform

The identity transformation
kr.compute.concentration

Find the optimal concentration for a set of data
flatplot.ReconstructedOutline

Flat plot of reconstructed outline
invert.sphere

Invert sphere about its centre
parse.dependencies

Parse dependencies
flatplot

Plot "flat" (unreconstructed) representation of outline
flatplot.AnnotatedOutline

Flat plot of AnnotatedOutline
invert.sphere.to.hemisphere

Invert sphere to hemisphere
parabola.invarclength

Inverse arc length of a parabola y=x^2/4f
parabola.arclength

Arc length of a parabola y=x^2/4f
retistruct.check.markup

Retistruct check markup
retistruct.cli

Process a dataset with a time limit
name.list

Return a new version of the list in which any unnamed elements have been given standardised names
report

Reporting utility function
retistruct

Start the Retistruct GUI
normalise.angle

Bring angle into range
projection

Plot projection of a reconstructed outline
flipped.triangles.cart

Determine indices of triangles that are flipped
polartext

Put text on the polar plot
retistruct.cli.figure

Print a figure to file
read.datacounts

Read data counts in CSV format
retistruct.batch.get.titrations

Get titrations from a directory of reconstructions
polar.cart.to.sphere.spherical

Convert polar projection in Cartesian coordinates to spherical coordinates on sphere
retistruct.export.matlab

Save reconstruction data in MATLAB format
retistruct.cli.process

Process a dataset, saving results to disk
retistruct.read.recdata

Read the reconstruction data from file
retistruct.read.markup

Read the markup data
sphere.tri.area

Area of triangles on a sphere
sphere.spherical.to.sphere.cart

Convert from spherical to Cartesian coordinates
retistruct.batch.figures

Plot figures for a batch of reconstructions
flatplot.Outline

Flat plot of outline
kde.L

Estimate of the log likelihood of the points mu given a particular value of the concentration kappa
kr.yhat.cart

Kernel regression on sphere using Fisherian density with Cartesian coordinates
retistruct.read.dataset

Read a retinal dataset
read.datapoints

Read data points in CSV format
karcher.mean.sphere

Karcher mean on the sphere
line.line.intersection

Determine intersection between two lines
lvsLplot

Plot the fractional change in length of mesh edges
kr.sscv

Cross validation estimate of the least squares error of the points mu given a particular value of the concentration kappa
sphericalplot

Spherical plot of reconstructed outline
morph.dataset.to.parabola

Morph a flat dataset to a parabola for testing purposes
retistruct.batch

Batch operation using the parallel package
panlabel

Ancillary function to place labels
orthographic

Orthographic projection
kr.yhat

Kernel regression on sphere using Fisherian density with polar coordinates
remove.identical.consecutive.rows

Remove identical consecutive rows from a matrix
remove.intersections

Remove intersections between adjacent segments in a closed path
retistruct.reconstruct

Reconstruct a retina
projection.RetinalReconstructedOutline

Plot projection of reconstructed dataset
retistruct.save.recdata

Save reconstruction data
projection.ReconstructedOutline

Projection of a reconstructed outline
retistruct.batch.plot.titrations

Plot titrations
retistruct.batch.summary

Extract summary data for a batch of reconstructions
retistruct.batch.export.matlab

Export data from reconstruction data files to MATLAB
sphericalplot.ReconstructedOutline

Spherical plot of reconstructed outline
simplifyFragment

Simplify an outline object by removing short edges
rotate.axis

Rotate axis of sphere
sphere.cart.to.sphere.dualwedge

Convert from Cartesian to ‘dual-wedge’ coordinates
sphere.cart.to.sphere.spherical

Convert from Cartesian to spherical coordinates
server

Retistruct Shiny Server
spherical.to.polar.area

Convert latitude on sphere to radial variable in area-preserving projection
sphere.wedge.to.sphere.cart

Convert from 'wedge' to Cartesian coordinates
vecnorm

Vector norm
sphere.cart.to.sphere.wedge

Convert from Cartesian to 'wedge' coordinates
strain.colours

Generate colours for strain plots
sphere.spherical.to.polar.cart

Convert spherical coordinates on sphere to polar projection in Cartesian coordinates
stretchMesh

Stretch mesh
retistruct.save.markup

Save markup
ui

Retistruct UI
simplifyOutline

Simplify an outline object by removing short edges
sinusoidal

Sinusoidal projection
tri.area

Area of triangles on a plane
tri.area.signed

"Signed area" of triangles on a plane