Templates API
The templates are YAML files of configurations in the package: standard_configs.yaml (the six standard configurations), lv_configs.yaml and coronary_configs.yaml (30 cardiac CT configurations each). RadiomicsPipeline.from_template(name) makes a pipeline from a template; these functions read the files themselves. See The Template Files.
pictologics.templates
Template Loading Module
Provides utilities for loading pipeline configuration templates from YAML files. Templates are bundled with the package and provide standardized, reproducible configurations for radiomics research.
list_template_files()
List all available template YAML files.
Returns:
| Type | Description |
|---|---|
list[str]
|
List of template file names (without path). |
Source code in pictologics/templates/__init__.py
load_template_file(filename)
Load a single template file and return its parsed contents.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filename
|
str
|
Name of the template file (e.g., "standard_configs.yaml"). |
required |
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
Parsed YAML contents as a dictionary. |
Raises:
| Type | Description |
|---|---|
FileNotFoundError
|
If the template file doesn't exist. |
YAMLError
|
If the YAML is malformed. |
Source code in pictologics/templates/__init__.py
get_all_templates()
Load all templates from all YAML files in the templates directory.
Returns:
| Type | Description |
|---|---|
dict[str, list[dict[str, Any]]]
|
Dictionary mapping config names to their step lists. |
Source code in pictologics/templates/__init__.py
get_standard_templates()
Load only the standard configuration templates.
Returns:
| Type | Description |
|---|---|
dict[str, list[dict[str, Any]]]
|
Dictionary mapping standard config names to their step lists. |
Source code in pictologics/templates/__init__.py
get_template_metadata(filename)
Get metadata from a template file (schema_version, description, etc.).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filename
|
str
|
Name of the template file. |
required |
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
Dictionary containing metadata fields. |