Skip to content

NPACore/mrrc-hdr-qa

Folders and files

NameName
Last commit message
Last commit date

Latest commit

8937d13 · Feb 27, 2025
Nov 5, 2024
Nov 21, 2024
Nov 19, 2024
Feb 27, 2025
Oct 7, 2024
Nov 19, 2024
Oct 7, 2024
Nov 8, 2024
Oct 15, 2024
Nov 8, 2024
Nov 26, 2024
Feb 27, 2025
Feb 27, 2025
Nov 26, 2024
Feb 27, 2025
Nov 26, 2024
Nov 21, 2024
Oct 25, 2024
Nov 26, 2024
Feb 10, 2025
Nov 25, 2024
Nov 26, 2024
Oct 26, 2024
Nov 21, 2024
Feb 26, 2025
Nov 20, 2024
Nov 24, 2024
Nov 8, 2024
Nov 19, 2024
Feb 27, 2025
Oct 26, 2024
Oct 7, 2024
Nov 20, 2024
Oct 29, 2024
Feb 27, 2025
Nov 26, 2024
Nov 24, 2024
Oct 7, 2024
Feb 26, 2025
Nov 21, 2024
Nov 21, 2024
Feb 26, 2025
Nov 19, 2024
Feb 27, 2025
Nov 19, 2024
Nov 20, 2024
Feb 27, 2025
Nov 20, 2024

Repository files navigation

MRRC Dicom Header Quality Assurance

Parse dicoms into a template database and alert on non-conforming sequences.

See

TODO

  • start at partial -- browser request, server send STATE
  • don't throw error on null fields (calculate FoV, TA)
  • remove data

Strategy

  • build sqlite db of all acquisitions with subset of parameters
  • use db summary to pull out "ideal template"
  • check new sessions' acquisitions against template to alert via cron
#m  h  dom mon dow   command
30  0    *   *   *   /home/npac/src/mrrc-hdr-qa/02_update_db.sh

Notes

  • "Sequence Name(0018,0024)" called "SequenceType" in taglist.txt is different per diffusion dcm (like ep_b5#1..ep_b1540#27)

  • should look at n echos 0018,0086 and collapse across dicoms to make protocol mutliecho parameter

  • precision changes between realtime streaming and offline dicom writes? see check_template.py

  • inotify CREATE is catches files before they finish writing. Watch CLOSE_WRITE instead. Test slower write with smbclient

smbclient -U mrqart //localhost/dicomstream/ -c 'put 001_000001_000002.dcm sim/y.dcm'

MRQART

MR QA in Real Time (python port)

install

for start menu shortcut, copy bat shortcut into file into

%AppData%\Microsoft\Internet Explorer\Quick Launch\User Pinned\StartMenu

Developing

Use show_debug in a console to get a simdata textarea to send mock data.

TODO

  • not red on null -- use mrqart computer files to test
  • make systemctl service file
  • rename input/template Current/Reference
  • cron rm find -mtype +2 days and rm
  • add help tooltips
  • py motion affine -> FD and benchmark

Extensions/plugins

MRQART can be extended to support

  • motion/framewise displacement (FD) measure reporting a la FIRRM
  • dynamic EPI acquisition angle selection
  • ntp (accurate) clock sync with trigger pulse (very limited analog to https://github.com/ReproNim/reprostim)

Prior Art

Speed

exdcm=Resting-state_ME_476x504.14/MR.1.3.12.2.1107.5.2.43.167046.202208231445351851262117

hyperfine "./dcmmeta2tsv.py $exdcm" "./dcmmeta2tsv.bash $exdcm" 

Benchmark 1: ./dcmmeta2tsv.py Resting-state_ME_476x504.14/MR.1.3.12.2.1107.5.2.43.167046.202208231445351851262117
  Time (mean ± σ):     952.2 ms ±  37.4 ms    [User: 559.1 ms, System: 86.9 ms]
  Range (min … max):   876.5 ms … 1014.5 ms    10 runs
 
Benchmark 2: ./dcmmeta2tsv.bash Resting-state_ME_476x504.14/MR.1.3.12.2.1107.5.2.43.167046.202208231445351851262117
  Time (mean ± σ):     822.5 ms ±  69.3 ms    [User: 73.3 ms, System: 51.0 ms]
  Range (min … max):   703.1 ms … 896.1 ms    10 runs
 
Summary
  ./dcmmeta2tsv.bash Resting-state_ME_476x504.14/MR.1.3.12.2.1107.5.2.43.167046.202208231445351851262117 ran
    1.16 ± 0.11 times faster than ./dcmmeta2tsv.py Resting-state_ME_476x504.14/MR.1.3.12.2.1107.5.2.43.167046.202208231445351851262117