Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion asltk/registration/asl_normalization.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,6 @@ def norm_function(vol, ref_volume):
return new_asl_data, trans_mtx


# TODO Provavel que tenha que separar esse metodo para o asl_template_registration... revisar depois
def __apply_array_normalization(
total_vols, ref_vol, normalization_function, trans_proportions
):
Expand Down
Empty file.
12 changes: 12 additions & 0 deletions docs/api/asldata.md
Original file line number Diff line number Diff line change
@@ -1 +1,13 @@
# ASLtk base classes and functions

## ASLData class API

::: asldata

## Auxiliary Methods API

## Logging Configuration

## MRI Parameters Class API

::: mri_parameters
19 changes: 14 additions & 5 deletions docs/api/data.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
# Brain Atlas
# Data Module

The Brain Atlas module provides tools and data structures for representing, manipulating, and analyzing brain region information. It serves as a foundational component for working with anatomical brain atlases, enabling users to access region metadata, and collect atlas data into neuroimaging workflows.
## Brain Atlas

Use this module to facilitate research and development tasks that require standardized brain region definitions and mappings.
The `Brain Atlas` module provides tools and data structures for representing, manipulating, and analyzing brain region information. It serves as a foundational component for working with anatomical brain atlases, enabling users to access region metadata, and collect atlas data into neuroimaging workflows.

## Note
Use this module to facilitate research and development tasks that require standardized brain region definitions and mappings.

This module is intended for use with standardized brain atlases and may require adaptation for custom or non-standard datasets. Refer to the official documentation for integration guidelines and best practices.
!!! tip
The full list of availble brain atlases and templates in the `alstk` can be fetch using the `list_all()` method, as seen in the API description below

!!! note
This module is intended for use with standardized brain atlases and may require adaptation for custom or non-standard datasets. Refer to the official documentation for integration guidelines and best practices.

## Data Module API

### Brain Atlas Module API

#### Brain Atlas Class API

::: data.brain_atlas
5 changes: 5 additions & 0 deletions docs/api/models.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Models Module

## Signal Dynamic API

::: models.signal_dynamic
26 changes: 26 additions & 0 deletions docs/api/reconstruction.md
Original file line number Diff line number Diff line change
@@ -1 +1,27 @@
# Reconstruction Module

## ASL Mapping Reconstruction

This is the main module in `asltk` which aims to offer quantitative reconstruction algorithms for the `ASLData`.

In general, the ASL processing requires data fitting and manipulation to result in quantitative mappings. A classical example are the CBF and ATT mapping.

One of the major objective in `asltk` is to provide the state-of-the-art reconstruction methods available in the ASL research community, allowing an easy to use application to many studies.

!!! note
It is intended to the `reconstruction` module to be evolve by the contribution of scientific community. If you want to apply a new reconstruction method in the `asltk` project, please see more details at the `How to Contribute` section and into the reconstruction classes standards

### Reconstruction class standard

In order to comply a standarized way to build the reconstruction classes, we assumed the following structure:

1. All reconstruction classes must hierent from `MRIParameters` data class, which informs the base MRI parameters values for a generic data analysis and fitting
2. The base reconstruction class must have a constructor (`__init__` method) with an input data as the `ASLData` or other types (if needed).
3. Even though there is not obligation (regulated by abstract methods) for determined class methods, it is expected that the reconstruction class can implement a `create_map` method, which is the actual reconstruction calculation that exposes (as an method output) the reconstructed data from `ASLData`.

!!! info
Depending on the specifity of the reconstruction method, it can vary the way that the inner reconstruction methods can be implemented. However, we try to maintain a basic API usage to get a more uniform implementation thoughout the community contribution.

## Reconstruction Module API

::: reconstruction
9 changes: 9 additions & 0 deletions docs/api/registration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Registration Module

## Base Image Normalization API

::: registration

## ASL Normalization API

::: registration.asl_normalization
10 changes: 6 additions & 4 deletions docs/api/reports.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
# Brain Parcellation Reports
# Reports Module

## Brain Parcellation

The Parcellation Report module provides utilities for generating detailed reports on brain parcellation results. These reports help users summarize, visualize, and interpret the outcomes of brain region segmentation and labeling processes. The module supports integration with the Brain Atlas workflow, enabling streamlined analysis and documentation of parcellation data.

Use this module to create standardized, reproducible reports that facilitate communication and comparison of parcellation results across studies.

## Note

The `reports` module provides quantitative pipelines designed to deliver clear and concise views of scientific data. Refer to the documentation for each available report to determine which method best suits your application.
!!! note
The `reports` module provides quantitative pipelines designed to deliver clear and concise views of scientific data. Refer to the documentation for each available report to determine which method best suits your application.

## Reconstruction Module API

::: data.reports
43 changes: 42 additions & 1 deletion docs/api/utils.md
Original file line number Diff line number Diff line change
@@ -1 +1,42 @@
::: utils
# Utils Module

## Image Manipulation API


The `utils.image_manipulation` module focuses on the preprocessing, orientation handling, and quality assessment of medical imaging data, particularly for Arterial Spin Labeling (ASL) MRI and similar volumetric neuroimaging datasets. It provides a set of utility functions designed to ensure that image volumes are properly aligned, normalized, and suitable for subsequent analysis or registration.

The code integrates well-established Python libraries for medical imaging, such as `SimpleITK`, `ANTsPy`, and `NumPy`, alongside project-specific utilities from asltk. Its main objectives are:

- Volume Management – Extracting and organizing 3D volumes from multi-dimensional ASL datasets.
- Orientation Analysis and Correction – Checking whether two images are properly aligned in orientation, automatically detecting mismatches, and applying corrective transformations (flips, transpositions, resampling).
- Image Quality Assessment – Computing key statistical measures such as mean intensity and signal-to-noise ratio (SNR) to assist in selecting representative or reference volumes for analysis.
- Reporting and Logging – Generating structured orientation analysis reports, with detailed information on image properties and recommended corrections.

In practice, these tools are expected to be used as an early step in the ASL processing pipeline. By ensuring that image volumes are consistent in orientation and quality, the subsequent stages of image registration, quantification, and biomarker extraction can be performed more reliably.

::: utils.image_manipulation

## Image Statistics API

The `utils.image_statistics` module provides core utility functions for the quantitative analysis of medical images, focusing on extracting essential statistical and structural properties from volumetric data. The implemented functions are designed to support preprocessing, quality assessment, and orientation verification of medical imaging.

The main goals of this code is to provide quantitative analysis such as SNR, mean image intensity, correlations, and many others image properties.

By combining these functions, the module supports early steps in medical image analysis pipelines, where image quality and structural consistency must be verified before applying more advanced techniques like registration, segmentation, or quantitative biomarker extraction.

::: utils.image_statistics

## IO

The `utils.io` module provides utility functions for loading, saving, and managing medical imaging data, with a focus on Arterial Spin Labeling (ASL) MRI and BIDS-compliant datasets. It builds on libraries such as SimpleITK, NumPy, and dill, allowing users to handle both raw image files and serialized data objects in a reproducible way.

The main features include:

- Loading Images: Supports a wide range of formats (e.g., .nii, .nii.gz, .nrrd, .mha, .tif) and can automatically detect and load files from a BIDS directory structure.
- Saving Images: Exports images in multiple formats, either to a direct path or within a valid BIDS folder hierarchy.
- Managing ASL Data: Provides serialization (save_asl_data) and deserialization (load_asl_data) of ASL datasets using dill for robust object storage.
- BIDS Integration: Ensures compatibility with the BIDS specification, helping organize imaging data systematically across subjects and sessions.

These tools are intended to serve as a foundation for preprocessing and organizing ASL datasets, ensuring that images and related data are stored, retrieved, and shared in a standardized and efficient way before further analysis.

::: utils.io
Loading
Loading