Skip to content

CI TESTING - #24

Draft
psavery wants to merge 243 commits into
masterfrom
3.0
Draft

CI TESTING#24
psavery wants to merge 243 commits into
masterfrom
3.0

Conversation

@psavery

@psavery psavery commented Jun 1, 2026

Copy link
Copy Markdown
Owner

No description provided.

psavery and others added 10 commits July 11, 2026 08:21
We actually don't need the transpose because the output is already
how tomviz expects it.

Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
The modeless dialog held a raw Node pointer, so deleting the node
while the dialog was open left OK/Apply dereferencing freed memory
and crashing in markStale(). Close the dialog on nodeRemoved and
hold the node in a QPointer so the pointer can never dangle.

Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
RescaleTransferFunction operates on the proxy property, which still
contained the placeholder nodes spanning the full data range, making
Reset a no-op and Auto compress the window. Sync the stripped client
state first, and match ImageJ's auto-threshold progression.

Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
better link selection and other quality of life improvements
Target the scroll area and container by name so the strip's context
menus keep native rendering, and use stable_sort so keyboard
navigation order is deterministic on ties.

Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
This is important to fix an issue where a different version of h5py was
being imported from the user site-packages directory, which was causing
tomviz to crash.

Also delay trying to import ptycho and pyxrf until the user triggers the
action.

Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
This explains how to maintain pyxrf-utils

Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
Operators whose dependencies (e.g. PyTorch) can never be imported in
the application environment can declare "externalOnly": true in their
JSON description. Fresh nodes then default to the External executor,
the editor disables the Internal choice, and a missing environment is
reported with an actionable message instead of a console warning.

Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
Add a built-in, external-only operator that segments a 3D volume with
Meta's SAM 2 by propagating a seed-slice prompt along the Z axis. The
conda environment files it needs ship under share/tomviz/environments,
and a guarded import reports full setup instructions when sam2 is
missing. Model checkpoints are user-downloaded, not bundled.

Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
Add a built-in, external-only operator that segments a 3D volume with
Meta's SAM 3 from a text prompt: per-axis slice inference, majority
voting, and connected-component stitching into an instance label map.
Inference is CUDA-only; the gated ~3.5 GB checkpoint is user-downloaded
from HuggingFace, and the conda environment file ships with Tomviz.

Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
psavery added 17 commits July 27, 2026 11:22
Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
This allows help buttons to be displayed that explain the operator.

Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
Otherwise, it produces empty output with the example data

Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
On an IC ptychography tomogram, features are only recognized as
"bright lines" from side views, so a 2-of-3 vote discarded nearly half
of the real detections. Default to a vote threshold of 1 and offset
the looser voting with a larger minimum component size. The default
prompt is dataset-dependent either way and usually needs a quick
per-dataset experiment; the docs now say so.

Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
Both operators produce categorical label maps, so declare the output
port type accordingly: downstream nodes see a LabelMap port and the
volume sink applies its label-map rendering defaults.

Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
Typing voxel indices was a poor proxy for SAM's click-first prompting,
and the quality of the seed is the main determinant of the result.
SAM2SeedWidget shows a slice of the input volume in the operator
dialog: left-click sets Seed X/Y, a slider drives Seed Z, the Z Axis
choice controls the slicing direction, the wheel zooms about the
cursor, and a right-drag pans. The widget embeds the standard
JSON-driven form rather than duplicating it, and the seed round-trips
through the existing seed_x/y/z parameters, so serialization and
external execution are unchanged. Point mode becomes the default
prompt mode, matching the new interaction (and the Python default).

Offscreen gtests cover the form embedding, click-to-voxel mapping,
slider/seed sync, axis switching, value restore, and zoom anchoring.

Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
Applying an external executor now stores its environment path in
QSettings keyed by the operator's JSON name, and a node with no
configured executor starts with the remembered path prefilled. The
SAM 2 / SAM 3 conda environments (and any other external operator's)
only need to be picked once; a node's own configured path always wins
over the remembered one.

Also derive the env-path row's initial enabled state from the executor
combo rather than the node's executor type: a fresh externalOnly node
shows External selected but previously left the path row disabled.

Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
Avoid a shared QApplication helper /proc/self/exe, which only works
on Linux.

Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
After the seeded object ends, the video tracker can reattach to other
bright objects, leaving phantom regions. Trim the mask below an
intensity floor and keep only the seed-connected component, both on by
default.

Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
Render the seed slice through the volume's color transfer function and
observe its ModifiedEvent, so the dialog matches the main window's
colormap and follows edits live. Falls back to a grayscale stretch when
no ParaView session exists.

Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
Replace seed_x/y/z with a single vector seed parameter so the three
spinboxes share one row, like Shift3D. Values saved under the old
parameter names fall back to the default seed.

Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
vtkVolume::RenderVolumetricGeometry() updates the mapper before its own
no-input check, so a visible but empty volume logs a spurious pipeline
error on every render. State load restored visibility ahead of the
threaded pipeline execution, which is where it showed up.

Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
The buttons only refreshed on view changes, and port selection nulls
the active node, so they could latch disabled with no way back. Enable
them whenever a valid LUT is present, refresh on every setLUTProxy
call, and clear the proxy when the selection has no colormap.

Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
This allows components which have a very thin connection to be
labeled separately. It's an optional parameter.

Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
They were not being added or applied correctly, and label maps were
not resetting the range.

This should all work fine now.

Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
Matching the main window's colormap called colorMap(), which creates one
when absent, leaving the input volume with an unrescaled default it never
had. Use it only if it already exists; otherwise fall back to grayscale.

Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
Setting port data drives the sinks, so an externally-executed label map
was rendered through the upstream volume's colormap before its own
segmentation colormap existed: miscolored, with a GPU lookup table VTK
had to clamp. TransformNode::execute already does this for internal nodes.

Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants