main module

Module to handle communication between client (static/main.js) and sksurgeryfred server

main.addhighscore()[source]

add your score to the high scores

main.calculatescore()[source]

Delegates to sksurgery.alogorithms.score to calculate an ablation score.

main.correlation()[source]

Takes in 2d array, and does linear fit and correlation for each column against the first returns slope, intercept and correlation coefficient if there are less than 4 data points it returns false.

main.defaultcontour()[source]

Returns a pre-calculated contour image to represent the intraoperative image.

main.favicon()[source]

returns the icon

main.getfle()[source]

Returns values for fiducial localisation errors Values are randomly selected from a uniform distribution from 0.5 to 5.0 pixels

main.gethighscores()[source]

return the sorted high scores, the ranking and the ref to the lowest score

main.gettarget()[source]

Returns a target point for the simulated intervention

main.index()[source]

returns the main page, template/index.html

main.initdatabase()[source]

here we will create a new document in collection results and return the name of the document. Write some stuff about the date and the versions of fred, core, and fredweb. Create a sub collection of results within the document

main.placefiducial()[source]

Returns the location of a fiducial marker on the pre- and intra-operative images. FLE is added to each marker location.

main.register()[source]

Performs point based registration and returns registration data as json.

main.startfred()[source]

returns the fred page

main.writegameresults()[source]

write the game results to a firestore database

main.writeresults()[source]

write the results to a firestore database