Skip to content

RFC-4: re-sync the axes schema description with the RFC text - #584

Open
vboussot wants to merge 1 commit into
ome:mainfrom
vboussot:rfc4-schema-orientation-resync
Open

RFC-4: re-sync the axes schema description with the RFC text#584
vboussot wants to merge 1 commit into
ome:mainfrom
vboussot:rfc4-schema-orientation-resync

Conversation

@vboussot

Copy link
Copy Markdown

The axes slot description in rfc/4/orientation.yml states two rules that the
RFC text does not:

Furthermore, if the attribute orientation is defined for one axis of type
space, it MUST be defined for all the axes of type space. In this case, the
type of each orientation MUST be the same and the value MUST be unique.

Against the current rfc/4/index.md:

  • orientation is OPTIONAL and no completeness requirement is stated, so an
    image may orient only some of its spatial axes. A limb scan, for example, can
    give a proximal/distal direction for one axis and leave the medio-lateral
    axis undefined.
  • A single type is defined, "anatomical". Requiring the declared types to
    agree with each other accepts metadata that uses a type the RFC does not
    define.
  • The constraint on values is the mutual exclusion rule: "A set of NGFF axes
    MUST only have one of the set { left-to-right, right-to-left } or
    { anterior-to-posterior, posterior-to-anterior } or the remaining values."

The model structure already matches the RFC, since orientation is optional and
nullable. Only the description was out of date, and it propagates into
orientation.schema.json, orientation.py, orientation.ts and markdown/,
where implementers read it as normative.

The orientation slot description now also carries the equivalence added in
254c1b2: an absent orientation and a null orientation mean the same thing, and
writers should omit the field rather than serialize null.

Generated with pixi run gen-all in rfc/4, then the orphan: true front
matter was restored on the markdown pages, which gen-markdown does not emit.
Running the generators on an unmodified tree produces no other diff. The JSON
Schema changes only in description strings, so no document changes validity.

Found while aligning RFC 4 validation in ngff-zarr
(fideus-labs/ngff-zarr#613), where the removed sentences had been implemented
as constraints.

The `axes` description in orientation.yml still stated that orientation
"MUST be defined for all the axes of type space" and that "the type of
each orientation MUST be the same and the value MUST be unique".

Neither sentence matches the RFC text. The proposal makes orientation
OPTIONAL per spatial axis with no completeness requirement, defines a
single valid type ("anatomical") rather than a self-consistent one, and
constrains the values through the mutual exclusion rule on anatomical
axis pairs. The model itself already treats orientation as optional and
nullable, so only the prose was out of date.

The description now states the rules the RFC states: orientation is
optional on spatial axes, forbidden elsewhere, its type comes from the
vocabulary defined here, and two axes must not describe the same
anatomical axis. The `orientation` slot description also records that an
absent orientation and a null orientation are equivalent, per the
"Default Value" section.

Generated artifacts regenerated with `pixi run gen-all`; the JSON Schema
changes only in description strings and remains structurally identical.
@github-actions

Copy link
Copy Markdown
Contributor

Automated Review URLs

@lubianat lubianat added documentation Improvements or additions to documentation rfc-4 and removed documentation Improvements or additions to documentation labels Aug 21, 2026

@lubianat lubianat left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if @thewtex is happy with it, I am happy with it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants