dipy-tool

Extract diffusion MRI metrics from DWI data using DIPY.

78|3|Updated Mar 25, 2026
One-click install
npx skills add https://github.com/CUHK-AIM-Group/NeuroClaw --skill dipy-tool
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dipy-tool
Source: https://github.com/CUHK-AIM-Group/NeuroClaw/tree/main/skills/dipy-tool
Command: npx skills add https://github.com/CUHK-AIM-Group/NeuroClaw --skill dipy-tool

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires dipy, nibabel, numpy, pandas, and includes scripts (resource) components.

What problem does it solve?

Diffusion MRI data processing is complex; this Skill provides a reusable DIPY-based foundation to load DWI data (NIfTI with bvals/bvecs), apply optional masking, fit diffusion tensors, and export diffusion metrics and ROI statistics for analysis.

Core Features & Use Cases

  • Load DWI NIfTI data and corresponding bvals/bvecs with shape validation
  • Generate brain masks via median_otsu or apply a supplied mask
  • Perform tensor fitting to obtain FA, MD, AD, and RD maps and save as NIfTI images
  • Compute atlas/ROI statistics and produce CSV summaries for downstream analysis

Quick Start

Run the DIPY-based tensor metric workflow on a DWI dataset to generate FA, MD, AD, and RD maps alongside ROI statistics.

Frequently Asked Questions about dipy-tool

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I compute FA, MD, AD, and RD maps from DWI NIfTI data using DIPY?

You can compute FA, MD, AD, and RD maps from DWI NIfTI data using DIPY by loading the raw data with corresponding bvals and bvecs, applying optional brain masking, fitting the diffusion tensor model, and saving the resulting metric maps as NIfTI images for downstream analysis.

What is the best way to extract diffusion MRI ROI statistics across multiple subjects?

The best way to extract diffusion MRI ROI statistics across subjects is to fit diffusion tensors to generate metric maps, then compute atlas-based ROI summaries and export the results as CSV files. This ensures reproducible diffusion metrics for neuroimaging research workflows.

Can I apply a custom brain mask instead of automatic masking when fitting diffusion tensors?

Yes, you can apply a supplied custom brain mask when fitting diffusion tensors. If a mask is not provided, the workflow can automatically generate one using the median_otsu method before performing tensor fitting to obtain FA, MD, AD, and RD maps.

What dependencies do I need to process DWI data and export diffusion metrics?

To process DWI data and export diffusion metrics, you need DIPY for diffusion tensor fitting, nibabel for loading NIfTI data, numpy for array operations, and pandas for exporting atlas-based ROI statistics as CSV summaries.

Does DIPY support b-value filtering when loading raw DWI data?

Yes, the workflow supports optional b-value filtering when loading raw DWI data. This allows you to exclude specific gradient directions or shells before brain masking and tensor fitting to ensure accurate FA, MD, AD, and RD metric calculation.

Why do my DWI NIfTI files fail shape validation during diffusion tensor fitting?

DWI NIfTI files fail shape validation when the image dimensions do not align with the provided bvals and bvecs. The workflow performs shape validation upon loading to ensure the DWI data matches the gradient table before applying masking and fitting diffusion tensors.