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
- 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.
- 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.
- 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.
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 readsVisuCoreSlicePacksSliceswhen present, honours the-1fg_indexsentinel,and otherwise groups contiguous frames that share an orientation, so
affine_of_package(i)works on a PV5.1 multi-package localizer. The splitterdoes not:
So
get_slice_packages()/Dataset.slice_packages— the documented way to getper-package data and geometry — is unavailable for exactly the datasets whose
geometry most needs splitting.
num_slice_packagesreports 1 for them, sonothing warns either.
Proposal
SlicePackageSplitterandnum_slice_packagesuseslice_packages_index()as their single source of package boundaries, sothe PV5.1 inference and the
-1sentinel apply everywhere.VisuCoreSlicePacksSlices/SliceDistrewriting fordatasets that have those parameters, and synthesise a one-package descriptor
for those that do not, so a written package is still a valid dataset.
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.