retistruct: Retinal Reconstruction Program

Reconstructs retinae by morphing a flat surface with cuts (a dissected flat-mount retina) onto a curvilinear surface (the a standard retinal shape). It can estimate the position of a point on the intact adult retina to within 8 degrees of arc (3.6% of nasotemporal axis). The coordinates in reconstructed retinae can be transformed to visuotopic coordinates.

Install the latest version of this package by entering the following in R:
AuthorDavid C. Sterratt [aut, cre, cph], Daniel Lyngholm [aut, cph]
Date of publication2015-02-16 13:49:18
MaintainerDavid C. Sterratt <>
LicenseCC BY-NC-SA 4.0

View on CRAN

Man pages

addClass: Add new class to class vector of object

addTear: Add tear to an AnnotatedOutline

AnnotatedOutline: Constructor for AnnotatedOutline object Convert azimuth-elevation coordinates to spherical...

azimuthal.conformal: Azimuthal conformal or stereographic or Wulff projection

azimuthal.equalarea: Lambert azimuthal equal area projection

azimuthal.equidistant: Azimuthal equidistant projection Convert barycentric coordinates of points in mesh on sphere...

central.angle: Central angle between two points on a sphere

checkDatadir: Check the whether directory contains valid data

checkTears: Check that tears are all in the correct direction

circle: Return points on the unit circle

compute.intersections.sphere: Find the intersection of a plane with edges of triangles on a...

compute.kernel.estimate: Kernel estimate over grid

computeTearRelationships: Compute the parent relationships for a set of tears

create.polar.cart.grid: Create grid on projection of hemisphere onto plane Read a retinal dataset in CSV format

Dataset: Constructor for a 'dataset' object.

dE: The deformation energy gradient function

E: The deformation energy function

Ecart: The deformation energy function

ensureFixedPointInRim: Ensure that the fixed point is in the rim, not a tear

f: Piecewise smooth function used in area penalty

Fcart: The deformation energy gradient function

fire: The FIRE algorithm

flatplot: Flat plot of object

flatplot.annotatedOutline: Flat plot of AnnotatedOutline

flatplot.dataset: Flat plot of Dataset

flatplot.outline: Flat plot of outline

flatplot.reconstructedOutline: Flat plot of reconstructed outline

flatplot.retinalDataset: Flat plot of retinal dataset

flatplot.stitchedOutline: Flat plot of AnnotatedOutline

flatplot.triangulatedOutline: Flat plot of TriangulatedOutline

flipped.triangles: Determine indicies of triangles that are flipped

flipped.triangles.cart: Determine indicies of triangles that are flipped

fp: Piecewise smooth function used in area penalty

getDss: Get transformed spherical coordinates of datapoints

getDssHullarea: Get area of convex hull around data points on sphere

getDssMean: Karcher mean of datapoints in spherical coordinates

getDssMean.reconstructedDataset: Karcher mean of datapoints in spherical coordinates

getDssMean.retinalReconstructedDataset: Get transformed spherical coordinates of Karcher mean of...

getDss.reconstructedDataset: Get transformed spherical coordinates of datapoints

getDss.retinalReconstructedDataset: Get transformed spherical coordinates of datapoints

getFlatRimLength: Get rim length of AnnotatedOutline

getGss: Get grouped variable with locations in spherical coordinates.

getGss.reconstructedDataset: Get grouped variable with locations in spherical coordinates.

getGss.retinalReconstructedDataset: Get grouped variable with locations in spherical coordinates.

getIDs: Get IDs of groups of data within a dataset

getIDs.dataset: Get IDs of groups of data within a dataset

getIDs.reconstructedDataset: Get IDs of groups of data within a ReconstructedDataset

getIms: Get coordinates of corners of pixels of image in spherical...

getIms.reconstructedOutline: Get coordinates of corners of pixels of image in spherical...

getKDE: Get kernel density estimate of data points

getKR: Get kernel regression estimate of grouped data points

getSss: Get transformed spherical coordinates of landmarks.

getSssMean: Karcher mean of landmarks in spherical coordinates

getSss.reconstructedDataset: Get transformed spherical coordinates of landmarks.

getSss.retinalReconstructedDataset: Get transformed spherical coordinates of datapoints

getStrains: Return strains edges are under in spherical retina

getTear: Return indicies of tear in AnnotatedOutline

getTss: Get spherical coordinates of tears.

identity.transform: The identity transformation Read one of the Thompson lab's retinal datasets Read a retinal dataset in IJROI format

invert.sphere: Invert sphere about its centre Invert sphere to hemisphere

karcher.mean.sphere: Karcher mean on the sphere

kde.compute.concentration: Find the optimal concentration for a set of data

kde.fhat: Kernel density estimate on sphere using Fisherian density...

kde.fhat.cart: Kernel density estimate on sphere using Fisherian density...

kde.L: Estimate of the log likelihood of the points mu given a...

kr.compute.concentration: Find the optimal concentration for a set of data

kr.sscv: Cross validation estimate of the least squares error of the...

kr.yhat: Kernel regression on sphere using Fisherian density with...

kr.yhat.cart: Kernel regression on sphere using Fisherian density with...

labelTearPoints: Label three outline point indicies as apicies and vertices of...

line.line.intersection: Determine intersection between two lines

list.datasets: List datasets underneath a directory

lvsLplot: Plot the fractional change in length of mesh edges

mergePointsEdges: Merge stitched points and edges

nameLandmark: Name a landmark in a Dataset

nameLandmark.retinalDataset: Name a landmark in a RetinalDataset

name.list: Return a new version of the list in which any un-named...

normalise.angle: Bring angle into range

optimiseMapping: Optimise mapping

orthographic: Orthographic projection

Outline: Outline constructor

panlabel: Ancillary function to place labels Convert polar projection in Cartesian coordinates to...

polartext: Put text on the polar plot

projection: Plot projection of an object

projection.reconstructedDataset: Plot projection of reconstructed dataset

projection.reconstructedOutline: Projection of a reconstructed outline

projectToSphere: Project mesh points in the flat outline onto a sphere

Rcart: Restore points to spherical manifold

read.datapoints: Read data points in CSV format

recfile.version: Version of reconstruction file data format

ReconstructedDataset: Constructor for RecontructedDataset object

ReconstructedOutline: Reconstruct outline into spherical surface

remove.identical.consecutive.rows: Remove identical consecutive rows from a matrix

remove.intersections: Remove intersections between adjacent segements in a closed...

removeTear: Remove tear from an AnnotatedOutline

RetinalDataset: RetinalDataset constructor

RetinalReconstructedDataset: RetinalReconstructedDataset constructor

RetinalReconstructedOutline: RetinalReconstructedOutline constructor

retistruct: Start the Retistruct GUI

retistruct.batch: Batch operation using the parallel package

retistruct.batch.analyse.summaries: Extract statistics from a directory containing reconstruction...

retistruct.batch.analyse.summary: Extract statistics from the retistruct-batch.csv summary file

retistruct.batch.export.matlab: Export data from reconstruction data files to matlab

retistruct.batch.figures: Plot figures for a batch of reconstructions

retistruct.batch.get.titrations: Get titrations from a directory of reconstructions

retistruct.batch.plot.ods: Superposed plot of ODs on polar axes

retistruct.batch.plot.titrations: Plot titrations

retistruct.batch.summary: Extract summary data for a batch of reconstructions

retistruct.check.markup: Retistruct check markup

retistruct.cli: Process a dataset with a time limit

retistruct.cli.figure: Print a figure to file

retistruct.cli.process: Process a dataset, saving results to disk

retistruct.export.matlab: Save reconstruction data in MATLAB format Git short commit hash of Retistruct package

retistruct.potential.od: Test for a potential optic disc Read a retinal dataset Read the markup data Read the reconstruction data from file

retistruct.reconstruct: Reconstruct a retina Save markup Save reconstruction data

rotate.axis: Rotate axis of sphere

setFixedPoint: Set fixed point

simplify.outline: Simplify an outline object by removing short edges

sinusoidal: Sinusoidal projection

solveMappingCart: Optimise mapping Convert from Cartesian to 'dualwedge' coordinates Convert from Cartesian to spherical coordinates Convert from Cartesian to 'wedge' coordinates Convert spherical coordinates on sphere to polar projection... Convert from spherical to Cartesian coordinates

sphere.tri.area: Area of triangles on a sphere Convert from 'wedge' to Cartesian coordinates

sphericalplot: Spherical plot of reconstructed outline

sphericalplot.reconstructedDataset: Spherical plot of reconstructed outline

sphericalplot.reconstructedOutline: Spherical plot of reconstructed outline Convert lattitude on sphere to radial variable in...

StitchedOutline: Stitch together incisions and tears in an AnnotatedOutline

strain.colours: Generate colours for strain plots

stretchMesh: Stretch mesh

titrate.reconstructedOutline: Titrate values of phi0

transform.image.reconstructedOutline: Transform an image into the reconstructed space

TriangulatedOutline: Triangulate outline

tri.area: Area of triangles on a plane

tri.area.signed: "Signed area" of triangles on a plane

vecnorm: Vector norm

whichTear: Return index of tear


addClass Man page
addTear Man page
AnnotatedOutline Man page Man page
azimuthal.conformal Man page
azimuthal.equalarea Man page
azimuthal.equidistant Man page Man page
central.angle Man page
checkDatadir Man page
checkTears Man page
circle Man page
compute.intersections.sphere Man page
compute.kernel.estimate Man page
computeTearRelationships Man page
create.polar.cart.grid Man page Man page
Dataset Man page
dE Man page
E Man page
Ecart Man page
ensureFixedPointInRim Man page
f Man page
Fcart Man page
fire Man page
flatplot Man page
flatplot.annotatedOutline Man page
flatplot.dataset Man page
flatplot.outline Man page
flatplot.reconstructedOutline Man page
flatplot.retinalDataset Man page
flatplot.stitchedOutline Man page
flatplot.triangulatedOutline Man page
flipped.triangles Man page
flipped.triangles.cart Man page
fp Man page
getDss Man page
getDssHullarea Man page
getDssMean Man page
getDssMean.reconstructedDataset Man page
getDssMean.retinalReconstructedDataset Man page
getDss.reconstructedDataset Man page
getDss.retinalReconstructedDataset Man page
getFlatRimLength Man page
getGss Man page
getGss.reconstructedDataset Man page
getGss.retinalReconstructedDataset Man page
getIDs Man page
getIDs.dataset Man page
getIDs.reconstructedDataset Man page
getIms Man page
getIms.reconstructedOutline Man page
getKDE Man page
getKR Man page
getSss Man page
getSssMean Man page
getSss.reconstructedDataset Man page
getSss.retinalReconstructedDataset Man page
getStrains Man page
getTear Man page
getTss Man page
identity.transform Man page Man page Man page
invert.sphere Man page Man page
karcher.mean.sphere Man page
kde.compute.concentration Man page
kde.fhat Man page
kde.fhat.cart Man page
kde.L Man page
kr.compute.concentration Man page
kr.sscv Man page
kr.yhat Man page
kr.yhat.cart Man page
labelTearPoints Man page
line.line.intersection Man page
list.datasets Man page
lvsLplot Man page
mergePointsEdges Man page
nameLandmark Man page
nameLandmark.retinalDataset Man page
name.list Man page
normalise.angle Man page
optimiseMapping Man page
orthographic Man page
Outline Man page
panlabel Man page Man page
polartext Man page
projection Man page
projection.reconstructedDataset Man page
projection.reconstructedOutline Man page
projectToSphere Man page
Rcart Man page
read.datapoints Man page
recfile.version Man page
ReconstructedDataset Man page
ReconstructedOutline Man page
remove.identical.consecutive.rows Man page
remove.intersections Man page
removeTear Man page
RetinalDataset Man page
RetinalReconstructedDataset Man page
RetinalReconstructedOutline Man page
retistruct Man page
retistruct.batch Man page
retistruct.batch.analyse.summaries Man page
retistruct.batch.analyse.summary Man page
retistruct.batch.export.matlab Man page
retistruct.batch.figures Man page
retistruct.batch.get.titrations Man page
retistruct.batch.plot.ods Man page
retistruct.batch.plot.titrations Man page
retistruct.batch.summary Man page
retistruct.check.markup Man page
retistruct.cli Man page
retistruct.cli.figure Man page
retistruct.cli.process Man page
retistruct.export.matlab Man page Man page
retistruct.potential.od Man page Man page Man page Man page
retistruct.reconstruct Man page Man page Man page
rotate.axis Man page
setFixedPoint Man page
simplify.outline Man page
sinusoidal Man page
solveMappingCart Man page Man page Man page Man page Man page Man page
sphere.tri.area Man page Man page
sphericalplot Man page
sphericalplot.reconstructedDataset Man page
sphericalplot.reconstructedOutline Man page Man page
StitchedOutline Man page
strain.colours Man page
stretchMesh Man page
titrate.reconstructedOutline Man page
transform.image.reconstructedOutline Man page
TriangulatedOutline Man page
tri.area Man page
tri.area.signed Man page
vecnorm Man page
whichTear Man page


tests/getFuns.R tests/reconstruct.R tests/testthat.R
tests/testthat/test-format-csv.R tests/testthat/test-karcher.R tests/testthat/test-wedge.R tests/testthat/test-format-ijroi.R
demo/smi32.R demo/orange.R demo/retistruct.method.R demo/low.high.R
demo/wedge.R demo/retistruct.titrate.R
R/RetinalReconstructedOutline.R R/AnnotatedOutline.R R/RetinalReconstructedDataset.R R/transformations.R R/RetinalDataset.R R/projections.R R/spheristruct.R R/revision.R R/StitchedOutline.R R/retistruct-gui.R R/TriangulatedOutline.R R/retistruct-cli.R R/Dataset.R R/kernel-density.R R/Outline.R R/generics.R R/retistruct.R R/retistruct-batch.R R/plots.R R/geometry.R R/ReconstructedOutline.R R/format-idt.R R/format-ijroi.R R/format-common.R R/misc.R R/format-csv.R R/ReconstructedDataset.R R/zzz.R R/fire.R
man/getDss.reconstructedDataset.Rd man/retistruct.batch.export.matlab.Rd man/retistruct.cli.process.Rd man/getKDE.Rd man/whichTear.Rd man/retistruct.potential.od.Rd man/ man/getDssMean.Rd man/retistruct.cli.Rd man/addTear.Rd man/kr.yhat.cart.Rd man/dE.Rd man/sinusoidal.Rd man/nameLandmark.retinalDataset.Rd man/flatplot.Rd man/ man/flatplot.stitchedOutline.Rd man/getIDs.Rd man/flipped.triangles.Rd man/ man/azimuthal.equalarea.Rd man/ man/flatplot.outline.Rd man/projection.reconstructedOutline.Rd man/name.list.Rd man/ensureFixedPointInRim.Rd man/kde.compute.concentration.Rd man/Outline.Rd man/sphericalplot.reconstructedDataset.Rd man/ man/retistruct.cli.figure.Rd man/strain.colours.Rd man/line.line.intersection.Rd man/panlabel.Rd man/getSssMean.Rd man/vecnorm.Rd man/E.Rd man/getGss.retinalReconstructedDataset.Rd man/kr.yhat.Rd man/kr.sscv.Rd man/RetinalReconstructedDataset.Rd man/retistruct.batch.get.titrations.Rd man/simplify.outline.Rd man/Dataset.Rd man/TriangulatedOutline.Rd man/lvsLplot.Rd man/retistruct.check.markup.Rd man/sphericalplot.Rd man/central.angle.Rd man/sphericalplot.reconstructedOutline.Rd man/getDssMean.retinalReconstructedDataset.Rd man/transform.image.reconstructedOutline.Rd man/ man/ man/kde.fhat.Rd man/projection.Rd man/create.polar.cart.grid.Rd man/AnnotatedOutline.Rd man/ man/projection.reconstructedDataset.Rd man/tri.area.Rd man/retistruct.batch.plot.ods.Rd man/invert.sphere.Rd man/getDssMean.reconstructedDataset.Rd man/getIms.Rd man/ man/getIDs.dataset.Rd man/ man/orthographic.Rd man/compute.intersections.sphere.Rd man/ man/labelTearPoints.Rd man/ man/retistruct.Rd man/getFlatRimLength.Rd man/ man/kde.fhat.cart.Rd man/retistruct.batch.Rd man/Ecart.Rd man/solveMappingCart.Rd man/normalise.angle.Rd man/Fcart.Rd man/kde.L.Rd man/flatplot.dataset.Rd man/retistruct.batch.analyse.summary.Rd man/checkTears.Rd man/list.datasets.Rd man/getGss.reconstructedDataset.Rd man/ man/flatplot.reconstructedOutline.Rd man/retistruct.export.matlab.Rd man/optimiseMapping.Rd man/retistruct.batch.figures.Rd man/remove.identical.consecutive.rows.Rd man/ReconstructedOutline.Rd man/sphere.tri.area.Rd man/read.datapoints.Rd man/azimuthal.equidistant.Rd man/ man/azimuthal.conformal.Rd man/retistruct.batch.plot.titrations.Rd man/Rcart.Rd man/setFixedPoint.Rd man/ man/tri.area.signed.Rd man/getStrains.Rd man/flatplot.retinalDataset.Rd man/getSss.Rd man/projectToSphere.Rd man/addClass.Rd man/remove.intersections.Rd man/compute.kernel.estimate.Rd man/StitchedOutline.Rd man/RetinalDataset.Rd man/ man/getSss.retinalReconstructedDataset.Rd man/flatplot.annotatedOutline.Rd man/flatplot.triangulatedOutline.Rd man/retistruct.reconstruct.Rd man/titrate.reconstructedOutline.Rd man/retistruct.batch.summary.Rd man/flipped.triangles.cart.Rd man/kr.compute.concentration.Rd man/ReconstructedDataset.Rd man/nameLandmark.Rd man/getIDs.reconstructedDataset.Rd man/fp.Rd man/checkDatadir.Rd man/removeTear.Rd man/getSss.reconstructedDataset.Rd man/getDss.retinalReconstructedDataset.Rd man/ man/getKR.Rd man/ man/f.Rd man/identity.transform.Rd man/retistruct.batch.analyse.summaries.Rd man/circle.Rd man/recfile.version.Rd man/getDss.Rd man/rotate.axis.Rd man/getTear.Rd man/polartext.Rd man/stretchMesh.Rd man/mergePointsEdges.Rd man/getGss.Rd man/computeTearRelationships.Rd man/ man/getIms.reconstructedOutline.Rd man/fire.Rd man/getDssHullarea.Rd man/RetinalReconstructedOutline.Rd man/getTss.Rd man/karcher.mean.sphere.Rd

Questions? Problems? Suggestions? or email at

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.