Logo di Mri Reconstruction

Mri Reconstruction

Community
KeWang0622
mri-reconstruction

Read before turning MR data into images or parameter maps: raw k-space (Cartesian, radial, spiral, EPI; twix, ISMRMRD, numpy), GRAPPA/SENSE, coil combination, off-resonance correction, BART or SigPy, and T1, T2/EPG, T2*, water-fat (PDFF), ASL, DCE or QSM maps. Prevents silent errors in encoding sign, acceleration pattern, orientation, noise covariance and floor, water- fat swaps, timing origin and units. Ships tested numpy helpers and a finish check. Trained networks: deep-learning-recon; diffusion: diffusion-mri.

Panoramica

Pubblicato daKeWang0622
RepositoryMRFoundry
Nome della skillmri-reconstruction
Stelle
31
Fork
0
File inclusi
15
LicenzaMIT
Link
  • Istruzioni in Markdown

    Un file SKILL.md che il modello carica quando serve, consumando token solo quando una richiesta è effettivamente pertinente.

  • Funziona con qualsiasi LLM

    Le skill IA sono in semplice Markdown, non in codice specifico di un fornitore, quindi funzionano con GPT, Claude, Gemini, Grok o un modello locale.

  • File inclusi: 15

    Script, template e riferimenti che il modello può leggere mentre lavora. I file sono di sola lettura e non vengono mai eseguiti.

  • Open source

    Pubblicata da KeWang0622 su GitHub. Leggi i sorgenti prima di installarla.

Installazione

Installa la skill IA Mri Reconstruction in TypingMind per usarla con qualsiasi LLM, oppure copiala in un altro agente in grado di leggere SKILL.md.

1

Installa in TypingMind

TypingMind installa una skill direttamente dalla sua cartella GitHub: legge SKILL.md, raccoglie i file delle risorse e salva il risultato in locale.

  1. Apri l'app e vai su Plugin → Skill.
  2. Scegli "Installa da GitHub".
  3. Incolla l'URL della cartella della skill riportato qui sotto e conferma.
    https://github.com/KeWang0622/MRFoundry/tree/main/skills/mri-reconstruction
  4. Attiva la skill in ogni chat in cui vuoi averla a disposizione.
Plugin → Skill → Aggiungi skill → Da URL GitHub, poi incolla l'URL della cartella e premi Continua.
2

Installa in un altro agente

Qualsiasi agente che legge il formato Agent Skills può usare questa skill: copia la cartella della skill nella directory delle skill di quell'agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/KeWang0622/MRFoundry.git /tmp/MRFoundry
mkdir -p .claude/skills
cp -r /tmp/MRFoundry/skills/mri-reconstruction .claude/skills/mri-reconstruction
Dopo la copia, riavvia Claude Code per caricare la nuova skill.

Usala in TypingMind

Attiva Mri Reconstruction in qualsiasi chat di TypingMind e al resto pensa il modello. Il nome e la descrizione della skill sono nel prompt di sistema e, non appena arriva una richiesta pertinente, il modello carica da solo le istruzioni complete: non devi mai richiamarla manualmente e non consuma token finché non viene effettivamente usata.

Il modello carica automaticamente Mri Reconstruction non appena riceve una richiesta pertinente.

Funziona con qualsiasi modello IA

Le skill IA sono semplici istruzioni in Markdown, non codice specifico di un fornitore, quindi Mri Reconstruction non è vincolata al modello per cui è stata scritta. Installala una sola volta in TypingMind e usala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modello locale che esegui tu, sempre con le tue chiavi API.

  • Caricata solo quando serve

    Il prompt di sistema contiene solo il nome e la descrizione. Le istruzioni vengono recuperate alla prima richiesta pertinente, quindi una skill inutilizzata non costa nulla.

  • Cambia modello durante la chat

    Poiché la skill è composta da istruzioni e non da codice, continua a funzionare anche se cambi modello: il nuovo modello legge lo stesso file SKILL.md.

Istruzioni della skill

Questo è il contenuto di SKILL.md che il modello carica. Leggilo prima dell'installazione: una skill è un insieme di istruzioni che il tuo modello seguirà.

MRFoundry: MRI Reconstruction and Quantitative Maps

Do the work with the tested helpers below instead of re-deriving their maths; open only the row you need. Hand-written versions of these steps failed silently in evaluation runs.

Route

TaskUse (scripts/)Read only if needed
Undersampled multi-coil Cartesian: R, offset and ACS from the mask, GRAPPA, CG-SENSE, prewhitening, coil combination, SNR unitsmrfoundry_rawrecon.py: sampling_pattern, grappa_from_mask, sense_combine, prewhitenraw-data checklist
Non-Cartesian (radial, spiral): exact forward model, NUFFT least squares; off-resonance with a field mapmrfoundry_reconlib.py: offres_least_squares, smooth_fieldraw-data checklist
Water-fat separation, PDFF, R2* (multi-echo GRE, multi-peak fat)fatwater_lib.py: fat_offsets_hz, fit_fat_water, fat_fractionquantitative maps
BART or SigPy pipelines; twix, ISMRMRD, .cfl filesbart_recon.shBART and SigPy
T1, T2, T2*, VFA, dictionaries, multi-echo spin echo with B1 (EPG)qmri_fit.pyquantitative maps
ASL CBF and arrival time, single or multiple delaysqmri_fit.py: asl_pairs_by_delay, slice_delays, asl_effective_efficiency (background suppression), m0_finite_tr, asl_cbf_pcasl, fit_asl_multidelayASL
DCE: signal to concentration, extended Toftsqmri_fit.py: spgr_concentration, fit_toftsDCE
QSM: phase to field, background removal, dipole inversion, reference regionqsm_lib.py: run_pipeline (phase_misfit_fraction < 0.01; --selftest with your acquisition must PASS)QSM
Fixed settings of a fitted model (nuisance values, spectra, fractions)model calibration
One-file standalone entrypointpython .agents/skills/mri-research-workflow/scripts/inline_helpers.py <module.py> <functions> --into <entrypoint.py> copies the tested helpers

Import with sys.path.insert(0, '.agents/skills/mri-reconstruction/scripts'). python <module>.py --api prints the signatures (do not read the sources); scripts/test_<module>.py has worked examples. Never retype a helper into a standalone entrypoint: copy it with inline_helpers.py (a retyped GRAPPA took the wrong acceleration factor from the mask and still gave plausible maps).

Checks that prevent silent errors

  1. Write the conventions down first: axis order and which sample is k = 0, encoding sign (exp(-i2πk·r): ifft2c; exp(+i2πk·r): image_from_kspace(ksp, encoding_sign=+1)), readout oversampling, output grid [y, x], units and time origin of every input. Read protocol values from the file or sidecar.
  2. Validate with an independent forward model: simulate a known asymmetric object or parameter set through your exact sampling and timing (direct_dft_signed, direct_dft, quadrature, analytic signals), then run your pipeline: orientation_check(img, truth) must return ('identity', (0, 0)) and parameters must come back. A round trip through your own transforms cannot reveal a sign, axis or timing error.
  3. Noise: Psi = E[n n^H] from noise samples [coil, samples] (noise_covariance); scale it by noise dwell / imaging dwell (scale_noise_covariance); averaging N acquisitions divides it by N. SNR units: snr_units_image; confirm the real-part noise SD is 1 on a pure-noise or pseudo-replica run, never from low-magnitude pixels of the image.
  4. Choose the reconstruction by simulated error (rank_reconstructions with your sampling and measured noise; metric= the endpoint error when the deliverable is a parameter map): exact data consistency is not image quality; at R >= 3 it keeps or amplifies noise.
  5. Fits: use the stated model and time origin. Multi-echo magnitude at low SNR: combine coils with the SAME phase-preserving weights for every echo (sense_combine), then pass noise_sigma (and n_channels for RSS) to fit_monoexp or fit_dictionary; an RSS log-linear fit overestimates T2 by several percent. Water-fat: fit_fat_water chooses among field-map candidates with a smooth field (voxelwise minima swap water and fat in isolated high-fat regions), then fat_fraction(water_real, fat_real, flip, TR, T1w, T1f, b1). Check map units against expected ranges (finish_check.py --range).
  6. Standalone entrypoints read every protocol value (matrix, coils, acceleration, delays, echo times, field strength, slice timing, frame times, scale factors) from the inputs; run them on a second simulated input with OTHER values (another acceleration, field strength or echo train) before finishing.

Before you finish

python .agents/skills/mri-research-workflow/scripts/finish_check.py --require <every deliverable name> \
    --rerun "python <entrypoint> <documented arguments with {inputs} and {out}>" --inputs <input folder>

Put the entrypoint and all outputs in the folder the task names (the workspace root if none). Fix every FAIL line and rerun the check. Report numbers read back from the saved outputs.

Setup and scope

  • Use the workspace interpreter (.venv/bin/python if present) and -m pip install only missing packages; numpy and scipy cover every helper here. Read the tool setup guide only if an install fails or you need BART, Julia or a GPU toolbox.
  • Ongoing projects with .mrfoundry/INDEX.md: project memory. Citations: reading list; method evidence and claims: evaluation guide.
  • Trained networks: deep-learning-recon. Acquisition design: pulse-sequence-design. Diffusion models: diffusion-mri. Spectroscopy: mri-research (scripts/mrs_lib.py).

File inclusi

Il modello legge questi file quando servono, mentre la skill è caricata. Sono accessibili in sola lettura e non vengono mai eseguiti.

Domande frequenti

Cosa fa la skill IA Mri Reconstruction?

Read before turning MR data into images or parameter maps: raw k-space (Cartesian, radial, spiral, EPI; twix, ISMRMRD, numpy), GRAPPA/SENSE, coil combination, off-resonance correction, BART or SigPy, and T1, T2/EPG, T2*, water-fat (PDFF), ASL, DCE or QSM maps. Prevents silent errors in encoding sign, acceleration pattern, orientation, noise covariance and floor, water- fat swaps, timing origin and units. Ships tested numpy helpers and a finish check. Trained networks: deep-learning-recon; diffusion: diffusion-mri.

Perché usare Mri Reconstruction su TypingMind?

Perché la installi una volta e la usi con qualsiasi modello. Mri Reconstruction è scritta in semplice Markdown anziché in codice specifico di un fornitore, quindi la stessa skill funziona con GPT-5, Claude, Gemini, Grok o un modello locale, e puoi cambiare modello durante la chat senza che la skill smetta di funzionare. TypingMind usa le tue chiavi API, quindi paghi direttamente i fornitori anziché un abbonamento per posto utente, e le tue skill e chat restano nel tuo spazio di archiviazione.

Come installo Mri Reconstruction in TypingMind?

Apri Plugin → Skill → Installa da GitHub in TypingMind e incolla https://github.com/KeWang0622/MRFoundry/tree/main/skills/mri-reconstruction. TypingMind legge il file SKILL.md, include i file associati e installa la skill, che puoi abilitare per ogni singola chat.

Quali modelli IA possono usare Mri Reconstruction?

Qualsiasi modello che colleghi a TypingMind. Le skill IA sono semplici istruzioni in Markdown anziché codice specifico di un fornitore, quindi GPT, Claude, Gemini, Grok e i modelli locali possono tutti caricare questa skill quando una richiesta corrisponde al suo scopo.

Quanti modelli IA posso usare con Mri Reconstruction?

Quanti ne vuoi. Se un modello supporta le skill, puoi usarlo con Mri Reconstruction: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e molti altri, tutti su TypingMind con le tue chiavi API.

La skill IA Mri Reconstruction è gratuita?

Sì. È pubblicata su GitHub da KeWang0622 con licenza MIT. Paghi solo il tuo fornitore IA per i token che usi.

Cosa sono le skill IA?

Una skill IA è un pacchetto di istruzioni riutilizzabili che insegna a un modello IA come svolgere un'attività specifica. Segue il formato aperto Agent Skills: un file SKILL.md con un nome e una descrizione, più eventuali script, template o file di riferimento di cui il modello potrebbe aver bisogno. Il modello legge le istruzioni solo quando la tua richiesta corrisponde alla skill, quindi una skill installata non comporta costi finché non viene usata.

In cosa si differenziano le skill IA dai plugin o dai server MCP?

Un plugin o un server MCP fornisce a un modello nuovi strumenti da richiamare: codice che viene eseguito da qualche parte e restituisce un risultato. Una skill IA, invece, fornisce al modello conoscenze e procedure: come affrontare un'attività, quali passaggi seguire e quali caratteristiche deve avere un buon output. Le skill sono semplici istruzioni in Markdown, quindi non richiedono server, chiavi API né ambienti di esecuzione e funzionano con qualsiasi modello.

Elenco completo

Crea subito il tuo spazio di lavoro AI

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇