Skip to content

Developer · Dentra Viewer

Write a plugin for Dentra Viewer

A plugin adds features to the Viewer. You write it, we test it, and if we like it everyone finds it in the «Plugins» panel.

Introduction

Plugins are written by the community: they are for anyone who wants to customise the Viewer or add features to it. We provide the environment and this documentation.

A plugin is a small web page (HTML, JavaScript and CSS) that the Viewer opens in its own frame. From the frame the plugin talks to the Viewer through the DentraViewer kit, which is already loaded.

The plugin runs in a closed frame: it does not see the page, the account or Dentra's data. It can only do what it asks for in its permissions, and the dentist reads them before turning it on.

What you can build

  • New ways to control the view: hand gestures in front of the webcam, game controllers, voice commands.
  • Measurements and annotations: clicks on the model, points, lines and labels in the scene.
  • Model analysis: mesh checks, calculations, results saved to a file.
  • Connections to other services: models brought in from outside, the phone as a remote.

Getting started

Restricted

Opens when you sign in with active Developer access.

dentra-plugin.json

Restricted

Opens when you sign in with active Developer access.

Permissions

Declared in the permissions field. Each permission is a single thing. Before turning the plugin on, the dentist reads what it asks for, with the reasons you wrote in reasons. The view permission shows in the list only when it is the only one.

view · pick · draw · edit · models · files · toolbar · camera · microphone · internet · clipboard · report

What each permission allows

Restricted

Opens when you sign in with active Developer access.

Web and desktop app

A plugin can work in the Viewer on the web (web), in the desktop app (desktop) or in both. You declare it in the platforms field, and we show it in the list and on the plugin page. The «Plugins» panel is in the Viewer on the web and in the desktop app; in the app you can also turn on desktop-only plugins.

Internet and models together mean the plugin can send patients' scans out. This is only possible in the desktop app, where the files belong to the dentist, and only by declaring in the send field where they go and why. The dentist reads it plainly before turning it on; on the web such a plugin cannot be turned on.

"platforms": ["web", "desktop"]

// internet + models: desktop only, and you must say where the scans go
"permissions": ["internet", "models"],
"send": { "to": "api.example.com", "why": "Analyses the scan and returns a report." }

Kit reference

Restricted

Opens when you sign in with active Developer access.

Review and publishing

  1. You submit the zip from your Developer area, or press «Submit for review» on a draft you have already tried. We check the files and dentra-plugin.json as soon as you upload the zip, drafts included, and tell you what is missing. When it enters review, you get a confirmation email.
  2. We test it in the Viewer before publishing it. If it reads the models and uses the internet, it also goes through a privacy check.
  3. If we approve it we publish it: it shows up in the public plugin list and in the Viewer panel. If not, we write to you about what to change, and in your Developer area that version is marked «Needs changes», with our note. Either way you get an email.
  4. For a new version, even after a rejection, raise the version number and submit it again: a number already submitted can't be reused. If you submit it while the previous one is still waiting for our test, the previous one closes on its own: your Developer area marks it «Replaced» and we only test the newest. A draft, instead, you upload again with the same number until you submit it. It goes through the same test, and until we approve it the previous one stays in the Viewer. Once we approve it, whoever has already turned the plugin on gets the new version automatically. If it asks for permissions the previous version did not, though, whoever had turned it on finds it paused: the Viewer shows them the new permissions with your reasons, and the plugin starts again only once they accept.

Rules

  • Plugins are free for the people who use them.
  • You need a Dentra account with Developer access, which we approve. Then we test every plugin, one by one.
  • The plugin runs in its own closed frame: it does not see the page, the accounts or Dentra's data.
  • Every permission needs a one-line reason.
  • Scans leave only in the desktop app, declaring in send where they go and why.
  • By submitting it you agree that we test it and, if we like it, publish it for free in the Viewer. The plugin stays yours.
  • We may withdraw a plugin from the catalogue: for a security problem we do it immediately, without waiting. We email you the reason and you find it in your Developer area; whoever had turned it on finds it off.

Become a developer

You need a Dentra account. From your account you request Developer access; once we approve it, you submit plugins from your area and see where they stand.

With the same access you also register the apps practices sign in to with «Sign in with Dentra».