metadata
tit.reporting.reportlets.metadata ¶
Metadata-focused reportlets for TI-Toolbox reports.
This module provides specialized reportlets for displaying conductivity tables, processing steps, and other structured metadata.
ConductivityTableReportlet ¶
ConductivityTableReportlet(conductivities: dict[str, dict[str, Any]] | None = None, title: str | None = None, show_sources: bool = True, conductivity_type: str = 'scalar')
Bases: BaseReportlet
Reportlet for displaying tissue conductivity values.
Shows conductivity values for different tissue types with their sources/references.
Initialize the conductivity table reportlet.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
conductivities
|
dict[str, dict[str, Any]] | None
|
Dict mapping tissue names to conductivity info |
None
|
title
|
str | None
|
Title for the table |
None
|
show_sources
|
bool
|
Whether to show source references |
True
|
conductivity_type
|
str
|
Type of conductivity (scalar, anisotropic, etc.) |
'scalar'
|
Source code in tit/reporting/reportlets/metadata.py
set_conductivity ¶
Set conductivity for a tissue type.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tissue
|
str
|
Tissue name |
required |
value
|
float
|
Conductivity value |
required |
unit
|
str
|
Unit of measurement |
'S/m'
|
source
|
str | None
|
Source reference |
None
|
Source code in tit/reporting/reportlets/metadata.py
render_html ¶
render_html() -> str
Render the conductivity table as HTML.
Source code in tit/reporting/reportlets/metadata.py
ProcessingStepReportlet ¶
Bases: BaseReportlet
Reportlet for displaying processing pipeline steps.
Shows collapsible processing steps with status, duration, and optional details.
Initialize the processing step reportlet.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
title
|
str | None
|
Title for the processing steps section |
None
|
steps
|
list[dict[str, Any]] | None
|
List of step dictionaries |
None
|
Source code in tit/reporting/reportlets/metadata.py
add_step ¶
add_step(name: str, description: str | None = None, status: StatusType | str = PENDING, duration: float | None = None, parameters: dict[str, Any] | None = None, output_files: list[str] | None = None, error_message: str | None = None) -> None
Add a processing step.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Step name |
required |
description
|
str | None
|
Step description |
None
|
status
|
StatusType | str
|
Step status (pending, running, completed, failed, skipped) |
PENDING
|
duration
|
float | None
|
Duration in seconds |
None
|
parameters
|
dict[str, Any] | None
|
Step parameters |
None
|
output_files
|
list[str] | None
|
List of output file paths |
None
|
error_message
|
str | None
|
Error message if failed |
None
|
Source code in tit/reporting/reportlets/metadata.py
render_html ¶
render_html() -> str
Render the processing steps as HTML.
Source code in tit/reporting/reportlets/metadata.py
266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 | |
SummaryCardsReportlet ¶
SummaryCardsReportlet(title: str | None = None, cards: list[dict[str, Any]] | None = None, columns: int = 4)
Bases: BaseReportlet
Reportlet for displaying key summary metrics as cards.
Shows important values in a prominent card grid layout.
Initialize the summary cards reportlet.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
title
|
str | None
|
Title for the summary section |
None
|
cards
|
list[dict[str, Any]] | None
|
List of card data dicts |
None
|
columns
|
int
|
Number of columns in grid |
4
|
Source code in tit/reporting/reportlets/metadata.py
add_card ¶
add_card(label: str, value: Any, icon: str | None = None, color: str | None = None, subtitle: str | None = None) -> None
Add a summary card.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
label
|
str
|
Card label |
required |
value
|
Any
|
Card value |
required |
icon
|
str | None
|
Optional icon character |
None
|
color
|
str | None
|
Optional accent color |
None
|
subtitle
|
str | None
|
Optional subtitle text |
None
|
Source code in tit/reporting/reportlets/metadata.py
render_html ¶
render_html() -> str
Render the summary cards as HTML.
Source code in tit/reporting/reportlets/metadata.py
ParameterListReportlet ¶
ParameterListReportlet(title: str | None = None, parameters: dict[str, dict[str, Any]] | None = None)
Bases: BaseReportlet
Reportlet for displaying a categorized list of parameters.
Organizes parameters into groups with clear visual hierarchy.
Initialize the parameter list reportlet.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
title
|
str | None
|
Title for the parameters section |
None
|
parameters
|
dict[str, dict[str, Any]] | None
|
Dict of category -> {param_name: param_value} |
None
|
Source code in tit/reporting/reportlets/metadata.py
add_category ¶
add_parameter ¶
render_html ¶
render_html() -> str
Render the parameter list as HTML.