Skip to content

Add AutomatedDentalToolsRemote extension - #2411

Merged
pieper merged 1 commit into
Slicer:mainfrom
Raphael-Barret:add-automateddentaltoolsremote
Oct 21, 2026
Merged

pieper merged 1 commit into
Slicer:mainfrom
Raphael-Barret:add-automateddentaltoolsremote

Conversation

@Raphael-Barret

@Raphael-Barret Raphael-Barret commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

New extension

Tier 1

Any extension that is listed in the Extensions Catalog must fulfill these requirements.

  • Extension has a reasonable name (not too general, not too narrow, suggests what the extension is for). The extension name should not start with Slicer (unless it explicitly provides a bridge between Slicer and a tool or library), because it would make it more difficult to find extensions if the name of many started with the same word.
  • Repository name is Slicer+ExtensionName (except if the repository that hosts the extension can be also used without Slicer)
  • Repository is associated with 3d-slicer-extension GitHub topic so that it is listed here. To edit topics, click the settings icon in the right side of "About" section header and enter 3d-slicer-extension in "Topics" and click "Save changes". To learn more about topics, read https://help.github.com/en/articles/about-topics
  • Extension description summarizes in 1-2 sentences what the extension is usable (should be understandable for non-experts)
  • Any known related patents must be mentioned in the extension description.
  • LICENSE.txt is present in the repository root and the name of the license is mentioned in extension homepage. We suggest you use a permissive license that includes patent and contribution clauses. This will help protect developers and ensure the code remains freely available. MIT (https://choosealicense.com/licenses/mit/) or Apache (https://choosealicense.com/licenses/apache-2.0/) license is recommended. Read here to learn more about licenses. If source code license is more restrictive for users than MIT, BSD, Apache, or 3D Slicer license then describe the reason for the license choice and include the name of the used license in the extension description.
  • Extension URL and revision (scmurl, scmrevision) is correct, consider using a branch name (main, release, ...) instead of a specific git hash to avoid re-submitting pull request whenever the extension is updated
  • Extension icon URL is correct (do not use the icon's webpage but the raw data download URL that you get from the download button - it should look something like this: https://raw.githubusercontent.com/user/repo/main/SomeIcon.png)
  • Screenshot URLs (screenshoturls) are correct, contains at least one
  • Content of submitted json file is consistent with the top-level CMakeLists.txt file in the repository (dependencies, etc. are the same)
  • Homepage URL points to valid webpage containing the following:
    • Extension name
    • Short description: 1-2 sentences, which summarizes what the extension is usable for
    • At least one nice, informative image, that illustrates what the extension can do. It may be a screenshot.
    • Description of contained modules: at one sentence for each module
    • Publication: link to publication and/or to PubMed reference (if available)
  • Hide unused github features (such as Wiki, Projects, and Discussions, Releases, Packages) in the repository to reduce noise/irrelevant information:
    • Click Settings and in repository settings uncheck Wiki, Projects, and Discussions (if they are currently not used).
    • Click the settings icon next to About in the top-right corner of the repository main page and uncheck Releases and Packages (if they are currently not used)
  • The extension is safe:
    • Does not include or download binaries from unreliable sources
    • Does not send any information anywhere without user consent (explicit opt-in is required)

Tier 3

Community-supported extensions.

  • Documentation, tutorial, and test data are provided for most modules. A tutorial provides step-by-step description of at least the most typical use case, include a few screenshots. Any sample data sets that is used in tutorials must be registered with the Sample Data module to provide easy access to the user.
  • Follows programming and user interface conventions of 3D Slicer (e.g., GUI and logic are separated, usage of popups is minimized, no unnecessary custom GUI styling, etc.)
  • The extension can be successfully built and packaged on all supported platforms (Windows, macOS, Linux)
  • Maintainers respond to issues and pull request submitted to the extension's repository.
  • Maintainers respond to questions directly addressed to him/her via @mention on the Slicer Forum.
  • Permissive license is used for the main functions of the extension (recommended Apache or MIT). The extension can provide additional functionality in optional components that are distributed with non-permissive license, but the user has to explicitly approve those before using them (e.g., a pop-up can be displayed that explains the licensing terms and the user has to acknowledge them to proceed).
  • All requirements of tiers < 3.

Tier 5

Critically important extensions, supported by Slicer core developers. New Slicer Stable Release is released only if all Tier 5 extension packages are successfully created on all supported platforms.

  • Slicer core developers accept the responsibility of fixing any issues caused by Slicer core changes; at least one Slicer core developer (anyone who has commit right to Slicer core) must be granted commit right to the extension's repository.
  • Automated tests for all critical features.
  • Maintainers respond to questions related to the extension on the Slicer Forum.
  • All requirements of tiers < 5.

Two of the boxes above deserve a word rather than silence:

  • Patents. None are known. The algorithms are published work, cited by DOI on
    the homepage; the only occurrences of "patent" anywhere in the sources are the
    clauses of the 3D Slicer license itself.
  • Releases / Packages. Releases is in use -- a published v1.0.0 -- so it
    stays visible in the About section. No packages are published.

For context, since the module names will look familiar: this is the cloud client
of SlicerAutomatedDentalTools,
which stays in the catalog. Each module here is a panel generated from a remote
tool server's descriptor, so a workstation that cannot run a segmentation can
still ask for one; nothing is installed into Slicer and no model is downloaded.
The two extensions share module names and are not meant to be installed side by
side, which the homepage states. The client ships pointing at localhost:8000,
so no data leaves a workstation until its operator sets a server address.

@Raphael-Barret

Copy link
Copy Markdown
Contributor Author

The ai-analysis check on this PR did not fail on the submission, it hit the
job's 30 minute timeout: it ran 30m17s and was cancelled, and the log shows no
output from the analysis step because the workflow captures the script's stdout
in RESULT=$(...), which is discarded when the step is killed.

The cause is the size of the extension repository rather than anything in the
description file. analyze_extension re-sends each file category once per
question, which for this repository works out to about 61 inference requests,
40 of them carrying roughly 400,000 characters. I have written up the details
and some suggested fixes in #2418.

For this PR specifically, two things would help:

  • A re-run of ai-analysis once the script or the timeout is adjusted.
    clone_repository checks out scm_revision at run time, so a re-run picks up
    the current state of main with no change needed here.
  • Approval to run the remaining workflows. Extension Validation, Lint
    and Package Python Extension are all sitting at action_required and have
    never run, so there is no validation result to review yet. For what it is
    worth, AutomatedDentalToolsRemote.json validates against
    slicer-extension-catalog-entry-schema-v1.0.1 with no errors locally.

Glad to make any change on the submission itself if something needs it.

@Raphael-Barret

Copy link
Copy Markdown
Contributor Author

Correcting one sentence in the description above, before anyone has to ask about
it. "nothing is installed into Slicer and no model is downloaded" is not
accurate, and the AI analysis on this PR is right to point at the download URLs
it found.

Two modules download models, and both are user-initiated. CNE fetches a
quantized language model from Hugging Face, announced in its own dialog as
approximately 4.7 GB or 4.4 GB depending on which notes type is selected, and
written to the user's Documents folder (CNE/CNE.py:496 builds the URL,
CNE/CNE.py:538 performs the download behind a progress dialog). MRI2CBCT
installs nnU-Net into Slicer's interpreter and downloads its model on first use.

Both are modules that still carry their pre-remote implementation. That is
what this client is for, and the README's module table already says so of the
second one: "The one imaging module not yet ported to the server". As each is
ported the download goes away with it. I am not going to attach a date to that.

One module downloads by design and will keep doing so. Agent provisions a
model through ollama.pull and runs it on the workstation, which is the point of
the module rather than a gap in it. There is no remote endpoint, no base URL and
no API key anywhere in it, so nothing leaves the machine. It may later gain the
option of calling a hosted model instead, which would change what the extension
sends; that would ship behind an explicit opt-in, and is a change to review when
it lands rather than something this entry covers.

A correction to the analysis, for the record. It reports that Agent_CLI
"sends user prompts to a remote server for processing". It does not:
Agent_CLI/Agent_CLI_utils/utils.py:107 calls ollama.chat() against a local
Ollama, and line 113 pulls the model locally if it is absent. The prompts stay
on the machine.

Two other hits in the repository are not user-facing downloads, in case they come
up: VFACE fetches a Testing.zip of sample data inside its test class's
setUp(), and SlicerCloud calls urlopen(f"{url}/tools"), which lists the
configured server's tools rather than downloading anything.

For scale: the catalogued AutomatedDentalTools entry that this client is
derived from is tier 3 with SlicerConda and SlicerDentalModelSeg as build
dependencies, so it provisions conda environments. Nothing here is heavier than
what the index already carries. I would rather the description had said that
correctly than overclaimed, so I am fixing the README's opening paragraph, which
is where the sentence came from and which contradicts its own module table.


Separately, on the two red Package checks, in case it saves someone the dig.
Both platforms fail identically:

CMake Error at MRI2CBCT_CLI/MRI2CBCT_APPROX/CMakeLists.txt:5 (SlicerMacroBuildScriptedCLI):
  Unknown CMake command "SlicerMacroBuildScriptedCLI".

The dummy build generated by package_python_extension.py provides
SlicerMacroBuildScriptedModule, and the log shows eight scripted modules
configuring cleanly before it stops, but it does not provide
SlicerMacroBuildScriptedCLI. That macro ships in Slicer as
CMake/SlicerMacroBuildScriptedCLI.cmake, next to the one that works, and a
real Slicer build configures these seven scripted CLI modules without
complaint. So this looks like a gap in the packaging harness rather than
something to fix in the submission, but say the word if you would rather I
changed something here.

@pieper

pieper commented Oct 14, 2026

Copy link
Copy Markdown
Member

This review was done by Claude (Anthropic's AI assistant) under the direction of @pieper, in consultation with the Slicer developer team. The extension source was read, not executed.

Status: not merged yet. One blocker, plus a few small fixes.

Blocking: many module names are identical to those in the existing AutomatedDentalTools extension (AMASSS, ALI, ASO, AREG, AutoMatrix, AutoCrop3D, FlexReg, MRI2CBCT, BATCHDENTALSEG, CLIC, CNE, ...). A user who installs both gets duplicate module and Python names, and one of them will shadow or break the other. The README warning isn't enough, because the Extensions Manager doesn't enforce it. Please give the modules distinct names (e.g. a Remote suffix).

Please also:

  • No de-identification warning in the app. Uploads are not de-identified, and that is stated only in the README. Show a one-time notice when a non-localhost server URL is saved (e.g. "files are uploaded unmodified, including DICOM headers").
  • Plain-HTTP remote servers. Consider refusing plain http:// for non-loopback hosts (ServerToolsCoreLib/config.py).
  • CMake description is out of date. EXTENSION_DESCRIPTION in CMakeLists.txt still says no model is downloaded, but MRI2CBCT and CNE download models.

The packaging failure (Unknown CMake command "SlicerMacroBuildScriptedCLI") may be a CI harness gap; maintainers will check.

Non-blocking:

  • The MRI2CBCT and Agent installers pin numpy==1.26.4 / numpy<2 and torch==2.2.0. These would downgrade packages shared with other extensions; the code is inherited from AutomatedDentalTools.
  • SlicerCloud clones and runs an unpinned VISOR-serve@main. Pinning it to a tag would be safer.

@Raphael-Barret

Copy link
Copy Markdown
Contributor Author

Thank you for the review, it was precise enough to work from directly. The
blocking finding is resolved and the three smaller ones are done. Two of the
non-blocking ones are not, and I would rather say so than let them pass as
handled.

The blocker: duplicate names

20 of the 26 modules collided, and so did 5 Python packages, which matter
just as much since they reach sys.path and resolve before any module does.
You were right that the README warning could not carry this: the collision
raises nothing. The first entry on the path wins, the other is never loaded,
and which one wins depends on the order the two extensions were installed.

All of them now carry a Remote suffix, on the directory, the script, the icon,
the MODULE_NAME, the classes and the displayed title. The packages follow:
AREG_Method, VFACE_utils, MRI2CBCT_utils, MRI2CBCT_CLI_utils and
Agent_CLI_utils. Nothing in this repository shares a name with
AutomatedDentalTools any more.

TOOL_NAME is untouched, every one of them. It is the server's name for the
tool, declared explicitly per module and never derived from the class, so the
rename changed no byte of what goes over the wire. The two sets already differed
before this change, which is why the decoupling was there to rely on.

Every module also moved to its own Automated Dental Tools Remote category.
A category fixes no collision, but without it somebody holding both extensions
reads ALI and ALI Remote one under the other in the same folder.

The three smaller ones

  • De-identification notice. A dialog now fires when a server that is not
    this machine is saved, from both paths that set one: the settings panel and a
    Slicer Cloud deployment. It says files go up unmodified, with their names,
    their DICOM headers and whatever identifiers they carry. Once per host, never
    for loopback.
  • Plain HTTP. Taken further than suggested: the client is https only,
    everywhere, http://localhost included. Redirects are refused, the certifi
    bundle is named explicitly so no environment variable can change the trusted
    authorities, and config.SERVER_URL now ships as an invalid https placeholder
    rather than a loopback http one.
  • CMake description. Fixed. It had outlived two other corrections of the
    same sentence.

Not done, and deliberately

The numpy==1.26.4 / numpy<2 and torch==2.2.0 pins are still there, in
MRI2CBCTRemote and AgentRemote. Both are modules that still carry their
pre-remote implementation, and the pins came with it. Removing them is part of
porting those two to the server, not a change worth making blind while they
still install their own stack.

SlicerCloud still clones VISOR-serve at main. Pinning it to a tag needs a
tag release cadence on that repository that does not exist yet.

Checking

The client suites run outside Slicer. Against a baseline taken before the
rename: 1450 tests, with the only failures being the four that already failed,
at identical counts (test_flexreg_client 2, test_cohort_batches 5, and two
test_panel at 39 and 86, the last two needing Slicer itself). Nothing new
fails.

@pieper
pieper force-pushed the add-automateddentaltoolsremote branch from 8ebc29c to bf095ca Compare October 21, 2026 17:41
pieper added a commit to lassoan/Slicer that referenced this pull request Oct 21, 2026
The generated UseSlicer.cmake did not include SlicerMacroBuildScriptedCLI,
so Python-only extensions with scripted CLI modules failed to configure
with 'Unknown CMake command "SlicerMacroBuildScriptedCLI"' (seen in
Slicer/ExtensionsIndex#2411). The macro only copies the .py and .xml files
and adds install rules, using Slicer_CLIMODULES_BIN_DIR and
Slicer_INSTALL_CLIMODULES_BIN_DIR, which the dummy config already defines.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@pieper pieper closed this Oct 21, 2026
@pieper pieper reopened this Oct 21, 2026
@pieper

pieper commented Oct 21, 2026

Copy link
Copy Markdown
Member

(Toggled open state to re-run checks with updated checking code).

@pieper
pieper merged commit a1ecc25 into Slicer:main Oct 21, 2026
9 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants