# alexkhang18/fourier-series-shape-analysis-fibroblasts architecture

> Architecture diagram of the GitHub repository alexkhang18/fourier-series-shape-analysis-fibroblasts, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/alexkhang18/fourier-series-shape-analysis-fibroblasts
- Repository: https://github.com/alexkhang18/fourier-series-shape-analysis-fibroblasts

## Overview

This MATLAB example suite reproduces fibroblast shape-analysis figures through four runnable stages: image segmentation and Fourier-series shape representation, PCA/eigenshape analysis, logistic-regression cross-validation, and grading on a test dataset. The README identifies the figures and notes that Fourier coefficients and test data are supplied as spreadsheets. Source excerpts were unavailable, so internal calls and detailed dataflow are not inferred; dashed, unevidenced links mark only the documented high-level progression.

Main entry points: [`1_segmentation_fourier_series_fit_DOA/segmentation_fourier_series_fit_DOA.m`](https://github.com/alexkhang18/fourier-series-shape-analysis-fibroblasts/blob/main/1_segmentation_fourier_series_fit_DOA/segmentation_fourier_series_fit_DOA.m) (Segmentation and DOA), [`2_PCA_eigenshape_KDE/PCA_eigenshape_KDE.m`](https://github.com/alexkhang18/fourier-series-shape-analysis-fibroblasts/blob/main/2_PCA_eigenshape_KDE/PCA_eigenshape_KDE.m) (PCA eigenshapes KDE), [`3_logistic_regression_model_k_fold_cross_validation/logistic_regression_model_k_fold_cross_validation.m`](https://github.com/alexkhang18/fourier-series-shape-analysis-fibroblasts/blob/main/3_logistic_regression_model_k_fold_cross_validation/logistic_regression_model_k_fold_cross_validation.m) (Logistic regression CV), [`1_segmentation_fourier_series_fit_DOA/fourier_series_fit.m`](https://github.com/alexkhang18/fourier-series-shape-analysis-fibroblasts/blob/main/1_segmentation_fourier_series_fit_DOA/fourier_series_fit.m) (Fourier fitting)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_shape["Shape extraction"]
  node_images["Microscopy images"]
  node_segmentation["Segmentation and DOA"]
  node_fourier_fit["Fourier fitting"]
  node_fourier_eval["Fourier evaluation"]
  node_orientation["aSMA orientation<br/>[aSMA_orientation.m]"]
end

subgraph group_analysis["Shape analysis"]
  node_coefficients["Cell coefficients<br/>[cell_data.xlsx]"]
  node_pca["PCA eigenshapes KDE"]
  node_pca_eval["Fourier evaluation"]
end

subgraph group_classification["Classification"]
  node_model_data["Model dataset<br/>[DATA.xlsx]"]
  node_logistic["Logistic regression CV"]
  node_roc["ROC analysis<br/>[ROC_curve.m]"]
end

subgraph group_grading["Test grading"]
  node_grading_data["Grading datasets"]
  node_grading["Test dataset grading"]
end

node_user(("MATLAB user"))

node_user -->|"runs"| node_segmentation
node_user -->|"runs"| node_pca
node_user -->|"runs"| node_logistic
node_user -->|"runs"| node_grading
node_images -.->|"analyzed by"| node_segmentation
node_segmentation -.->|"fits shapes"| node_fourier_fit
node_fourier_fit -.->|"evaluates series"| node_fourier_eval
node_segmentation -.->|"assesses orientation"| node_orientation
node_coefficients -->|"analyzed by"| node_pca
node_pca -.->|"uses representation"| node_pca_eval
node_model_data -.->|"modeled by"| node_logistic
node_logistic -.->|"evaluated with"| node_roc
node_grading_data -->|"graded by"| node_grading

click node_images "https://github.com/alexkhang18/fourier-series-shape-analysis-fibroblasts/tree/main/1_segmentation_fourier_series_fit_DOA"
click node_segmentation "https://github.com/alexkhang18/fourier-series-shape-analysis-fibroblasts/blob/main/1_segmentation_fourier_series_fit_DOA/segmentation_fourier_series_fit_DOA.m"
click node_fourier_fit "https://github.com/alexkhang18/fourier-series-shape-analysis-fibroblasts/blob/main/1_segmentation_fourier_series_fit_DOA/fourier_series_fit.m"
click node_fourier_eval "https://github.com/alexkhang18/fourier-series-shape-analysis-fibroblasts/blob/main/1_segmentation_fourier_series_fit_DOA/fourier_series_evaluate.m"
click node_orientation "https://github.com/alexkhang18/fourier-series-shape-analysis-fibroblasts/blob/main/1_segmentation_fourier_series_fit_DOA/aSMA_orientation.m"
click node_coefficients "https://github.com/alexkhang18/fourier-series-shape-analysis-fibroblasts/blob/main/2_PCA_eigenshape_KDE/cell_data.xlsx"
click node_pca "https://github.com/alexkhang18/fourier-series-shape-analysis-fibroblasts/blob/main/2_PCA_eigenshape_KDE/PCA_eigenshape_KDE.m"
click node_pca_eval "https://github.com/alexkhang18/fourier-series-shape-analysis-fibroblasts/blob/main/2_PCA_eigenshape_KDE/fourier_series_evaluate.m"
click node_model_data "https://github.com/alexkhang18/fourier-series-shape-analysis-fibroblasts/blob/main/3_logistic_regression_model_k_fold_cross_validation/DATA.xlsx"
click node_logistic "https://github.com/alexkhang18/fourier-series-shape-analysis-fibroblasts/blob/main/3_logistic_regression_model_k_fold_cross_validation/logistic_regression_model_k_fold_cross_validation.m"
click node_roc "https://github.com/alexkhang18/fourier-series-shape-analysis-fibroblasts/blob/main/3_logistic_regression_model_k_fold_cross_validation/ROC_curve.m"
click node_grading_data "https://github.com/alexkhang18/fourier-series-shape-analysis-fibroblasts/tree/main/4_grading_test_dataset"
click node_grading "https://github.com/alexkhang18/fourier-series-shape-analysis-fibroblasts/blob/main/4_grading_test_dataset/grading_test_dataset.m"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_images,node_segmentation,node_fourier_fit,node_fourier_eval,node_orientation,node_user toneBlue
class node_coefficients,node_pca,node_pca_eval toneAmber
class node_model_data,node_logistic,node_roc toneMint
class node_grading_data,node_grading toneRose
```

## Components

### Shape extraction

- [Microscopy images](https://github.com/alexkhang18/fourier-series-shape-analysis-fibroblasts/tree/main/1_segmentation_fourier_series_fit_DOA): `1_segmentation_fourier_series_fit_DOA`
- [Segmentation and DOA](https://github.com/alexkhang18/fourier-series-shape-analysis-fibroblasts/blob/main/1_segmentation_fourier_series_fit_DOA/segmentation_fourier_series_fit_DOA.m): `1_segmentation_fourier_series_fit_DOA/segmentation_fourier_series_fit_DOA.m`
- [Fourier fitting](https://github.com/alexkhang18/fourier-series-shape-analysis-fibroblasts/blob/main/1_segmentation_fourier_series_fit_DOA/fourier_series_fit.m): `1_segmentation_fourier_series_fit_DOA/fourier_series_fit.m`
- [Fourier evaluation](https://github.com/alexkhang18/fourier-series-shape-analysis-fibroblasts/blob/main/1_segmentation_fourier_series_fit_DOA/fourier_series_evaluate.m): `1_segmentation_fourier_series_fit_DOA/fourier_series_evaluate.m`
- [aSMA orientation](https://github.com/alexkhang18/fourier-series-shape-analysis-fibroblasts/blob/main/1_segmentation_fourier_series_fit_DOA/aSMA_orientation.m): `1_segmentation_fourier_series_fit_DOA/aSMA_orientation.m`

### Shape analysis

- [Cell coefficients](https://github.com/alexkhang18/fourier-series-shape-analysis-fibroblasts/blob/main/2_PCA_eigenshape_KDE/cell_data.xlsx): `2_PCA_eigenshape_KDE/cell_data.xlsx`
- [PCA eigenshapes KDE](https://github.com/alexkhang18/fourier-series-shape-analysis-fibroblasts/blob/main/2_PCA_eigenshape_KDE/PCA_eigenshape_KDE.m): `2_PCA_eigenshape_KDE/PCA_eigenshape_KDE.m`
- [Fourier evaluation](https://github.com/alexkhang18/fourier-series-shape-analysis-fibroblasts/blob/main/2_PCA_eigenshape_KDE/fourier_series_evaluate.m): `2_PCA_eigenshape_KDE/fourier_series_evaluate.m`

### Classification

- [Model dataset](https://github.com/alexkhang18/fourier-series-shape-analysis-fibroblasts/blob/main/3_logistic_regression_model_k_fold_cross_validation/DATA.xlsx): `3_logistic_regression_model_k_fold_cross_validation/DATA.xlsx`
- [Logistic regression CV](https://github.com/alexkhang18/fourier-series-shape-analysis-fibroblasts/blob/main/3_logistic_regression_model_k_fold_cross_validation/logistic_regression_model_k_fold_cross_validation.m): `3_logistic_regression_model_k_fold_cross_validation/logistic_regression_model_k_fold_cross_validation.m`
- [ROC analysis](https://github.com/alexkhang18/fourier-series-shape-analysis-fibroblasts/blob/main/3_logistic_regression_model_k_fold_cross_validation/ROC_curve.m): `3_logistic_regression_model_k_fold_cross_validation/ROC_curve.m`

### Test grading

- [Grading datasets](https://github.com/alexkhang18/fourier-series-shape-analysis-fibroblasts/tree/main/4_grading_test_dataset): `4_grading_test_dataset`
- [Test dataset grading](https://github.com/alexkhang18/fourier-series-shape-analysis-fibroblasts/blob/main/4_grading_test_dataset/grading_test_dataset.m): `4_grading_test_dataset/grading_test_dataset.m`

### Other components

- **MATLAB user**

## Connections

- MATLAB user → Segmentation and DOA: runs (evidence: `README.md`)
- MATLAB user → PCA eigenshapes KDE: runs (evidence: `README.md`)
- MATLAB user → Logistic regression CV: runs (evidence: `README.md`)
- MATLAB user → Test dataset grading: runs (evidence: `README.md`)
- Microscopy images → Segmentation and DOA: analyzed by
- Segmentation and DOA → Fourier fitting: fits shapes
- Fourier fitting → Fourier evaluation: evaluates series
- Segmentation and DOA → aSMA orientation: assesses orientation
- Cell coefficients → PCA eigenshapes KDE: analyzed by (evidence: `README.md`)
- PCA eigenshapes KDE → Fourier evaluation: uses representation
- Model dataset → Logistic regression CV: modeled by
- Logistic regression CV → ROC analysis: evaluated with
- Grading datasets → Test dataset grading: graded by (evidence: `README.md`)
