Diffusion Mriのロゴ

Diffusion Mri

コミュニティ
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.

概要

公開者KeWang0622
リポジトリMRFoundry
スキル名diffusion-mri
スター
31
フォーク
0
同梱ファイル
7
ライセンスMIT
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 7個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

    KeWang0622がGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキルDiffusion MriをTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/KeWang0622/MRFoundry/tree/main/skills/diffusion-mri
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

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
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでDiffusion Mriを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあると、モデルが自動的にDiffusion Mriを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Diffusion Mriは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、未使用のスキルにはコストがかかりません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

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.

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「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.

TypingMindでDiffusion Mriを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Diffusion Mriはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにDiffusion Mriをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/KeWang0622/MRFoundry/tree/main/skills/diffusion-mriを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

Diffusion Mriを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストが合致したときにこのスキルを読み込めます。

Diffusion Mriは何個のAIモデルで使えますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもDiffusion Mriを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Diffusion Mri」は無料ですか?

はい。KeWang0622がGitHubでMITライセンスの下で公開しています。支払いが必要なのは、利用したトークンに対する、ご自身が契約するAIプロバイダーへの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇