FlexReg: build a registration patch on an intraoral arch and register on it - #23
Open
Jules-GP wants to merge 13 commits into
Open
FlexReg: build a registration patch on an intraoral arch and register on it#23Jules-GP wants to merge 13 commits into
Jules-GP wants to merge 13 commits into
Conversation
…registering on it
…the transform direction
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ports FlexReg from SlicerAutomatedDentalTools. Two arches are aligned on a
REGION the clinician chooses rather than on the whole mesh: teeth move between
timepoints and the palate does not, so registering on everything drags the
result toward whatever moved most.
One tool, not several
The dependency test says so. Every engine here imports the same set -
torch,vtk,numpy,SimpleITK- and none needs pytorch3d or monai, so nothingforces one pin onto another.
What moved, and what did not
typebutterflymode="Patch"icpmode="Register",patch="Palate (butterfly)"icp_mglmode="Register",patch="Mucogingival line"curvedeleteThe two left behind are deliberate.
curvetakes the stroke itself, so there isno form of it without a Slicer scene, and a mesh crossing the network per stroke
is slower than the local pass it replaces.
deleterenamesButterfly<n+1>down over
Butterfly<n>; a round trip costs more than doing it.The GPU is not optional for the patch: upstream's propagation calls
.cuda()with no availability test and no device argument, which is why the module ships
191 lines of
install_pytorch.pyto get torch into Slicer on a clinician'slaptop. Running it server-side is the point.
Defects fixed in the port
ApplyTransformdispatched on typeand called
TransformDictandTransformList, neither of which exists inthis module - the file was copied from AREG_IOS without them. Both branches
raised
NameError, and it never showed because the one caller passes asurface. Found by pyflakes, not by importing.
.stlwas silently empty. Upstream read everything throughvtkPolyDataReader, so a.stlcame back with no points and failed muchlater without naming the file. The reader is chosen by extension, and an empty
result is refused with the file's name.
.vtkon disk is LPS and Slicer worksin RAS; upstream flipped on read and never flipped back, so the file it wrote
was RAS. Invisible while both ends are Slicer, wrong the moment anything else
reads the result. The flip is applied both ways now.
ToothNoExistreached the CLI's toplevel; it names a tooth the caller chose, so it is refused by name.
and one unusable surface is reported per patient instead of losing the batch.
Verified
Real labelled arch, 294,260 points: patch built in 3.4s, 54,030 points in it.
Registering that surface onto itself returns the identity exactly - maximum
deviation 0.00e+00 on both rotation and translation.
Run directly in its venv and again through
POST /run/FlexReg, then diffed:coordinates and all three point arrays bit-identical, 0.000e+00 mm.
16 unit tests, no GPU, no network.