Skip to main content

Batch non-rigid image registration with NLMeans or NLPCA denoising and stage average output.

Project description

Match-Series-Batch v0.2.0

Batch processing tool for non-rigid alignment of image stacks using pymatchseries and added lightweight noise reduction algorithm

You can install match-series-batch via pip:

pip install match-series-batch

After installation, you can use the command line tool:

match-series-batch [OPTIONS]

Example:

match-series-batch --input ./mydata --output ./results --lambda 30 --prefix Final_ --dtype uint16 --denoising nlpca

Command-line Arguments Description

  • --input

    Specify the root folder containing sample subfolders.
    Each subfolder will be treated as a separate dataset for alignment.
    (Default: set in config.py)

  • --output

    Specify the root folder where the aligned results will be saved.
    (Default: set in config.py)

  • --lambda

    Set the regularization parameter for non-rigid deformation.
    A higher value leads to smoother deformation but potentially less precise alignment.
    A lower value allows more local deformation for better registration.
    (Default: 20)

  • --prefix

    Set the prefix for naming output files, including .tiff, .dm4, and .hspy files.
    (Default: Aligned_)

  • --dtype

    Choose the output image data type:
    uint8 (0–255 grayscale) or uint16 (0–65535 grayscale).
    Useful for preserving dynamic range.
    (Default: uint8)

  • --denoising

"nlmeans" , "nlpca" or "none" As set in config.py, Denoising method applied before saving images (Default: nlpca)

Notes

•    Input folder must contain subfolders (one for each sample), each with .dm4 images.
•    Output will include .tiff, .dm4, a full aligned stack .hspy, and stage-average images.
•    Full processing logs are recorded automatically.

If your laptop CPU is a Macbook M1/M2, MatchSeries will only work with X86_64, Run these scripts in a terminal to generate an X86 environment for M-series processors:

# Go to the main directory
cd ~

# Printing information
echo "Downloading Miniforge3 (x86_64)..."

# Download Miniforge3 x86_64
curl -L -O https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-MacOSX-x86_64.sh

# Install Miniforge3 x86_64
echo "Install Miniforge3 (x86_64)..."
bash Miniforge3-MacOSX-x86_64.sh -b -p $HOME/miniforge_x86_64

# initialize Conda
echo "🔧 initialize Conda (x86_64)..."
source ~/miniforge_x86_64/bin/activate

# Switch to x86_64 architecture to run
arch -x86_64 /usr/bin/env bash <<'EOF'
    echo "being created match-x86 env..."
    source ~/miniforge_x86_64/bin/activate
    conda create -y -n match-x86 python=3.10
    conda activate match-x86

    echo "Install match-series, pyMatchSeries, hyperspy..."
    conda install -y -c conda-forge match-series
    pip install pyMatchSeries hyperspy

    echo "Installation is complete!"

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

match_series_batch-0.2.0.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

match_series_batch-0.2.0-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file match_series_batch-0.2.0.tar.gz.

File metadata

  • Download URL: match_series_batch-0.2.0.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for match_series_batch-0.2.0.tar.gz
Algorithm Hash digest
SHA256 b54472fc8693cc60861f0eaf9dc7580880df4140e5a3890d5266a6f2188d7c73
MD5 dae9d64ad668af0debd15bc69ce13e01
BLAKE2b-256 8880f9797bbe3bfa1e2e994b6f87cce3774749ccc7bb0f878e1af2f2cbe0a791

See more details on using hashes here.

File details

Details for the file match_series_batch-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for match_series_batch-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e7d9c37c7e9e8c178a7eedcd6177551cc42d2174695e8cf6abb5e751ffb8392b
MD5 9d46d5044ba91d7cf235aeafbb636331
BLAKE2b-256 40c2902262609109a0da992f47594318056d1ee4a2b7b3f7018c3ebd6f395782

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page