Skip to content

Single workflow#5

Draft
arkiev wants to merge 38 commits intomainfrom
single_workflow
Draft

Single workflow#5
arkiev wants to merge 38 commits intomainfrom
single_workflow

Conversation

@arkiev
Copy link
Copy Markdown

@arkiev arkiev commented Mar 19, 2026

The primary contribution of this fork is the addition of a complete DWI preprocessing and QC pipeline integrated as a first-class stage alongside the existing native contrast workflow. This includes automatic DICOM series classification, phase-encoding correction mode selection (rpe_none, rpe_pair, rpe_all, rpe_split), FSL-based DWI preprocessing via dwifslpreproc, tensor fitting to produce ADC and FA maps, and rigid-body T1-to-DWI coregistration using FLIRT — all orchestrated through a new pipeline.py entry point that runs all three stages from a single command. Several refinements were also made to the existing codebase: the ANTs registration check threshold was updated, vial masks are now transformed with nearest-neighbour interpolation to preserve binary values, and the ADC scatter plot was redesigned with open-circle reference markers plotted over the measured values for clearer visual comparison against SPIRIT reference data.

@arkiev arkiev requested a review from tclose March 19, 2026 23:26
@wiz-788c0877ba
Copy link
Copy Markdown

wiz-788c0877ba bot commented Mar 19, 2026

Wiz Scan Summary

Scanner Findings
Vulnerability Finding Vulnerabilities -
Data Finding Sensitive Data -
Secret Finding Secrets -
IaC Misconfiguration IaC Misconfigurations -
SAST Finding SAST Findings 7 Medium
Software Management Finding Software Management Findings -
Total 7 Medium

View scan details in Wiz

To detect these findings earlier in the dev lifecycle, try using Wiz Code VS Code Extension.

arkiev added 3 commits March 20, 2026 10:50
…API change (plugin → worker) and Click's automatic underscore-to-hyphen conversion in option names (--metric_dir → --metric-dir).
@arkiev arkiev marked this pull request as ready for review March 20, 2026 01:49
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Mar 20, 2026

Codecov Report

❌ Patch coverage is 12.58372% with 2480 lines in your changes missing coverage. Please review.
✅ Project coverage is 24.92%. Comparing base (3216caf) to head (7c86110).

Files with missing lines Patch % Lines
phantomkit/dwi_processing.py 0.00% 897 Missing ⚠️
phantomkit/phantom_processor.py 0.00% 352 Missing ⚠️
phantomkit/pipeline.py 0.00% 338 Missing ⚠️
phantomkit/plotting/calibration_plotter.py 14.57% 251 Missing and 1 partial ⚠️
phantomkit/plotting/compare_plots.py 11.39% 171 Missing ⚠️
phantomkit/plotting/vial_intensity.py 36.02% 106 Missing and 13 partials ⚠️
phantomkit/plotting/_html_common.py 54.54% 73 Missing and 7 partials ⚠️
phantomkit/cli.py 23.17% 63 Missing ⚠️
phantomkit/plotting/visualization.py 1.58% 62 Missing ⚠️
phantomkit/plotting/viewer.py 16.66% 60 Missing ⚠️
... and 4 more
Additional details and impacted files
@@             Coverage Diff             @@
##             main       #5       +/-   ##
===========================================
- Coverage   68.73%   24.92%   -43.82%     
===========================================
  Files          12       19        +7     
  Lines        1206     3796     +2590     
  Branches      110      546      +436     
===========================================
+ Hits          829      946      +117     
- Misses        350     2809     +2459     
- Partials       27       41       +14     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

arkiev and others added 10 commits April 2, 2026 12:05
phantomkit plot compare-plots accepts multiple phantomkit HTML output files
(ADC, T1 mapping, T2 mapping), reads their embedded JSON, and produces a
single self-contained HTML scatter plot with:
  - one uniquely coloured dataset per input file (filled circles)
  - reference values as red open circles (auto-loaded from template_data/)
  - toggle buttons to show/hide individual sessions
  - checkboxes to select which sessions contribute to the group mean
  - group mean displayed as adaptive-colour filled squares

Phantom and template_data/ are auto-detected from embedded data and the
installed package; --phantom / --template-dir override if needed.
Session labels default to filename stems, falling back to meaningful
ancestor directory names when all stems are the same (e.g. all "ADC.html").

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…om detection

maps_ir and maps_te now accept a `phantom` kwarg and include it in the
embedded JSON so compare-plots can auto-load the correct reference file.
phantom_processor.py and visualization.py pass phantom_name through.

compare-plots phantom auto-detection now falls back to scanning all
available phantom subdirectories and selecting the one whose reference
vials best overlap with the measured vials — handles HTML files generated
before the phantom field was added, and multi-phantom installations.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Label derivation now finds the first path component that differs between
input files by walking inward from the right and identifying the common
suffix — surfaces the subject/session directory (e.g. P000009_testing)
rather than a shared scan-type directory (native_contrasts_staging).

Font sizes increased (axis titles 13→15px, ticks 12→14px, controls
11–12→14px); marker radii increased (session circles 6→9, reference
open circles 8→11, group mean squares 8→11); chart height 440→500px.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@arkiev arkiev marked this pull request as draft April 17, 2026 10:44
@arkiev arkiev self-assigned this Apr 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants