Skip to main content

Module entities

Module entities 

Source
Expand description

BIDS entity definitions, parsing, and canonical ordering.

Entities are the key-value pairs encoded in BIDS filenames (e.g., sub-01, task-rest, run-02). This module provides:

  • Entity — A named entity definition with a regex pattern for extraction
  • EntityValue — A typed value (string, padded int, float, bool, JSON)
  • parse_file_entities() — Extract all entities from a file path
  • ENTITY_ORDER — Canonical BIDS entity ordering

All other crates use these types to represent and match BIDS entities.

Structs§

Entity
Represents a single entity defined in configuration.

Enums§

EntityValue
A typed entity value, preserving the original representation where needed.

Constants§

ENTITY_ORDER
Standard BIDS entities in their canonical order.

Functions§

parse_file_entities
Parse entities from a filename using the provided entity definitions.
sort_entities
Sort entity keys according to the canonical BIDS ordering.

Type Aliases§

Entities
A map from entity names to their typed values for a single file.
StringEntities
A map from entity names to string values (used in variables/collections).