Skip to content

Slice-package splitting requires VisuCoreSlicePacksSlices, which PV5.1 never writes (spec 7.10) #169

Description

@gdevenyi

From §6.2 of the format-conformance review against
FILE_FORMAT.md.

The gap

§7.10 says the slice-package parameters are optional and were introduced in
PV6.0.1 — PV5.1 defines none of them
— and may be absent even in PV6/PV360
datasets.

After #156 and #165, Dataset.slice_packages_index() copes with that: it reads
VisuCoreSlicePacksSlices when present, honours the -1 fg_index sentinel,
and otherwise groups contiguous frames that share an orientation, so
affine_of_package(i) works on a PV5.1 multi-package localizer. The splitter
does not:

>>> SlicePackageSplitter().split(pv51_localizer)
MissingProperty: Parameter VisuCoreSlicePacksSlices not found

So get_slice_packages() / Dataset.slice_packages — the documented way to get
per-package data and geometry — is unavailable for exactly the datasets whose
geometry most needs splitting. num_slice_packages reports 1 for them, so
nothing warns either.

Proposal

  1. Have SlicePackageSplitter and num_slice_packages use
    slice_packages_index() as their single source of package boundaries, so
    the PV5.1 inference and the -1 sentinel apply everywhere.
  2. Keep the per-package VisuCoreSlicePacksSlices/SliceDist rewriting for
    datasets that have those parameters, and synthesise a one-package descriptor
    for those that do not, so a written package is still a valid dataset.
  3. Test on the shape the review found: three corpus PV5.1 localizers with two
    orientations and no slice-package parameters.

Caveat worth recording: the inference groups contiguous frames sharing an
orientation
, so two adjacent packages with the same orientation would merge.
No corpus dataset has that shape, and PV6+ datasets never rely on the inference.

Activity

  1. added a commit that references this issue on Jul 26, 2026
    4797c39
  2. added a commit that references this issue on Aug 8, 2026
    8853598
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions