Skip to content

bebemdjd/Polarization-Imaging-Analysis-GUI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

Polarization Imaging Analysis GUI

Overview

屏幕截图 2025-09-03 172231

This repository provides a MATLAB-based graphical user interface for polarization imaging analysis. Polarization imaging is an advanced optical technique that exploits the polarization properties of light to reveal microstructural and compositional information about biological tissues that is invisible to conventional intensity-based imaging.

When polarized light interacts with biological tissues, it undergoes various polarization-altering phenomena such as birefringence (from ordered fibrous structures), depolarization (from multiple scattering), and dichroism (from anisotropic absorption). By measuring these polarization changes through Mueller matrix polarimetry, we can extract quantitative parameters that correlate with tissue microstructure, organization, and pathological states.

The new_20241025mmpd_gui.m GUI enables researchers and clinicians to:

  • Load and process Mueller matrix data from polarization imaging systems
  • Extract physically meaningful polarization parameters
  • Visualize parameter maps with interactive statistical analysis
  • Perform region-of-interest (ROI) analysis for quantitative assessment
  • Export results for further analysis and clinical interpretation

Key Features

🔬 Polarization Parameter Extraction

  • Mueller Matrix Decomposition: Implements advanced decomposition algorithms to extract fundamental polarization properties
  • Real-time Visualization: Interactive parameter maps with false-color representation
  • Statistical Analysis: Comprehensive statistics (mean, standard deviation, range, median) for global and ROI-based analysis

🖥️ User-Friendly GUI Interface

  • Intuitive Design: Simple point-and-click interface for non-programming users
  • Interactive Parameter Selection: Dropdown menu to choose from 8 different polarization parameters
  • Real-time ROI Analysis: Draw rectangular regions and get instant statistical feedback
  • Dual-column Display: Organized parameter statistics in an easy-to-read format

📊 Clinical Research Applications

  • Tissue Characterization: Distinguish between healthy and pathological tissues based on polarization signatures
  • Fiber Orientation Mapping: Visualize collagen fiber organization and alignment
  • Microstructural Analysis: Quantify tissue anisotropy and organizational changes

System Requirements

  • MATLAB R2018a or newer (R2020a+ recommended for optimal performance)
  • Required Toolboxes:
    • Image Processing Toolbox (essential for image display and analysis)
    • Signal Processing Toolbox (for advanced filtering operations)
  • Optional Components:
    • Qt Runtime (for enhanced GUI components)
    • Statistics and Machine Learning Toolbox (for advanced statistical analysis)

Note: Ensure your MATLAB installation path contains no non-ASCII characters to avoid potential path resolution issues.


Polarization Physics Background

Understanding Polarization in Biological Tissues

Biological tissues are complex optical media that alter the polarization state of incident light through several fundamental mechanisms:

1. Linear Birefringence

  • Physical Origin: Ordered fibrous structures (collagen, elastin, smooth muscle) create optical anisotropy
  • Effect: Different refractive indices for orthogonal polarization components
  • Clinical Relevance: Indicates tissue organization, fiber density, and structural integrity
  • Parameter: t - Linear birefringence magnitude

2. Depolarization

  • Physical Origin: Multiple scattering from cellular organelles, nuclei, and tissue inhomogeneities
  • Effect: Reduces degree of polarization, making light less coherent
  • Clinical Relevance: Correlates with tissue density, cellular content, and pathological changes
  • Parameter: b - Scattering depolarization

3. Optical Rotation

  • Physical Origin: Chiral molecular structures and asymmetric tissue organization
  • Effect: Rotation of linear polarization plane
  • Clinical Relevance: Sensitive to molecular composition changes
  • Parameter: Psi - Optical rotation angle

4. Dichroism

  • Physical Origin: Anisotropic absorption due to aligned molecular structures
  • Effect: Differential absorption for different polarization states
  • Clinical Relevance: Related to tissue composition and molecular orientation
  • Parameter: D - Linear dichroism

Complete Parameter Dictionary

Each parameter extracted by this toolkit has specific physical meaning and clinical interpretation:

Parameter Full Name Physical Meaning Clinical Interpretation Typical Range
t Linear Birefringence Phase retardation between fast/slow axes Collagen organization, fiber alignment 0.0 - 0.5
b Depolarization Loss of polarization coherence Tissue density, cellular content 0.0 - 1.0
phi2 Fast Axis Orientation Direction of optical fast axis Fiber orientation, structural anisotropy -π/2 to π/2
A Anisotropy Index Composite structural parameter Overall tissue organization 0.0 - 1.0
D Linear Dichroism Polarization-dependent absorption Molecular alignment, composition 0.0 - 0.3
Delta1 Phase Retardation Alternative birefringence measure Structural anisotropy (decomposed) 0.0 - π
Psi Optical Rotation Circular birefringence Chiral structures, molecular asymmetry -π/4 to π/4
Theta Orientation Angle Fast axis direction (decomposed) Fiber direction (alternative method) -π/2 to π/2

Parameter Interpretation Guidelines

  • High birefringence (t): Well-organized fibrous tissue (e.g., healthy collagen)
  • High depolarization (b): Increased scattering (inflammation, cellular infiltration)
  • Consistent orientation (phi2, Theta): Aligned tissue structure
  • Low anisotropy (A): Disorganized or isotropic tissue
  • Significant dichroism (D): Molecular alignment changes

Installation & Setup

Step 1: Download

Download the new_20241025mmpd_gui.m file and place it in your desired MATLAB working directory.

Step 2: MATLAB Configuration

  1. Open MATLAB
  2. Navigate to the file directory:
    cd('C:\path\to\your\gui\directory')  % Adjust path accordingly
  3. Ensure required toolboxes are available:
    % Check if Image Processing Toolbox is installed
    ver('images')

Step 3: Launch the GUI

new_20241025mmpd_gui

Step 4: Verify Installation

The GUI window should open with control panels on the left and display areas on the right. If you encounter any issues, ensure your MATLAB path is correctly set and restart MATLAB.


Detailed Usage Guide

Step 1: Launch the GUI

new_20241025mmpd_gui

Step 2: Load Mueller Matrix Data

  1. File Selection: Use the file loading controls to select your Mueller matrix data

    • Supported formats: .mat files containing Mueller matrices
    • Expected data structure: 4×4×Height×Width double array
  2. Data Validation: Click "显示首张图像" (Show First Image) to verify data loading

    • This displays the first intensity component for visual confirmation
    • Check that image dimensions and dynamic range appear correct

Step 3: Parameter Analysis

  1. Parameter Selection:

    • Use the dropdown menu to select from 8 available parameters:
      • t (Linear Birefringence)
      • b (Depolarization)
      • phi2 (Fast Axis Orientation)
      • A (Anisotropy Index)
      • D (Linear Dichroism)
      • Delta1 (Phase Retardation)
      • Psi (Optical Rotation)
      • Theta (Orientation Angle)
  2. Parameter Visualization:

    • Click "显示参数" (Show Parameter) to compute and display the selected parameter map
    • The parameter image appears in the main display area with colorbar
    • Statistical summary automatically appears in the right panel in organized two-column format

Step 4: Region of Interest (ROI) Analysis

  1. ROI Selection:

    • Use the rectangle tool to draw regions of interest on the parameter map
    • Multiple ROIs can be analyzed sequentially
  2. Statistical Analysis:

    • Real-time statistics displayed including:
      • Mean, standard deviation, variance
      • Minimum, maximum, median values
      • ROI size and position information
    • Results shown in the right-side listbox for easy comparison

Step 5: Results Interpretation

  • Parameter Maps: False-color visualization with quantitative colorbars
  • Statistics Panel: Organized display of global and ROI-specific statistics
  • Real-time Updates: All displays update automatically when parameters or ROIs change

GUI Components & File Structure

Main File

  • new_20241025mmpd_gui.m: Complete standalone MATLAB GUI application
    • Contains all necessary functions for Mueller matrix analysis
    • Implements parameter extraction algorithms
    • Provides interactive visualization and statistical analysis
    • No additional dependencies beyond MATLAB toolboxes

GUI Layout

┌─────────────────────────────────────────────────────────────┐
│  Control Panel          │  Parameter Display Area           │
│  ├─ File Loading        │  ├─ Main Parameter Image          │
│  ├─ Parameter Selection │  └─ Colorbar & Title             │
│  ├─ Display Controls    ├───────────────────────────────────│
│  └─ ROI Tools          │  Statistical Analysis Panel       │
├─────────────────────────│  ├─ Global Statistics (2-column)  │
│  Status & Log Panel     │  └─ ROI Statistics (listbox)     │
└─────────────────────────────────────────────────────────────┘

Data Format Requirements

Input Data Specifications

  1. Mueller Matrix Format:

    % Expected structure: 4×4×Height×Width double array
    mueller_matrix = rand(4, 4, 512, 512);  % Example dimensions
    
    % Save format
    save('sample_data.mat', 'mueller_matrix');
  2. Polarization Image Sequence:

    % Alternative input: Intensity images for different polarization states
    % Structure: Height×Width×N_polarization_states
    polarization_images = rand(512, 512, 16);  % 16 polarization states
  3. Data Quality Requirements:

    • Bit depth: 16-bit recommended for optimal dynamic range
    • Spatial resolution: Minimum 256×256 pixels
    • Polarization states: At least 16 states for robust Mueller matrix reconstruction
    • SNR: Signal-to-noise ratio > 20 dB recommended

Clinical Applications & Interpretation

1. Tissue Characterization

  • Healthy vs. Pathological: Use combination of birefringence (t) and depolarization (b)
  • Inflammation Detection: Elevated depolarization often indicates inflammatory infiltrate
  • Fibrosis Assessment: High birefringence with organized orientation suggests fibrotic tissue

2. Collagen Organization Analysis

  • Fiber Density: Quantified by linear birefringence magnitude
  • Fiber Orientation: Mapped using fast axis direction parameters
  • Structural Integrity: Assessed through anisotropy index

3. Early Disease Detection

  • Microstructural Changes: Subtle parameter variations may precede visible morphological changes
  • Quantitative Monitoring: Objective metrics for disease progression tracking
  • Therapeutic Response: Monitor treatment effects through parameter evolution

Interpretation Guidelines

Clinical Condition Expected Parameter Changes Diagnostic Indicators
Healthy Tissue Moderate t, Low b, Consistent orientation Organized fiber structure
Inflammation Decreased t, Increased b, Random orientation Loss of organization
Fibrosis Increased t, Variable b, Aligned orientation Excessive collagen deposition
Neoplasia Variable t, Increased b, Disrupted orientation Architectural distortion


Troubleshooting Guide

Common Issues & Solutions

1. GUI Window Doesn't Open

  • Cause: MATLAB path issues or missing toolboxes
  • Solution:
    clear all; close all; clc;
    cd('path/to/gui/directory');
    new_20241025mmpd_gui;

2. Buttons Not Responding

  • Symptom: Clicking buttons has no effect
  • Cause: Function handle conflicts or GUI initialization issues
  • Solution: Restart MATLAB and relaunch the GUI

3. Images Not Displaying

  • Symptom: Parameter maps appear blank or distorted
  • Cause: Data format incompatibility or display axis issues
  • Solution:
    • Verify Mueller matrix dimensions (should be 4×4×H×W)
    • Check data value ranges (typically 0-1 for normalized Mueller matrices)

4. Error Loading Data Files

  • Symptom: File loading fails with error messages
  • Solution:
    • Ensure .mat files contain properly formatted Mueller matrix data
    • Variable should be named appropriately and accessible
    • Check file permissions and path validity

Performance Tips

  • Large Datasets: For Mueller matrices larger than 1024×1024, processing may be slow
  • Memory Management: Close other MATLAB figures and clear workspace before processing
  • Display Quality: Use MATLAB R2020a or newer for optimal GUI rendering

About

This repository provides a MATLAB-based graphical user interface for polarization imaging analysis.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages