Logo di Diffusion Mri

Diffusion Mri

Community
KeWang0622
diffusion-mri

Read before fitting, converting or reporting diffusion-weighted MRI: ADC, DTI/DKI, IVIM, NODDI, compartment or spectrum fractions, tractography and diffusion biomarker studies. Prevents silent errors in b-vector frames and vendor vector files, the b-range for ADC/DTI, units, noise floor and uncalibrated or unstable fraction models. Ships tested numpy helpers (frame conversion, tensor fit, noise floor, calibration, stratified recovery and retest tests). Starts from reconstructed DWI.

Panoramica

AutoreKeWang0622
RepositoryMRFoundry
Nome della skilldiffusion-mri
Stelle
31
Fork
0
File inclusi
7
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.

  • 7 file inclusi

    Script, modelli di documento 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 Diffusion Mri 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/diffusion-mri
  4. Attiva la skill in ogni chat in cui vuoi averla a disposizione.
Plugin → Skill → Nuova 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 nella cartella 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/diffusion-mri .claude/skills/diffusion-mri
Dopo la copia, riavvia Claude Code per caricare la nuova skill.

Usala in TypingMind

Attiva Diffusion Mri 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 Diffusion Mri 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 Diffusion Mri 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: Diffusion MRI

Use the tested numpy helpers; a closed-form log-linear DTI fit needs no toolbox installation. Open only the row you need; python .agents/skills/diffusion-mri/scripts/spectrum_fit.py --api (or gradient_frames.py) lists signatures (do not cat the source).

Route

TaskUse (scripts/)Read only if needed
Gradient tables, frames, DTI/DKI orientation, b-valuesgradient_frames.py: array_from_fsl, fsl_from_world, world_from_array, world_from_lps, bvals_bvecs_from_vectors, fit_tensor_lls, simulate_tensor_signalDWI and DTI
ADC, signal fractions, diffusivity spectra, IVIM-type fitsspectrum_fit.py: background_sigma, floor_correct, adc_fit, fit_weights, fit_fixed_basis, calibrate_basis, fraction_below, stratified_recovery_testmodel calibration
Preprocessing (denoise, Gibbs, topup/eddy), CSD, NODDI, tractography, QSIPrepMRtrix3, FSL, DIPY, AMICOpreprocessing and models
Group comparisons, repeatability, cutoffsmri-research-workflow/scripts/study_stats.pymri-research-workflow

Checks that prevent silent errors

  1. Frames as a rule, then an independent test. FSL bvecs are array-axis components with x negated when det(affine[:3, :3]) > 0; MRtrix3 -grad tables are world coordinates; vendor vector files state their own frame (for example patient LPS) and b-value encoding (b may scale with the squared vector norm). Fit in one declared frame and report orientations in world coordinates. Verify with simulate_tensor_signal: build signals from a known world fibre direction, pass them through YOUR conversion and fit, and confirm the reported direction. A check that reuses your conversion in both directions cannot detect a frame error.
  2. Shells for ADC/DTI come from the study or task, not from a habit. If the task states a single-tensor (Gaussian) signal model, fit every diffusion-weighted volume. For in vivo data with shells above about 1500 s/mm², a conventional ADC/DTI may keep the lower shells (adc_fit(..., bmax=1000)); DKI fits all shells. Never hard-code a b cutoff in an entrypoint that is rerun on other schemes: it can leave fewer than six directions or no volumes at all.
  3. Units: MD and ADC in mm²/s (brain tissue about 0.6e-3 to 1.0e-3, free water about 3e-3 at body temperature) or µm²/ms (x1000); b in s/mm². Check map medians with finish_check.py --range in the units the task asks for.
  4. Fractions and spectra are ill-conditioned: default to a regularized spectrum with the weight chosen on development data; calibrate any fixed basis on pooled development curves (calibrate_basis) and check identifiability; never copy diffusivities from examples, other organs or protocols.
  5. Stratified recovery tests (stratified_recovery_test): truth for each compared group from development fits, a generative model that differs from the fitting basis, the real b-values and noise. Choose settings by the worst group or bin RMSE, then confirm the worst bias and voxelwise stability (retest_tol= reports the fraction of voxels whose estimate changes between two noise realizations). A pooled bias near zero proves nothing about any one tissue.
  6. Noise floor at high b: estimate sigma from background (background_sigma) and correct (floor_correct) or fit a Rician-aware model.
  7. Studies: summarize per subject and session, declare the statistical unit for each endpoint, make every choice on development subjects only, and recompute every reported number from the saved maps.

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> \
    --range <md map>:<low>:<high>      # e.g. 0.0001:0.004 for MD in mm²/s

Setup and scope

  • Use the workspace interpreter (.venv/bin/python if present); numpy and scipy cover the helpers. Install DIPY, MRtrix3 or FSL only for steps that need them; see the tool setup guide if an install fails.
  • Citations: reading list. Project notes (only with .mrfoundry/INDEX.md): project memory.
  • Raw k-space: mri-reconstruction. Acquisition design: pulse-sequence-design. Non-diffusion image analysis: mri-research.

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 Diffusion Mri?

Read before fitting, converting or reporting diffusion-weighted MRI: ADC, DTI/DKI, IVIM, NODDI, compartment or spectrum fractions, tractography and diffusion biomarker studies. Prevents silent errors in b-vector frames and vendor vector files, the b-range for ADC/DTI, units, noise floor and uncalibrated or unstable fraction models. Ships tested numpy helpers (frame conversion, tensor fit, noise floor, calibration, stratified recovery and retest tests). Starts from reconstructed DWI.

Perché usare Diffusion Mri su TypingMind?

Perché la installi una volta e la usi con qualsiasi modello. Diffusion Mri è 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 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 Diffusion Mri in TypingMind?

Apri Plugin → Skill → Installa da GitHub in TypingMind e incolla https://github.com/KeWang0622/MRFoundry/tree/main/skills/diffusion-mri. 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 Diffusion Mri?

Qualsiasi modello che colleghi in 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 Diffusion Mri?

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

La skill IA Diffusion Mri è 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, modelli 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.

Vedi tutti

Crea subito la tua area di lavoro IA

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