Skip to content

Fix/slicing and remap - #139

Merged
berkgeveci merged 2 commits into
Kitware:masterfrom
berkgeveci:fix/slicing-and-remap
Sep 17, 2026
Merged

berkgeveci merged 2 commits into
Kitware:masterfrom
berkgeveci:fix/slicing-and-remap

Conversation

@berkgeveci

Copy link
Copy Markdown
Collaborator

No description provided.

SetSlicing stores each valid dimension's index and records it as changed,
then skipped Modified() entirely if any *other* dimension in the same
request was out of range. Since the caller resends the whole slicing dict
every time, one stale index suppressed every later change: the reader's
state moved but its output never did.

The app triggered exactly that by seeding any time slider to index 50,
which is past the end of most files (11 steps here, 12 for ne4pg2, 25 for
ne30pg2). With it stuck there, moving the level slider did nothing -- and
cropping appeared to "fix" it, because that forced a pipeline pass which
picked up the pending values.

Mark modified when a valid slice changed, and clamp the seeded slider index
to the dimension.
add_cell_arrays walked the pedigree permutation as a list of monotonic run
slices, on the assumption that the runs were thousands of entries long. The
permutations this pipeline actually produces average 55-110 entries per run,
and at that length the per-run Python overhead dominates: the loop measures
8-16x slower than a single fancy-index gather.

Replaces it with in_np[pid_np] and drops the plan cache. Roughly 10-15% off
each pipeline pass with a crop active.
@berkgeveci

Copy link
Copy Markdown
Collaborator Author

@jourdain can you review?

@berkgeveci
berkgeveci requested a review from jourdain September 17, 2026 17:19
@berkgeveci
berkgeveci merged commit 9a64118 into Kitware:master Sep 17, 2026
1 check passed
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.

2 participants