|
VivoQuant 6.3.0
|
Central naming rules for brain atlas files. More...
#include <BrainAtlasNaming.h>
Classes | |
| struct | Parts |
| Components extracted from an atlas filename. More... | |
Static Public Member Functions | |
| static string | rmhaName (string stem) |
| Builds the canonical ROI atlas filename. | |
| static string | anatName (string stem, string modality) |
| Builds the canonical anatomical header filename. | |
| static string | rawName (string stem, string modality) |
| Builds the canonical anatomical raw image filename. | |
| static string | keyName (string stem, string keyType) |
| Builds the canonical atlas key filename. | |
| static string | stemOf (string prefix, string animal) |
| Constructs an atlas stem. | |
| static string | stripAtlasSuffix (string s) |
| Removes a trailing "Atlas" suffix. | |
| static bool | isEncryptedPrefix (string stemOrName) |
| Determines whether an atlas should be treated as encrypted. | |
| static string | prefixPattern () |
| Regular expression fragment matching a valid atlas prefix. | |
| static string | atlasSuffixPattern () |
| Regular expression fragment matching the mandatory "Atlas" suffix used by .rmha and key file names. | |
Central naming rules for brain atlas files.
This class encapsulates all filename generation and parsing rules used by both built-in and custom atlases.
Given a stem consisting of:
Example stems:
the following filenames are generated:
The active matching functions (used by SegmentationServiceNMCT to populate the atlas/animal combo boxes) only recognize names in the exact canonical form above – i.e. what CustomBrainAtlasWizard actually produces. Older files that omit the "Atlas" suffix or append a version tag after it (e.g. legacy invicroRatAtlas54.rmha) are not recognized; duplicate such files under a compliant name instead of relying on this class to parse them.
All filename creation functions produce the canonical naming format.
|
static |
Builds the canonical anatomical header filename.
| stem | Atlas stem. |
| modality | Imaging modality (CT, MR, PET, etc.). |
|
static |
Regular expression fragment matching the mandatory "Atlas" suffix used by .rmha and key file names.
This is required, not optional: CustomBrainAtlasWizard always appends "Atlas" (see createNewAtlasCompleteInputs()), so this class only recognizes names that include it. It intentionally does not match older names that omitted "Atlas" or appended a version tag after it (e.g. legacy invicroRatAtlas54.rmha) – such files should be duplicated under a compliant name rather than accepted here.
Only use this for .rmha/key filenames. Anatomical (.mhd) file names never contain "Atlas" at all (see anatName()) and must not use this pattern.
|
static |
Determines whether an atlas should be treated as encrypted.
Atlas names beginning with either "invicro" or "encrypted" are considered encrypted.
Comparison is case-insensitive.
| stemOrName | Atlas stem or filename. |
|
static |
Builds the canonical atlas key filename.
| stem | Atlas stem. |
| keyType | Key type such as AllRegions or AllRegionsLeft. |
|
static |
Regular expression fragment matching a valid atlas prefix.
The pattern accepts letters, digits, underscores, periods, and hyphens.
This pattern is shared by all atlas discovery and parsing logic.
|
static |
Builds the canonical anatomical raw image filename.
| stem | Atlas stem. |
| modality | Imaging modality. |
|
static |
Builds the canonical ROI atlas filename.
| stem | Atlas stem (<prefix><animal>). |
|
static |
Constructs an atlas stem.
The stem is simply the concatenation of the prefix and animal name and does not include the "Atlas" suffix or modality.
Example:
| prefix | Optional atlas prefix. |
| animal | Animal name. |
|
static |
Removes a trailing "Atlas" suffix.
If the supplied string ends with "Atlas", that suffix is removed. Otherwise the input is returned unchanged.
| s | Input string. |