[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-aws-labs-radiology-preprocessing":3,"mdc-uj6bns-key":50,"related-repo-aws-labs-radiology-preprocessing":2963,"related-org-aws-labs-radiology-preprocessing":3063},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":12,"stars":26,"repoUrl":27,"updatedAt":28,"license":29,"forks":30,"topics":31,"repo":45,"sourceUrl":48,"mdContent":49},"radiology-preprocessing","preprocess radiology MRI and CT images","Structural MRI\u002FCT preprocessing pipeline for radiology workflows covering skull stripping, bias field correction, registration, and intensity normalization. Triggers on skull stripping, bias correction, registration, ANTs, FSL, HD-BET, N4, brain extraction, normalization, FLIRT, FNIRT, SyN, fslreorient2std, MNI registration, T1 preprocessing.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},"aws-labs","AWS Labs","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Faws-labs.png","awslabs",[13,17,20,23],{"name":14,"slug":15,"type":16},"Data Engineering","data-engineering","tag",{"name":18,"slug":19,"type":16},"Healthcare","healthcare",{"name":21,"slug":22,"type":16},"Imaging","imaging",{"name":24,"slug":25,"type":16},"AWS","aws",4,"https:\u002F\u002Fgithub.com\u002Fawslabs\u002Fhcls-agent-skills","2026-07-12T08:38:14.337794",null,0,[32,33,34,35,36,37,38,39,40,41,42,43,44],"agent-skills","agentcore","ai-agents","amazon-quick-desktop","claims-processing","drug-discovery","genomics","healthcare-ai","kiro","life-sciences","medical-imaging","risk-adjustment","strands-agents",{"repoUrl":27,"stars":26,"forks":30,"topics":46,"description":47},[32,33,34,35,36,37,38,39,40,41,42,43,44],"Agent skills for healthcare and life sciences: genomics, imaging, claims, drug discovery, and more. Works with Amazon Quick, Kiro, Amazon AgentCore, AWS Strands SDK, Claude Code, Codex, and any Agent Skills-compatible platform.","https:\u002F\u002Fgithub.com\u002Fawslabs\u002Fhcls-agent-skills\u002Ftree\u002FHEAD\u002Fskills\u002Fradiology-preprocessing","---\nname: radiology-preprocessing\ndescription: Structural MRI\u002FCT preprocessing pipeline for radiology workflows covering skull stripping, bias field correction, registration, and intensity normalization. Triggers on skull stripping, bias correction, registration, ANTs, FSL, HD-BET, N4, brain extraction, normalization, FLIRT, FNIRT, SyN, fslreorient2std, MNI registration, T1 preprocessing.\nusage: Invoke when preprocessing structural MRI\u002FCT data, including skull stripping, bias correction, registration, or intensity normalization.\nversion: 1.0.0\nvalidated_against:\n  date: 2025-01-15\n  packages: {ants: \"2.5\", fsl: \"6.0.7\", hd-bet: \"2.0\"}\ntags: [skill, category:pipeline, medical-imaging, radiology, preprocessing, ants, fsl, hcls]\n---\n\n# Radiology Preprocessing\n\n## Overview\n\nDeterministic commands for preprocessing structural brain MRI (T1w, T2w, FLAIR) and related volumetric radiology data. Covers the canonical pipeline used by most downstream analyses (segmentation, registration studies, deep-learning training): **reorient → bias correction → skull strip → registration → intensity normalization**.\n\nTools used:\n- **HD-BET** — CNN-based brain extraction (state-of-the-art on pathological brains).\n- **FSL** — `bet`, `flirt`, `fnirt`, `fslmaths`, `fslreorient2std`.\n- **ANTs** — `N4BiasFieldCorrection`, `antsRegistrationSyNQuick.sh`, `antsApplyTransforms`.\n- **FreeSurfer** — `mri_convert` for resampling\u002Fformat conversion.\n\nAll commands operate on NIfTI (`.nii` \u002F `.nii.gz`). Run in a POSIX shell with the respective tool on `PATH`.\n\n## Usage\n\n### Standard T1w preprocessing pipeline\n\nRun these steps in order on a single subject volume:\n\n```bash\n# 1. Reorient to standard (MNI-style RAS orientation)\nfslreorient2std input.nii.gz reoriented.nii.gz\n\n# 2. N4 bias field correction (BEFORE skull stripping)\nN4BiasFieldCorrection -d 3 \\\n  -i reoriented.nii.gz \\\n  -o [n4.nii.gz,bias_field.nii.gz] \\\n  -s 3 \\\n  -c [50x50x30x20,1e-6] \\\n  -b [300]\n\n# 3. Skull strip with HD-BET\nhd-bet -i n4.nii.gz -o brain.nii.gz -device 0 -mode fast -tta 0\n# CPU fallback (slower, no CUDA required): -device cpu\n\n# 4. Register to MNI152 template (SyN nonlinear)\nantsRegistrationSyNQuick.sh -d 3 \\\n  -f $FSLDIR\u002Fdata\u002Fstandard\u002FMNI152_T1_1mm_brain.nii.gz \\\n  -m brain.nii.gz \\\n  -o sub2mni_ \\\n  -t s\n\n# 5. Z-score intensity normalization within brain mask\nfslmaths brain.nii.gz -mas brain_mask.nii.gz brain_masked.nii.gz\nMEAN=$(fslstats brain_masked.nii.gz -k brain_mask.nii.gz -M)\nSTD=$(fslstats brain_masked.nii.gz -k brain_mask.nii.gz -S)\nfslmaths brain_masked.nii.gz -sub $MEAN -div $STD -mas brain_mask.nii.gz brain_zscore.nii.gz\n```\n\nHD-BET writes `brain.nii.gz` and `brain_mask.nii.gz` (mask has `_mask` suffix by default).\n\n### GPU acceleration\n\nHD-BET defaults to GPU; use `-device 0` for first CUDA device. `-mode fast -tta 0` disables test-time augmentation for ~5x speedup with minimal quality loss.\n\n```bash\nhd-bet -i n4.nii.gz -o brain.nii.gz -device 0\n```\n\n\n## Response Format\n\n- Lead with the command or code the user needs — explain after\n- Structure as: confirm inputs → working code → key parameters explained → gotchas\n- One complete working example per task; do not show every alternative\n- Keep code comments minimal and functional (what, not why-it-exists)\n- Target: 50-100 lines of code with brief surrounding explanation\n\nDo not narrate the pipeline ordering rationale or preprocessing theory unless explicitly asked — produce the correct commands in sequence with brief parameter justification.\n\n## Core Concepts\n\n### 1. Skull stripping (brain extraction)\n\n**HD-BET** (preferred — robust to pathology):\n```bash\nhd-bet -i input.nii.gz -o output_bet.nii.gz -device cpu -mode fast -tta 0\n```\n\n**FSL BET** (fallback, classical):\n```bash\nbet input.nii.gz output_bet.nii.gz -R -f 0.3 -g 0\n```\n- `-R`: robust centre-of-gravity estimation.\n- `-f 0.3`: fractional intensity threshold (lower = larger brain mask).\n- `-g 0`: vertical gradient in threshold.\n\n### 2. Bias field correction — N4 (ANTs)\n\nCorrect low-frequency intensity inhomogeneity from RF coil \u002F B1 field. **Always run before skull stripping** — the bias field estimate is better with the skull in place, and a skull-stripped input produces artifacts near the brain boundary.\n\n```bash\nN4BiasFieldCorrection -d 3 \\\n  -i input.nii.gz \\\n  -o [corrected.nii.gz,bias_field.nii.gz] \\\n  -s 3 \\\n  -c [50x50x30x20,1e-6] \\\n  -b [300]\n```\n- `-d 3`: 3D image.\n- `-s 3`: shrink factor (speedup).\n- `-c [50x50x30x20,1e-6]`: max iterations per level + convergence threshold.\n- `-b [300]`: B-spline mesh resolution (mm).\n\n### 3. Registration — ANTs\n\n`antsRegistrationSyNQuick.sh` is the sensible default wrapper.\n\n```bash\n# Rigid (6 DOF) — same subject, different timepoint\u002Fmodality\nantsRegistrationSyNQuick.sh -d 3 -f fixed.nii.gz -m moving.nii.gz -o output_ -t r\n\n# Affine (12 DOF) — cross-subject coarse alignment\nantsRegistrationSyNQuick.sh -d 3 -f fixed.nii.gz -m moving.nii.gz -o output_ -t a\n\n# SyN (nonlinear) — atlas \u002F MNI registration\nantsRegistrationSyNQuick.sh -d 3 -f fixed.nii.gz -m moving.nii.gz -o output_ -t s\n```\n\nOutputs (for `-t s`):\n- `output_0GenericAffine.mat` — affine transform.\n- `output_1Warp.nii.gz` \u002F `output_1InverseWarp.nii.gz` — displacement fields.\n- `output_Warped.nii.gz` — moving resampled into fixed space.\n\nApply the saved transform to another image (e.g., a segmentation):\n```bash\n# For intensity images — Linear interpolation\nantsApplyTransforms -d 3 \\\n  -i input.nii.gz \\\n  -r reference.nii.gz \\\n  -o output.nii.gz \\\n  -t output_1Warp.nii.gz \\\n  -t output_0GenericAffine.mat\n\n# For label maps — NearestNeighbor interpolation\nantsApplyTransforms -d 3 \\\n  -i labels.nii.gz \\\n  -r reference.nii.gz \\\n  -o labels_in_ref.nii.gz \\\n  -n NearestNeighbor \\\n  -t output_1Warp.nii.gz \\\n  -t output_0GenericAffine.mat\n```\n\n**ANTs applies transforms in reverse order**: the last `-t` is applied first. For moving→fixed, the affine is applied before the warp, so the CLI order is `-t warp -t affine`.\n\n### 4. Registration — FSL FLIRT + FNIRT\n\nLinear (affine):\n```bash\nflirt -in moving.nii.gz -ref fixed.nii.gz \\\n  -out output.nii.gz -omat affine.mat -dof 12\n```\n\nNonlinear (requires affine init):\n```bash\nfnirt --in=moving.nii.gz \\\n  --ref=$FSLDIR\u002Fdata\u002Fstandard\u002FMNI152_T1_1mm.nii.gz \\\n  --aff=affine.mat \\\n  --cout=warp \\\n  --iout=output.nii.gz\n```\n\nApply warp to another image:\n```bash\napplywarp -i input.nii.gz -r MNI152_T1_1mm.nii.gz -w warp -o output.nii.gz\n# For labels:\napplywarp -i labels.nii.gz -r MNI152_T1_1mm.nii.gz -w warp -o labels_mni.nii.gz --interp=nn\n```\n\n### 5. Intensity normalization\n\nNeeded before most ML models — raw MRI intensities are arbitrary units and vary across scanners\u002Fsessions.\n\n**Z-score within brain mask** (most common):\n```bash\nMEAN=$(fslstats brain.nii.gz -k brain_mask.nii.gz -M)\nSTD=$(fslstats brain.nii.gz -k brain_mask.nii.gz -S)\nfslmaths brain.nii.gz -sub $MEAN -div $STD -mas brain_mask.nii.gz zscore.nii.gz\n```\n\n**White matter normalization** (scanner-invariant):\n1. Segment WM with FSL FAST or FreeSurfer.\n2. Compute mean intensity inside WM mask: `fslstats brain.nii.gz -k wm_mask.nii.gz -M`.\n3. Divide volume by that mean.\n\n**Histogram matching** — match the intensity histogram to a reference subject:\n- ANTs: `ImageMath 3 out.nii.gz HistogramMatch moving.nii.gz reference.nii.gz`.\n- SimpleITK: `sitk.HistogramMatchingImageFilter()`.\n\n### 6. Resampling\n\nFreeSurfer (preferred for isotropic resampling):\n```bash\nmri_convert --voxel-size 1 1 1 input.nii.gz output_1mm.nii.gz\n```\n\nFSL:\n```bash\nflirt -in input.nii.gz -ref input.nii.gz -applyisoxfm 1 -out output_1mm.nii.gz\n# For labels use: -interp nearestneighbour\n```\n\n### Standard pipeline order\n\n```\nreorient (fslreorient2std)\n  → N4 bias correction\n  → skull strip (HD-BET)\n  → registration (ANTs SyN or FSL FNIRT)\n  → intensity normalization (z-score \u002F WM)\n```\n\nResampling to isotropic 1 mm is usually done either at reorient time (if input is anisotropic) or implicitly by registration to a 1 mm template.\n\n## Quick Reference\n\n| Task | Command |\n| --- | --- |\n| Reorient to standard | `fslreorient2std in.nii.gz out.nii.gz` |\n| N4 bias correction | `N4BiasFieldCorrection -d 3 -i in.nii.gz -o [out.nii.gz,bias.nii.gz] -s 3 -c [50x50x30x20,1e-6] -b [300]` |\n| Skull strip (HD-BET) | `hd-bet -i in.nii.gz -o brain.nii.gz -device cpu -mode fast -tta 0` |\n| Skull strip (BET) | `bet in.nii.gz brain.nii.gz -R -f 0.3 -g 0` |\n| Rigid register (ANTs) | `antsRegistrationSyNQuick.sh -d 3 -f fix.nii.gz -m mov.nii.gz -o out_ -t r` |\n| Affine register (ANTs) | `antsRegistrationSyNQuick.sh -d 3 -f fix.nii.gz -m mov.nii.gz -o out_ -t a` |\n| SyN register (ANTs) | `antsRegistrationSyNQuick.sh -d 3 -f fix.nii.gz -m mov.nii.gz -o out_ -t s` |\n| Apply ANTs transform (image) | `antsApplyTransforms -d 3 -i in.nii.gz -r ref.nii.gz -o out.nii.gz -t out_1Warp.nii.gz -t out_0GenericAffine.mat` |\n| Apply ANTs transform (labels) | Add `-n NearestNeighbor` |\n| FLIRT affine | `flirt -in mov.nii.gz -ref fix.nii.gz -out out.nii.gz -omat aff.mat -dof 12` |\n| FNIRT nonlinear | `fnirt --in=mov.nii.gz --ref=MNI152_T1_1mm.nii.gz --aff=aff.mat --cout=warp --iout=out.nii.gz` |\n| Z-score normalize | `fslmaths in.nii.gz -sub $MEAN -div $STD -mas mask.nii.gz out.nii.gz` |\n| Histogram match (ANTs) | `ImageMath 3 out.nii.gz HistogramMatch mov.nii.gz ref.nii.gz` |\n| Resample isotropic 1 mm | `mri_convert --voxel-size 1 1 1 in.nii.gz out.nii.gz` |\n\n### Standard templates (FSL)\n- `$FSLDIR\u002Fdata\u002Fstandard\u002FMNI152_T1_1mm.nii.gz` — whole-head.\n- `$FSLDIR\u002Fdata\u002Fstandard\u002FMNI152_T1_1mm_brain.nii.gz` — brain-only.\n- `$FSLDIR\u002Fdata\u002Fstandard\u002FMNI152_T1_2mm_brain.nii.gz` — 2 mm for faster registration.\n\n## Common Mistakes\n\n- **Wrong:** Running skull stripping before bias field correction\n  **Right:** Always run N4 bias correction first, then skull strip\n  **Why:** Bias field estimation needs the full field of view including skull\u002Fneck to fit a smooth B-spline; N4 on an already-stripped brain introduces edge artifacts and leaves residual inhomogeneity\n\n- **Wrong:** Using linear\u002Ftrilinear interpolation when resampling label maps\n  **Right:** Use `NearestNeighbor` (ANTs: `-n NearestNeighbor`; FSL: `--interp=nn`) for any discrete label volume\n  **Why:** Linear interpolation on integer segmentation labels produces meaningless fractional values and destroys class boundaries\n\n- **Wrong:** Specifying ANTs transforms in forward CLI order (affine then warp)\n  **Right:** Use `-t output_1Warp.nii.gz -t output_0GenericAffine.mat` — warp first in CLI, affine second\n  **Why:** `antsApplyTransforms` composes in reverse CLI order (last `-t` applied first); reversing them silently produces misregistered output\n\n- **Wrong:** Registering each longitudinal timepoint independently to MNI\n  **Right:** Build a subject-specific midpoint template, register each timepoint to it, then register the midpoint once to MNI\n  **Why:** Independent registration introduces asymmetric interpolation bias that corrupts longitudinal measurements (e.g., atrophy)\n\n- **Wrong:** Skipping reorientation at the start of the pipeline\n  **Right:** Always run `fslreorient2std` first on inputs from different scanners\u002Fvendors\n  **Why:** Inconsistent storage orientations cause downstream tools to misinterpret coordinate frames\n\n- **Wrong:** Computing z-score normalization over the full volume including background\n  **Right:** Compute mean\u002Fstd within the brain mask only (`fslstats -k brain_mask.nii.gz`)\n  **Why:** Including background zeros drags the mean down and inflates the standard deviation, producing incorrect normalization\n\n## References\n\n- HD-BET: Isensee et al. Hum Brain Mapp 2019, https:\u002F\u002Fdoi.org\u002F10.1002\u002Fhbm.24750\n- ANTs: Avants et al. NeuroImage 2011, https:\u002F\u002Fdoi.org\u002F10.1016\u002Fj.neuroimage.2010.09.025\n- N4 bias correction: Tustison et al. IEEE TMI 2010, https:\u002F\u002Fdoi.org\u002F10.1109\u002FTMI.2010.2046908\n- FSL: Jenkinson et al. NeuroImage 2012, https:\u002F\u002Fdoi.org\u002F10.1016\u002Fj.neuroimage.2011.09.015\n",{"data":51,"body":68},{"name":4,"description":6,"usage":52,"version":53,"validated_against":54,"tags":60},"Invoke when preprocessing structural MRI\u002FCT data, including skull stripping, bias correction, registration, or intensity normalization.","1.0.0",{"date":55,"packages":56},"2025-01-15",{"ants":57,"fsl":58,"hd-bet":59},"2.5","6.0.7","2.0",[61,62,42,63,64,65,66,67],"skill","category:pipeline","radiology","preprocessing","ants","fsl","hcls",{"type":69,"children":70},"root",[71,79,86,100,105,214,242,248,255,260,788,817,823,844,882,888,916,921,927,933,942,998,1008,1054,1090,1096,1108,1198,1245,1251,1261,1454,1467,1510,1515,1749,1774,1780,1785,1853,1858,1935,1940,2045,2051,2056,2066,2183,2193,2219,2229,2256,2262,2267,2308,2313,2369,2375,2385,2390,2396,2664,2670,2706,2712,2902,2908,2957],{"type":72,"tag":73,"props":74,"children":75},"element","h1",{"id":4},[76],{"type":77,"value":78},"text","Radiology Preprocessing",{"type":72,"tag":80,"props":81,"children":83},"h2",{"id":82},"overview",[84],{"type":77,"value":85},"Overview",{"type":72,"tag":87,"props":88,"children":89},"p",{},[90,92,98],{"type":77,"value":91},"Deterministic commands for preprocessing structural brain MRI (T1w, T2w, FLAIR) and related volumetric radiology data. Covers the canonical pipeline used by most downstream analyses (segmentation, registration studies, deep-learning training): ",{"type":72,"tag":93,"props":94,"children":95},"strong",{},[96],{"type":77,"value":97},"reorient → bias correction → skull strip → registration → intensity normalization",{"type":77,"value":99},".",{"type":72,"tag":87,"props":101,"children":102},{},[103],{"type":77,"value":104},"Tools used:",{"type":72,"tag":106,"props":107,"children":108},"ul",{},[109,120,167,197],{"type":72,"tag":110,"props":111,"children":112},"li",{},[113,118],{"type":72,"tag":93,"props":114,"children":115},{},[116],{"type":77,"value":117},"HD-BET",{"type":77,"value":119}," — CNN-based brain extraction (state-of-the-art on pathological brains).",{"type":72,"tag":110,"props":121,"children":122},{},[123,128,130,137,139,145,146,152,153,159,160,166],{"type":72,"tag":93,"props":124,"children":125},{},[126],{"type":77,"value":127},"FSL",{"type":77,"value":129}," — ",{"type":72,"tag":131,"props":132,"children":134},"code",{"className":133},[],[135],{"type":77,"value":136},"bet",{"type":77,"value":138},", ",{"type":72,"tag":131,"props":140,"children":142},{"className":141},[],[143],{"type":77,"value":144},"flirt",{"type":77,"value":138},{"type":72,"tag":131,"props":147,"children":149},{"className":148},[],[150],{"type":77,"value":151},"fnirt",{"type":77,"value":138},{"type":72,"tag":131,"props":154,"children":156},{"className":155},[],[157],{"type":77,"value":158},"fslmaths",{"type":77,"value":138},{"type":72,"tag":131,"props":161,"children":163},{"className":162},[],[164],{"type":77,"value":165},"fslreorient2std",{"type":77,"value":99},{"type":72,"tag":110,"props":168,"children":169},{},[170,175,176,182,183,189,190,196],{"type":72,"tag":93,"props":171,"children":172},{},[173],{"type":77,"value":174},"ANTs",{"type":77,"value":129},{"type":72,"tag":131,"props":177,"children":179},{"className":178},[],[180],{"type":77,"value":181},"N4BiasFieldCorrection",{"type":77,"value":138},{"type":72,"tag":131,"props":184,"children":186},{"className":185},[],[187],{"type":77,"value":188},"antsRegistrationSyNQuick.sh",{"type":77,"value":138},{"type":72,"tag":131,"props":191,"children":193},{"className":192},[],[194],{"type":77,"value":195},"antsApplyTransforms",{"type":77,"value":99},{"type":72,"tag":110,"props":198,"children":199},{},[200,205,206,212],{"type":72,"tag":93,"props":201,"children":202},{},[203],{"type":77,"value":204},"FreeSurfer",{"type":77,"value":129},{"type":72,"tag":131,"props":207,"children":209},{"className":208},[],[210],{"type":77,"value":211},"mri_convert",{"type":77,"value":213}," for resampling\u002Fformat conversion.",{"type":72,"tag":87,"props":215,"children":216},{},[217,219,225,227,233,235,241],{"type":77,"value":218},"All commands operate on NIfTI (",{"type":72,"tag":131,"props":220,"children":222},{"className":221},[],[223],{"type":77,"value":224},".nii",{"type":77,"value":226}," \u002F ",{"type":72,"tag":131,"props":228,"children":230},{"className":229},[],[231],{"type":77,"value":232},".nii.gz",{"type":77,"value":234},"). Run in a POSIX shell with the respective tool on ",{"type":72,"tag":131,"props":236,"children":238},{"className":237},[],[239],{"type":77,"value":240},"PATH",{"type":77,"value":99},{"type":72,"tag":80,"props":243,"children":245},{"id":244},"usage",[246],{"type":77,"value":247},"Usage",{"type":72,"tag":249,"props":250,"children":252},"h3",{"id":251},"standard-t1w-preprocessing-pipeline",[253],{"type":77,"value":254},"Standard T1w preprocessing pipeline",{"type":72,"tag":87,"props":256,"children":257},{},[258],{"type":77,"value":259},"Run these steps in order on a single subject volume:",{"type":72,"tag":261,"props":262,"children":267},"pre",{"className":263,"code":264,"language":265,"meta":266,"style":266},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","# 1. Reorient to standard (MNI-style RAS orientation)\nfslreorient2std input.nii.gz reoriented.nii.gz\n\n# 2. N4 bias field correction (BEFORE skull stripping)\nN4BiasFieldCorrection -d 3 \\\n  -i reoriented.nii.gz \\\n  -o [n4.nii.gz,bias_field.nii.gz] \\\n  -s 3 \\\n  -c [50x50x30x20,1e-6] \\\n  -b [300]\n\n# 3. Skull strip with HD-BET\nhd-bet -i n4.nii.gz -o brain.nii.gz -device 0 -mode fast -tta 0\n# CPU fallback (slower, no CUDA required): -device cpu\n\n# 4. Register to MNI152 template (SyN nonlinear)\nantsRegistrationSyNQuick.sh -d 3 \\\n  -f $FSLDIR\u002Fdata\u002Fstandard\u002FMNI152_T1_1mm_brain.nii.gz \\\n  -m brain.nii.gz \\\n  -o sub2mni_ \\\n  -t s\n\n# 5. Z-score intensity normalization within brain mask\nfslmaths brain.nii.gz -mas brain_mask.nii.gz brain_masked.nii.gz\nMEAN=$(fslstats brain_masked.nii.gz -k brain_mask.nii.gz -M)\nSTD=$(fslstats brain_masked.nii.gz -k brain_mask.nii.gz -S)\nfslmaths brain_masked.nii.gz -sub $MEAN -div $STD -mas brain_mask.nii.gz brain_zscore.nii.gz\n","bash","",[268],{"type":72,"tag":131,"props":269,"children":270},{"__ignoreMap":266},[271,283,303,313,321,346,364,378,395,409,423,431,440,499,508,516,525,545,568,585,602,616,624,633,660,704,742],{"type":72,"tag":272,"props":273,"children":276},"span",{"class":274,"line":275},"line",1,[277],{"type":72,"tag":272,"props":278,"children":280},{"style":279},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[281],{"type":77,"value":282},"# 1. Reorient to standard (MNI-style RAS orientation)\n",{"type":72,"tag":272,"props":284,"children":286},{"class":274,"line":285},2,[287,292,298],{"type":72,"tag":272,"props":288,"children":290},{"style":289},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[291],{"type":77,"value":165},{"type":72,"tag":272,"props":293,"children":295},{"style":294},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[296],{"type":77,"value":297}," input.nii.gz",{"type":72,"tag":272,"props":299,"children":300},{"style":294},[301],{"type":77,"value":302}," reoriented.nii.gz\n",{"type":72,"tag":272,"props":304,"children":306},{"class":274,"line":305},3,[307],{"type":72,"tag":272,"props":308,"children":310},{"emptyLinePlaceholder":309},true,[311],{"type":77,"value":312},"\n",{"type":72,"tag":272,"props":314,"children":315},{"class":274,"line":26},[316],{"type":72,"tag":272,"props":317,"children":318},{"style":279},[319],{"type":77,"value":320},"# 2. N4 bias field correction (BEFORE skull stripping)\n",{"type":72,"tag":272,"props":322,"children":324},{"class":274,"line":323},5,[325,329,334,340],{"type":72,"tag":272,"props":326,"children":327},{"style":289},[328],{"type":77,"value":181},{"type":72,"tag":272,"props":330,"children":331},{"style":294},[332],{"type":77,"value":333}," -d",{"type":72,"tag":272,"props":335,"children":337},{"style":336},"--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C",[338],{"type":77,"value":339}," 3",{"type":72,"tag":272,"props":341,"children":343},{"style":342},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[344],{"type":77,"value":345}," \\\n",{"type":72,"tag":272,"props":347,"children":349},{"class":274,"line":348},6,[350,355,360],{"type":72,"tag":272,"props":351,"children":352},{"style":294},[353],{"type":77,"value":354},"  -i",{"type":72,"tag":272,"props":356,"children":357},{"style":294},[358],{"type":77,"value":359}," reoriented.nii.gz",{"type":72,"tag":272,"props":361,"children":362},{"style":342},[363],{"type":77,"value":345},{"type":72,"tag":272,"props":365,"children":367},{"class":274,"line":366},7,[368,373],{"type":72,"tag":272,"props":369,"children":370},{"style":294},[371],{"type":77,"value":372},"  -o",{"type":72,"tag":272,"props":374,"children":375},{"style":342},[376],{"type":77,"value":377}," [n4.nii.gz,bias_field.nii.gz] \\\n",{"type":72,"tag":272,"props":379,"children":381},{"class":274,"line":380},8,[382,387,391],{"type":72,"tag":272,"props":383,"children":384},{"style":289},[385],{"type":77,"value":386},"  -s",{"type":72,"tag":272,"props":388,"children":389},{"style":336},[390],{"type":77,"value":339},{"type":72,"tag":272,"props":392,"children":393},{"style":342},[394],{"type":77,"value":345},{"type":72,"tag":272,"props":396,"children":398},{"class":274,"line":397},9,[399,404],{"type":72,"tag":272,"props":400,"children":401},{"style":294},[402],{"type":77,"value":403},"  -c",{"type":72,"tag":272,"props":405,"children":406},{"style":342},[407],{"type":77,"value":408}," [50x50x30x20,1e-6] \\\n",{"type":72,"tag":272,"props":410,"children":412},{"class":274,"line":411},10,[413,418],{"type":72,"tag":272,"props":414,"children":415},{"style":289},[416],{"type":77,"value":417},"  -b",{"type":72,"tag":272,"props":419,"children":420},{"style":342},[421],{"type":77,"value":422}," [300]\n",{"type":72,"tag":272,"props":424,"children":426},{"class":274,"line":425},11,[427],{"type":72,"tag":272,"props":428,"children":429},{"emptyLinePlaceholder":309},[430],{"type":77,"value":312},{"type":72,"tag":272,"props":432,"children":434},{"class":274,"line":433},12,[435],{"type":72,"tag":272,"props":436,"children":437},{"style":279},[438],{"type":77,"value":439},"# 3. Skull strip with HD-BET\n",{"type":72,"tag":272,"props":441,"children":443},{"class":274,"line":442},13,[444,449,454,459,464,469,474,479,484,489,494],{"type":72,"tag":272,"props":445,"children":446},{"style":289},[447],{"type":77,"value":448},"hd-bet",{"type":72,"tag":272,"props":450,"children":451},{"style":294},[452],{"type":77,"value":453}," -i",{"type":72,"tag":272,"props":455,"children":456},{"style":294},[457],{"type":77,"value":458}," n4.nii.gz",{"type":72,"tag":272,"props":460,"children":461},{"style":294},[462],{"type":77,"value":463}," -o",{"type":72,"tag":272,"props":465,"children":466},{"style":294},[467],{"type":77,"value":468}," brain.nii.gz",{"type":72,"tag":272,"props":470,"children":471},{"style":294},[472],{"type":77,"value":473}," -device",{"type":72,"tag":272,"props":475,"children":476},{"style":336},[477],{"type":77,"value":478}," 0",{"type":72,"tag":272,"props":480,"children":481},{"style":294},[482],{"type":77,"value":483}," -mode",{"type":72,"tag":272,"props":485,"children":486},{"style":294},[487],{"type":77,"value":488}," fast",{"type":72,"tag":272,"props":490,"children":491},{"style":294},[492],{"type":77,"value":493}," -tta",{"type":72,"tag":272,"props":495,"children":496},{"style":336},[497],{"type":77,"value":498}," 0\n",{"type":72,"tag":272,"props":500,"children":502},{"class":274,"line":501},14,[503],{"type":72,"tag":272,"props":504,"children":505},{"style":279},[506],{"type":77,"value":507},"# CPU fallback (slower, no CUDA required): -device cpu\n",{"type":72,"tag":272,"props":509,"children":511},{"class":274,"line":510},15,[512],{"type":72,"tag":272,"props":513,"children":514},{"emptyLinePlaceholder":309},[515],{"type":77,"value":312},{"type":72,"tag":272,"props":517,"children":519},{"class":274,"line":518},16,[520],{"type":72,"tag":272,"props":521,"children":522},{"style":279},[523],{"type":77,"value":524},"# 4. Register to MNI152 template (SyN nonlinear)\n",{"type":72,"tag":272,"props":526,"children":528},{"class":274,"line":527},17,[529,533,537,541],{"type":72,"tag":272,"props":530,"children":531},{"style":289},[532],{"type":77,"value":188},{"type":72,"tag":272,"props":534,"children":535},{"style":294},[536],{"type":77,"value":333},{"type":72,"tag":272,"props":538,"children":539},{"style":336},[540],{"type":77,"value":339},{"type":72,"tag":272,"props":542,"children":543},{"style":342},[544],{"type":77,"value":345},{"type":72,"tag":272,"props":546,"children":548},{"class":274,"line":547},18,[549,554,559,564],{"type":72,"tag":272,"props":550,"children":551},{"style":294},[552],{"type":77,"value":553},"  -f",{"type":72,"tag":272,"props":555,"children":556},{"style":342},[557],{"type":77,"value":558}," $FSLDIR",{"type":72,"tag":272,"props":560,"children":561},{"style":294},[562],{"type":77,"value":563},"\u002Fdata\u002Fstandard\u002FMNI152_T1_1mm_brain.nii.gz",{"type":72,"tag":272,"props":565,"children":566},{"style":342},[567],{"type":77,"value":345},{"type":72,"tag":272,"props":569,"children":571},{"class":274,"line":570},19,[572,577,581],{"type":72,"tag":272,"props":573,"children":574},{"style":294},[575],{"type":77,"value":576},"  -m",{"type":72,"tag":272,"props":578,"children":579},{"style":294},[580],{"type":77,"value":468},{"type":72,"tag":272,"props":582,"children":583},{"style":342},[584],{"type":77,"value":345},{"type":72,"tag":272,"props":586,"children":588},{"class":274,"line":587},20,[589,593,598],{"type":72,"tag":272,"props":590,"children":591},{"style":294},[592],{"type":77,"value":372},{"type":72,"tag":272,"props":594,"children":595},{"style":294},[596],{"type":77,"value":597}," sub2mni_",{"type":72,"tag":272,"props":599,"children":600},{"style":342},[601],{"type":77,"value":345},{"type":72,"tag":272,"props":603,"children":605},{"class":274,"line":604},21,[606,611],{"type":72,"tag":272,"props":607,"children":608},{"style":294},[609],{"type":77,"value":610},"  -t",{"type":72,"tag":272,"props":612,"children":613},{"style":294},[614],{"type":77,"value":615}," s\n",{"type":72,"tag":272,"props":617,"children":619},{"class":274,"line":618},22,[620],{"type":72,"tag":272,"props":621,"children":622},{"emptyLinePlaceholder":309},[623],{"type":77,"value":312},{"type":72,"tag":272,"props":625,"children":627},{"class":274,"line":626},23,[628],{"type":72,"tag":272,"props":629,"children":630},{"style":279},[631],{"type":77,"value":632},"# 5. Z-score intensity normalization within brain mask\n",{"type":72,"tag":272,"props":634,"children":636},{"class":274,"line":635},24,[637,641,645,650,655],{"type":72,"tag":272,"props":638,"children":639},{"style":289},[640],{"type":77,"value":158},{"type":72,"tag":272,"props":642,"children":643},{"style":294},[644],{"type":77,"value":468},{"type":72,"tag":272,"props":646,"children":647},{"style":294},[648],{"type":77,"value":649}," -mas",{"type":72,"tag":272,"props":651,"children":652},{"style":294},[653],{"type":77,"value":654}," brain_mask.nii.gz",{"type":72,"tag":272,"props":656,"children":657},{"style":294},[658],{"type":77,"value":659}," brain_masked.nii.gz\n",{"type":72,"tag":272,"props":661,"children":663},{"class":274,"line":662},25,[664,669,675,680,685,690,694,699],{"type":72,"tag":272,"props":665,"children":666},{"style":342},[667],{"type":77,"value":668},"MEAN",{"type":72,"tag":272,"props":670,"children":672},{"style":671},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[673],{"type":77,"value":674},"=$(",{"type":72,"tag":272,"props":676,"children":677},{"style":289},[678],{"type":77,"value":679},"fslstats",{"type":72,"tag":272,"props":681,"children":682},{"style":294},[683],{"type":77,"value":684}," brain_masked.nii.gz",{"type":72,"tag":272,"props":686,"children":687},{"style":294},[688],{"type":77,"value":689}," -k",{"type":72,"tag":272,"props":691,"children":692},{"style":294},[693],{"type":77,"value":654},{"type":72,"tag":272,"props":695,"children":696},{"style":294},[697],{"type":77,"value":698}," -M",{"type":72,"tag":272,"props":700,"children":701},{"style":671},[702],{"type":77,"value":703},")\n",{"type":72,"tag":272,"props":705,"children":707},{"class":274,"line":706},26,[708,713,717,721,725,729,733,738],{"type":72,"tag":272,"props":709,"children":710},{"style":342},[711],{"type":77,"value":712},"STD",{"type":72,"tag":272,"props":714,"children":715},{"style":671},[716],{"type":77,"value":674},{"type":72,"tag":272,"props":718,"children":719},{"style":289},[720],{"type":77,"value":679},{"type":72,"tag":272,"props":722,"children":723},{"style":294},[724],{"type":77,"value":684},{"type":72,"tag":272,"props":726,"children":727},{"style":294},[728],{"type":77,"value":689},{"type":72,"tag":272,"props":730,"children":731},{"style":294},[732],{"type":77,"value":654},{"type":72,"tag":272,"props":734,"children":735},{"style":294},[736],{"type":77,"value":737}," -S",{"type":72,"tag":272,"props":739,"children":740},{"style":671},[741],{"type":77,"value":703},{"type":72,"tag":272,"props":743,"children":745},{"class":274,"line":744},27,[746,750,754,759,764,769,774,779,783],{"type":72,"tag":272,"props":747,"children":748},{"style":289},[749],{"type":77,"value":158},{"type":72,"tag":272,"props":751,"children":752},{"style":294},[753],{"type":77,"value":684},{"type":72,"tag":272,"props":755,"children":756},{"style":294},[757],{"type":77,"value":758}," -sub",{"type":72,"tag":272,"props":760,"children":761},{"style":342},[762],{"type":77,"value":763}," $MEAN ",{"type":72,"tag":272,"props":765,"children":766},{"style":294},[767],{"type":77,"value":768},"-div",{"type":72,"tag":272,"props":770,"children":771},{"style":342},[772],{"type":77,"value":773}," $STD ",{"type":72,"tag":272,"props":775,"children":776},{"style":294},[777],{"type":77,"value":778},"-mas",{"type":72,"tag":272,"props":780,"children":781},{"style":294},[782],{"type":77,"value":654},{"type":72,"tag":272,"props":784,"children":785},{"style":294},[786],{"type":77,"value":787}," brain_zscore.nii.gz\n",{"type":72,"tag":87,"props":789,"children":790},{},[791,793,799,801,807,809,815],{"type":77,"value":792},"HD-BET writes ",{"type":72,"tag":131,"props":794,"children":796},{"className":795},[],[797],{"type":77,"value":798},"brain.nii.gz",{"type":77,"value":800}," and ",{"type":72,"tag":131,"props":802,"children":804},{"className":803},[],[805],{"type":77,"value":806},"brain_mask.nii.gz",{"type":77,"value":808}," (mask has ",{"type":72,"tag":131,"props":810,"children":812},{"className":811},[],[813],{"type":77,"value":814},"_mask",{"type":77,"value":816}," suffix by default).",{"type":72,"tag":249,"props":818,"children":820},{"id":819},"gpu-acceleration",[821],{"type":77,"value":822},"GPU acceleration",{"type":72,"tag":87,"props":824,"children":825},{},[826,828,834,836,842],{"type":77,"value":827},"HD-BET defaults to GPU; use ",{"type":72,"tag":131,"props":829,"children":831},{"className":830},[],[832],{"type":77,"value":833},"-device 0",{"type":77,"value":835}," for first CUDA device. ",{"type":72,"tag":131,"props":837,"children":839},{"className":838},[],[840],{"type":77,"value":841},"-mode fast -tta 0",{"type":77,"value":843}," disables test-time augmentation for ~5x speedup with minimal quality loss.",{"type":72,"tag":261,"props":845,"children":847},{"className":263,"code":846,"language":265,"meta":266,"style":266},"hd-bet -i n4.nii.gz -o brain.nii.gz -device 0\n",[848],{"type":72,"tag":131,"props":849,"children":850},{"__ignoreMap":266},[851],{"type":72,"tag":272,"props":852,"children":853},{"class":274,"line":275},[854,858,862,866,870,874,878],{"type":72,"tag":272,"props":855,"children":856},{"style":289},[857],{"type":77,"value":448},{"type":72,"tag":272,"props":859,"children":860},{"style":294},[861],{"type":77,"value":453},{"type":72,"tag":272,"props":863,"children":864},{"style":294},[865],{"type":77,"value":458},{"type":72,"tag":272,"props":867,"children":868},{"style":294},[869],{"type":77,"value":463},{"type":72,"tag":272,"props":871,"children":872},{"style":294},[873],{"type":77,"value":468},{"type":72,"tag":272,"props":875,"children":876},{"style":294},[877],{"type":77,"value":473},{"type":72,"tag":272,"props":879,"children":880},{"style":336},[881],{"type":77,"value":498},{"type":72,"tag":80,"props":883,"children":885},{"id":884},"response-format",[886],{"type":77,"value":887},"Response Format",{"type":72,"tag":106,"props":889,"children":890},{},[891,896,901,906,911],{"type":72,"tag":110,"props":892,"children":893},{},[894],{"type":77,"value":895},"Lead with the command or code the user needs — explain after",{"type":72,"tag":110,"props":897,"children":898},{},[899],{"type":77,"value":900},"Structure as: confirm inputs → working code → key parameters explained → gotchas",{"type":72,"tag":110,"props":902,"children":903},{},[904],{"type":77,"value":905},"One complete working example per task; do not show every alternative",{"type":72,"tag":110,"props":907,"children":908},{},[909],{"type":77,"value":910},"Keep code comments minimal and functional (what, not why-it-exists)",{"type":72,"tag":110,"props":912,"children":913},{},[914],{"type":77,"value":915},"Target: 50-100 lines of code with brief surrounding explanation",{"type":72,"tag":87,"props":917,"children":918},{},[919],{"type":77,"value":920},"Do not narrate the pipeline ordering rationale or preprocessing theory unless explicitly asked — produce the correct commands in sequence with brief parameter justification.",{"type":72,"tag":80,"props":922,"children":924},{"id":923},"core-concepts",[925],{"type":77,"value":926},"Core Concepts",{"type":72,"tag":249,"props":928,"children":930},{"id":929},"_1-skull-stripping-brain-extraction",[931],{"type":77,"value":932},"1. Skull stripping (brain extraction)",{"type":72,"tag":87,"props":934,"children":935},{},[936,940],{"type":72,"tag":93,"props":937,"children":938},{},[939],{"type":77,"value":117},{"type":77,"value":941}," (preferred — robust to pathology):",{"type":72,"tag":261,"props":943,"children":945},{"className":263,"code":944,"language":265,"meta":266,"style":266},"hd-bet -i input.nii.gz -o output_bet.nii.gz -device cpu -mode fast -tta 0\n",[946],{"type":72,"tag":131,"props":947,"children":948},{"__ignoreMap":266},[949],{"type":72,"tag":272,"props":950,"children":951},{"class":274,"line":275},[952,956,960,964,968,973,977,982,986,990,994],{"type":72,"tag":272,"props":953,"children":954},{"style":289},[955],{"type":77,"value":448},{"type":72,"tag":272,"props":957,"children":958},{"style":294},[959],{"type":77,"value":453},{"type":72,"tag":272,"props":961,"children":962},{"style":294},[963],{"type":77,"value":297},{"type":72,"tag":272,"props":965,"children":966},{"style":294},[967],{"type":77,"value":463},{"type":72,"tag":272,"props":969,"children":970},{"style":294},[971],{"type":77,"value":972}," output_bet.nii.gz",{"type":72,"tag":272,"props":974,"children":975},{"style":294},[976],{"type":77,"value":473},{"type":72,"tag":272,"props":978,"children":979},{"style":294},[980],{"type":77,"value":981}," cpu",{"type":72,"tag":272,"props":983,"children":984},{"style":294},[985],{"type":77,"value":483},{"type":72,"tag":272,"props":987,"children":988},{"style":294},[989],{"type":77,"value":488},{"type":72,"tag":272,"props":991,"children":992},{"style":294},[993],{"type":77,"value":493},{"type":72,"tag":272,"props":995,"children":996},{"style":336},[997],{"type":77,"value":498},{"type":72,"tag":87,"props":999,"children":1000},{},[1001,1006],{"type":72,"tag":93,"props":1002,"children":1003},{},[1004],{"type":77,"value":1005},"FSL BET",{"type":77,"value":1007}," (fallback, classical):",{"type":72,"tag":261,"props":1009,"children":1011},{"className":263,"code":1010,"language":265,"meta":266,"style":266},"bet input.nii.gz output_bet.nii.gz -R -f 0.3 -g 0\n",[1012],{"type":72,"tag":131,"props":1013,"children":1014},{"__ignoreMap":266},[1015],{"type":72,"tag":272,"props":1016,"children":1017},{"class":274,"line":275},[1018,1022,1026,1030,1035,1040,1045,1050],{"type":72,"tag":272,"props":1019,"children":1020},{"style":289},[1021],{"type":77,"value":136},{"type":72,"tag":272,"props":1023,"children":1024},{"style":294},[1025],{"type":77,"value":297},{"type":72,"tag":272,"props":1027,"children":1028},{"style":294},[1029],{"type":77,"value":972},{"type":72,"tag":272,"props":1031,"children":1032},{"style":294},[1033],{"type":77,"value":1034}," -R",{"type":72,"tag":272,"props":1036,"children":1037},{"style":294},[1038],{"type":77,"value":1039}," -f",{"type":72,"tag":272,"props":1041,"children":1042},{"style":336},[1043],{"type":77,"value":1044}," 0.3",{"type":72,"tag":272,"props":1046,"children":1047},{"style":294},[1048],{"type":77,"value":1049}," -g",{"type":72,"tag":272,"props":1051,"children":1052},{"style":336},[1053],{"type":77,"value":498},{"type":72,"tag":106,"props":1055,"children":1056},{},[1057,1068,1079],{"type":72,"tag":110,"props":1058,"children":1059},{},[1060,1066],{"type":72,"tag":131,"props":1061,"children":1063},{"className":1062},[],[1064],{"type":77,"value":1065},"-R",{"type":77,"value":1067},": robust centre-of-gravity estimation.",{"type":72,"tag":110,"props":1069,"children":1070},{},[1071,1077],{"type":72,"tag":131,"props":1072,"children":1074},{"className":1073},[],[1075],{"type":77,"value":1076},"-f 0.3",{"type":77,"value":1078},": fractional intensity threshold (lower = larger brain mask).",{"type":72,"tag":110,"props":1080,"children":1081},{},[1082,1088],{"type":72,"tag":131,"props":1083,"children":1085},{"className":1084},[],[1086],{"type":77,"value":1087},"-g 0",{"type":77,"value":1089},": vertical gradient in threshold.",{"type":72,"tag":249,"props":1091,"children":1093},{"id":1092},"_2-bias-field-correction-n4-ants",[1094],{"type":77,"value":1095},"2. Bias field correction — N4 (ANTs)",{"type":72,"tag":87,"props":1097,"children":1098},{},[1099,1101,1106],{"type":77,"value":1100},"Correct low-frequency intensity inhomogeneity from RF coil \u002F B1 field. ",{"type":72,"tag":93,"props":1102,"children":1103},{},[1104],{"type":77,"value":1105},"Always run before skull stripping",{"type":77,"value":1107}," — the bias field estimate is better with the skull in place, and a skull-stripped input produces artifacts near the brain boundary.",{"type":72,"tag":261,"props":1109,"children":1111},{"className":263,"code":1110,"language":265,"meta":266,"style":266},"N4BiasFieldCorrection -d 3 \\\n  -i input.nii.gz \\\n  -o [corrected.nii.gz,bias_field.nii.gz] \\\n  -s 3 \\\n  -c [50x50x30x20,1e-6] \\\n  -b [300]\n",[1112],{"type":72,"tag":131,"props":1113,"children":1114},{"__ignoreMap":266},[1115,1134,1149,1161,1176,1187],{"type":72,"tag":272,"props":1116,"children":1117},{"class":274,"line":275},[1118,1122,1126,1130],{"type":72,"tag":272,"props":1119,"children":1120},{"style":289},[1121],{"type":77,"value":181},{"type":72,"tag":272,"props":1123,"children":1124},{"style":294},[1125],{"type":77,"value":333},{"type":72,"tag":272,"props":1127,"children":1128},{"style":336},[1129],{"type":77,"value":339},{"type":72,"tag":272,"props":1131,"children":1132},{"style":342},[1133],{"type":77,"value":345},{"type":72,"tag":272,"props":1135,"children":1136},{"class":274,"line":285},[1137,1141,1145],{"type":72,"tag":272,"props":1138,"children":1139},{"style":294},[1140],{"type":77,"value":354},{"type":72,"tag":272,"props":1142,"children":1143},{"style":294},[1144],{"type":77,"value":297},{"type":72,"tag":272,"props":1146,"children":1147},{"style":342},[1148],{"type":77,"value":345},{"type":72,"tag":272,"props":1150,"children":1151},{"class":274,"line":305},[1152,1156],{"type":72,"tag":272,"props":1153,"children":1154},{"style":294},[1155],{"type":77,"value":372},{"type":72,"tag":272,"props":1157,"children":1158},{"style":342},[1159],{"type":77,"value":1160}," [corrected.nii.gz,bias_field.nii.gz] \\\n",{"type":72,"tag":272,"props":1162,"children":1163},{"class":274,"line":26},[1164,1168,1172],{"type":72,"tag":272,"props":1165,"children":1166},{"style":289},[1167],{"type":77,"value":386},{"type":72,"tag":272,"props":1169,"children":1170},{"style":336},[1171],{"type":77,"value":339},{"type":72,"tag":272,"props":1173,"children":1174},{"style":342},[1175],{"type":77,"value":345},{"type":72,"tag":272,"props":1177,"children":1178},{"class":274,"line":323},[1179,1183],{"type":72,"tag":272,"props":1180,"children":1181},{"style":294},[1182],{"type":77,"value":403},{"type":72,"tag":272,"props":1184,"children":1185},{"style":342},[1186],{"type":77,"value":408},{"type":72,"tag":272,"props":1188,"children":1189},{"class":274,"line":348},[1190,1194],{"type":72,"tag":272,"props":1191,"children":1192},{"style":289},[1193],{"type":77,"value":417},{"type":72,"tag":272,"props":1195,"children":1196},{"style":342},[1197],{"type":77,"value":422},{"type":72,"tag":106,"props":1199,"children":1200},{},[1201,1212,1223,1234],{"type":72,"tag":110,"props":1202,"children":1203},{},[1204,1210],{"type":72,"tag":131,"props":1205,"children":1207},{"className":1206},[],[1208],{"type":77,"value":1209},"-d 3",{"type":77,"value":1211},": 3D image.",{"type":72,"tag":110,"props":1213,"children":1214},{},[1215,1221],{"type":72,"tag":131,"props":1216,"children":1218},{"className":1217},[],[1219],{"type":77,"value":1220},"-s 3",{"type":77,"value":1222},": shrink factor (speedup).",{"type":72,"tag":110,"props":1224,"children":1225},{},[1226,1232],{"type":72,"tag":131,"props":1227,"children":1229},{"className":1228},[],[1230],{"type":77,"value":1231},"-c [50x50x30x20,1e-6]",{"type":77,"value":1233},": max iterations per level + convergence threshold.",{"type":72,"tag":110,"props":1235,"children":1236},{},[1237,1243],{"type":72,"tag":131,"props":1238,"children":1240},{"className":1239},[],[1241],{"type":77,"value":1242},"-b [300]",{"type":77,"value":1244},": B-spline mesh resolution (mm).",{"type":72,"tag":249,"props":1246,"children":1248},{"id":1247},"_3-registration-ants",[1249],{"type":77,"value":1250},"3. Registration — ANTs",{"type":72,"tag":87,"props":1252,"children":1253},{},[1254,1259],{"type":72,"tag":131,"props":1255,"children":1257},{"className":1256},[],[1258],{"type":77,"value":188},{"type":77,"value":1260}," is the sensible default wrapper.",{"type":72,"tag":261,"props":1262,"children":1264},{"className":263,"code":1263,"language":265,"meta":266,"style":266},"# Rigid (6 DOF) — same subject, different timepoint\u002Fmodality\nantsRegistrationSyNQuick.sh -d 3 -f fixed.nii.gz -m moving.nii.gz -o output_ -t r\n\n# Affine (12 DOF) — cross-subject coarse alignment\nantsRegistrationSyNQuick.sh -d 3 -f fixed.nii.gz -m moving.nii.gz -o output_ -t a\n\n# SyN (nonlinear) — atlas \u002F MNI registration\nantsRegistrationSyNQuick.sh -d 3 -f fixed.nii.gz -m moving.nii.gz -o output_ -t s\n",[1265],{"type":72,"tag":131,"props":1266,"children":1267},{"__ignoreMap":266},[1268,1276,1329,1336,1344,1392,1399,1407],{"type":72,"tag":272,"props":1269,"children":1270},{"class":274,"line":275},[1271],{"type":72,"tag":272,"props":1272,"children":1273},{"style":279},[1274],{"type":77,"value":1275},"# Rigid (6 DOF) — same subject, different timepoint\u002Fmodality\n",{"type":72,"tag":272,"props":1277,"children":1278},{"class":274,"line":285},[1279,1283,1287,1291,1295,1300,1305,1310,1314,1319,1324],{"type":72,"tag":272,"props":1280,"children":1281},{"style":289},[1282],{"type":77,"value":188},{"type":72,"tag":272,"props":1284,"children":1285},{"style":294},[1286],{"type":77,"value":333},{"type":72,"tag":272,"props":1288,"children":1289},{"style":336},[1290],{"type":77,"value":339},{"type":72,"tag":272,"props":1292,"children":1293},{"style":294},[1294],{"type":77,"value":1039},{"type":72,"tag":272,"props":1296,"children":1297},{"style":294},[1298],{"type":77,"value":1299}," fixed.nii.gz",{"type":72,"tag":272,"props":1301,"children":1302},{"style":294},[1303],{"type":77,"value":1304}," -m",{"type":72,"tag":272,"props":1306,"children":1307},{"style":294},[1308],{"type":77,"value":1309}," moving.nii.gz",{"type":72,"tag":272,"props":1311,"children":1312},{"style":294},[1313],{"type":77,"value":463},{"type":72,"tag":272,"props":1315,"children":1316},{"style":294},[1317],{"type":77,"value":1318}," output_",{"type":72,"tag":272,"props":1320,"children":1321},{"style":294},[1322],{"type":77,"value":1323}," -t",{"type":72,"tag":272,"props":1325,"children":1326},{"style":294},[1327],{"type":77,"value":1328}," r\n",{"type":72,"tag":272,"props":1330,"children":1331},{"class":274,"line":305},[1332],{"type":72,"tag":272,"props":1333,"children":1334},{"emptyLinePlaceholder":309},[1335],{"type":77,"value":312},{"type":72,"tag":272,"props":1337,"children":1338},{"class":274,"line":26},[1339],{"type":72,"tag":272,"props":1340,"children":1341},{"style":279},[1342],{"type":77,"value":1343},"# Affine (12 DOF) — cross-subject coarse alignment\n",{"type":72,"tag":272,"props":1345,"children":1346},{"class":274,"line":323},[1347,1351,1355,1359,1363,1367,1371,1375,1379,1383,1387],{"type":72,"tag":272,"props":1348,"children":1349},{"style":289},[1350],{"type":77,"value":188},{"type":72,"tag":272,"props":1352,"children":1353},{"style":294},[1354],{"type":77,"value":333},{"type":72,"tag":272,"props":1356,"children":1357},{"style":336},[1358],{"type":77,"value":339},{"type":72,"tag":272,"props":1360,"children":1361},{"style":294},[1362],{"type":77,"value":1039},{"type":72,"tag":272,"props":1364,"children":1365},{"style":294},[1366],{"type":77,"value":1299},{"type":72,"tag":272,"props":1368,"children":1369},{"style":294},[1370],{"type":77,"value":1304},{"type":72,"tag":272,"props":1372,"children":1373},{"style":294},[1374],{"type":77,"value":1309},{"type":72,"tag":272,"props":1376,"children":1377},{"style":294},[1378],{"type":77,"value":463},{"type":72,"tag":272,"props":1380,"children":1381},{"style":294},[1382],{"type":77,"value":1318},{"type":72,"tag":272,"props":1384,"children":1385},{"style":294},[1386],{"type":77,"value":1323},{"type":72,"tag":272,"props":1388,"children":1389},{"style":294},[1390],{"type":77,"value":1391}," a\n",{"type":72,"tag":272,"props":1393,"children":1394},{"class":274,"line":348},[1395],{"type":72,"tag":272,"props":1396,"children":1397},{"emptyLinePlaceholder":309},[1398],{"type":77,"value":312},{"type":72,"tag":272,"props":1400,"children":1401},{"class":274,"line":366},[1402],{"type":72,"tag":272,"props":1403,"children":1404},{"style":279},[1405],{"type":77,"value":1406},"# SyN (nonlinear) — atlas \u002F MNI registration\n",{"type":72,"tag":272,"props":1408,"children":1409},{"class":274,"line":380},[1410,1414,1418,1422,1426,1430,1434,1438,1442,1446,1450],{"type":72,"tag":272,"props":1411,"children":1412},{"style":289},[1413],{"type":77,"value":188},{"type":72,"tag":272,"props":1415,"children":1416},{"style":294},[1417],{"type":77,"value":333},{"type":72,"tag":272,"props":1419,"children":1420},{"style":336},[1421],{"type":77,"value":339},{"type":72,"tag":272,"props":1423,"children":1424},{"style":294},[1425],{"type":77,"value":1039},{"type":72,"tag":272,"props":1427,"children":1428},{"style":294},[1429],{"type":77,"value":1299},{"type":72,"tag":272,"props":1431,"children":1432},{"style":294},[1433],{"type":77,"value":1304},{"type":72,"tag":272,"props":1435,"children":1436},{"style":294},[1437],{"type":77,"value":1309},{"type":72,"tag":272,"props":1439,"children":1440},{"style":294},[1441],{"type":77,"value":463},{"type":72,"tag":272,"props":1443,"children":1444},{"style":294},[1445],{"type":77,"value":1318},{"type":72,"tag":272,"props":1447,"children":1448},{"style":294},[1449],{"type":77,"value":1323},{"type":72,"tag":272,"props":1451,"children":1452},{"style":294},[1453],{"type":77,"value":615},{"type":72,"tag":87,"props":1455,"children":1456},{},[1457,1459,1465],{"type":77,"value":1458},"Outputs (for ",{"type":72,"tag":131,"props":1460,"children":1462},{"className":1461},[],[1463],{"type":77,"value":1464},"-t s",{"type":77,"value":1466},"):",{"type":72,"tag":106,"props":1468,"children":1469},{},[1470,1481,1499],{"type":72,"tag":110,"props":1471,"children":1472},{},[1473,1479],{"type":72,"tag":131,"props":1474,"children":1476},{"className":1475},[],[1477],{"type":77,"value":1478},"output_0GenericAffine.mat",{"type":77,"value":1480}," — affine transform.",{"type":72,"tag":110,"props":1482,"children":1483},{},[1484,1490,1491,1497],{"type":72,"tag":131,"props":1485,"children":1487},{"className":1486},[],[1488],{"type":77,"value":1489},"output_1Warp.nii.gz",{"type":77,"value":226},{"type":72,"tag":131,"props":1492,"children":1494},{"className":1493},[],[1495],{"type":77,"value":1496},"output_1InverseWarp.nii.gz",{"type":77,"value":1498}," — displacement fields.",{"type":72,"tag":110,"props":1500,"children":1501},{},[1502,1508],{"type":72,"tag":131,"props":1503,"children":1505},{"className":1504},[],[1506],{"type":77,"value":1507},"output_Warped.nii.gz",{"type":77,"value":1509}," — moving resampled into fixed space.",{"type":72,"tag":87,"props":1511,"children":1512},{},[1513],{"type":77,"value":1514},"Apply the saved transform to another image (e.g., a segmentation):",{"type":72,"tag":261,"props":1516,"children":1518},{"className":263,"code":1517,"language":265,"meta":266,"style":266},"# For intensity images — Linear interpolation\nantsApplyTransforms -d 3 \\\n  -i input.nii.gz \\\n  -r reference.nii.gz \\\n  -o output.nii.gz \\\n  -t output_1Warp.nii.gz \\\n  -t output_0GenericAffine.mat\n\n# For label maps — NearestNeighbor interpolation\nantsApplyTransforms -d 3 \\\n  -i labels.nii.gz \\\n  -r reference.nii.gz \\\n  -o labels_in_ref.nii.gz \\\n  -n NearestNeighbor \\\n  -t output_1Warp.nii.gz \\\n  -t output_0GenericAffine.mat\n",[1519],{"type":72,"tag":131,"props":1520,"children":1521},{"__ignoreMap":266},[1522,1530,1549,1564,1581,1597,1613,1625,1632,1640,1659,1675,1690,1706,1723,1738],{"type":72,"tag":272,"props":1523,"children":1524},{"class":274,"line":275},[1525],{"type":72,"tag":272,"props":1526,"children":1527},{"style":279},[1528],{"type":77,"value":1529},"# For intensity images — Linear interpolation\n",{"type":72,"tag":272,"props":1531,"children":1532},{"class":274,"line":285},[1533,1537,1541,1545],{"type":72,"tag":272,"props":1534,"children":1535},{"style":289},[1536],{"type":77,"value":195},{"type":72,"tag":272,"props":1538,"children":1539},{"style":294},[1540],{"type":77,"value":333},{"type":72,"tag":272,"props":1542,"children":1543},{"style":336},[1544],{"type":77,"value":339},{"type":72,"tag":272,"props":1546,"children":1547},{"style":342},[1548],{"type":77,"value":345},{"type":72,"tag":272,"props":1550,"children":1551},{"class":274,"line":305},[1552,1556,1560],{"type":72,"tag":272,"props":1553,"children":1554},{"style":294},[1555],{"type":77,"value":354},{"type":72,"tag":272,"props":1557,"children":1558},{"style":294},[1559],{"type":77,"value":297},{"type":72,"tag":272,"props":1561,"children":1562},{"style":342},[1563],{"type":77,"value":345},{"type":72,"tag":272,"props":1565,"children":1566},{"class":274,"line":26},[1567,1572,1577],{"type":72,"tag":272,"props":1568,"children":1569},{"style":294},[1570],{"type":77,"value":1571},"  -r",{"type":72,"tag":272,"props":1573,"children":1574},{"style":294},[1575],{"type":77,"value":1576}," reference.nii.gz",{"type":72,"tag":272,"props":1578,"children":1579},{"style":342},[1580],{"type":77,"value":345},{"type":72,"tag":272,"props":1582,"children":1583},{"class":274,"line":323},[1584,1588,1593],{"type":72,"tag":272,"props":1585,"children":1586},{"style":294},[1587],{"type":77,"value":372},{"type":72,"tag":272,"props":1589,"children":1590},{"style":294},[1591],{"type":77,"value":1592}," output.nii.gz",{"type":72,"tag":272,"props":1594,"children":1595},{"style":342},[1596],{"type":77,"value":345},{"type":72,"tag":272,"props":1598,"children":1599},{"class":274,"line":348},[1600,1604,1609],{"type":72,"tag":272,"props":1601,"children":1602},{"style":294},[1603],{"type":77,"value":610},{"type":72,"tag":272,"props":1605,"children":1606},{"style":294},[1607],{"type":77,"value":1608}," output_1Warp.nii.gz",{"type":72,"tag":272,"props":1610,"children":1611},{"style":342},[1612],{"type":77,"value":345},{"type":72,"tag":272,"props":1614,"children":1615},{"class":274,"line":366},[1616,1620],{"type":72,"tag":272,"props":1617,"children":1618},{"style":294},[1619],{"type":77,"value":610},{"type":72,"tag":272,"props":1621,"children":1622},{"style":294},[1623],{"type":77,"value":1624}," output_0GenericAffine.mat\n",{"type":72,"tag":272,"props":1626,"children":1627},{"class":274,"line":380},[1628],{"type":72,"tag":272,"props":1629,"children":1630},{"emptyLinePlaceholder":309},[1631],{"type":77,"value":312},{"type":72,"tag":272,"props":1633,"children":1634},{"class":274,"line":397},[1635],{"type":72,"tag":272,"props":1636,"children":1637},{"style":279},[1638],{"type":77,"value":1639},"# For label maps — NearestNeighbor interpolation\n",{"type":72,"tag":272,"props":1641,"children":1642},{"class":274,"line":411},[1643,1647,1651,1655],{"type":72,"tag":272,"props":1644,"children":1645},{"style":289},[1646],{"type":77,"value":195},{"type":72,"tag":272,"props":1648,"children":1649},{"style":294},[1650],{"type":77,"value":333},{"type":72,"tag":272,"props":1652,"children":1653},{"style":336},[1654],{"type":77,"value":339},{"type":72,"tag":272,"props":1656,"children":1657},{"style":342},[1658],{"type":77,"value":345},{"type":72,"tag":272,"props":1660,"children":1661},{"class":274,"line":425},[1662,1666,1671],{"type":72,"tag":272,"props":1663,"children":1664},{"style":294},[1665],{"type":77,"value":354},{"type":72,"tag":272,"props":1667,"children":1668},{"style":294},[1669],{"type":77,"value":1670}," labels.nii.gz",{"type":72,"tag":272,"props":1672,"children":1673},{"style":342},[1674],{"type":77,"value":345},{"type":72,"tag":272,"props":1676,"children":1677},{"class":274,"line":433},[1678,1682,1686],{"type":72,"tag":272,"props":1679,"children":1680},{"style":294},[1681],{"type":77,"value":1571},{"type":72,"tag":272,"props":1683,"children":1684},{"style":294},[1685],{"type":77,"value":1576},{"type":72,"tag":272,"props":1687,"children":1688},{"style":342},[1689],{"type":77,"value":345},{"type":72,"tag":272,"props":1691,"children":1692},{"class":274,"line":442},[1693,1697,1702],{"type":72,"tag":272,"props":1694,"children":1695},{"style":294},[1696],{"type":77,"value":372},{"type":72,"tag":272,"props":1698,"children":1699},{"style":294},[1700],{"type":77,"value":1701}," labels_in_ref.nii.gz",{"type":72,"tag":272,"props":1703,"children":1704},{"style":342},[1705],{"type":77,"value":345},{"type":72,"tag":272,"props":1707,"children":1708},{"class":274,"line":501},[1709,1714,1719],{"type":72,"tag":272,"props":1710,"children":1711},{"style":294},[1712],{"type":77,"value":1713},"  -n",{"type":72,"tag":272,"props":1715,"children":1716},{"style":294},[1717],{"type":77,"value":1718}," NearestNeighbor",{"type":72,"tag":272,"props":1720,"children":1721},{"style":342},[1722],{"type":77,"value":345},{"type":72,"tag":272,"props":1724,"children":1725},{"class":274,"line":510},[1726,1730,1734],{"type":72,"tag":272,"props":1727,"children":1728},{"style":294},[1729],{"type":77,"value":610},{"type":72,"tag":272,"props":1731,"children":1732},{"style":294},[1733],{"type":77,"value":1608},{"type":72,"tag":272,"props":1735,"children":1736},{"style":342},[1737],{"type":77,"value":345},{"type":72,"tag":272,"props":1739,"children":1740},{"class":274,"line":518},[1741,1745],{"type":72,"tag":272,"props":1742,"children":1743},{"style":294},[1744],{"type":77,"value":610},{"type":72,"tag":272,"props":1746,"children":1747},{"style":294},[1748],{"type":77,"value":1624},{"type":72,"tag":87,"props":1750,"children":1751},{},[1752,1757,1759,1765,1767,1773],{"type":72,"tag":93,"props":1753,"children":1754},{},[1755],{"type":77,"value":1756},"ANTs applies transforms in reverse order",{"type":77,"value":1758},": the last ",{"type":72,"tag":131,"props":1760,"children":1762},{"className":1761},[],[1763],{"type":77,"value":1764},"-t",{"type":77,"value":1766}," is applied first. For moving→fixed, the affine is applied before the warp, so the CLI order is ",{"type":72,"tag":131,"props":1768,"children":1770},{"className":1769},[],[1771],{"type":77,"value":1772},"-t warp -t affine",{"type":77,"value":99},{"type":72,"tag":249,"props":1775,"children":1777},{"id":1776},"_4-registration-fsl-flirt-fnirt",[1778],{"type":77,"value":1779},"4. Registration — FSL FLIRT + FNIRT",{"type":72,"tag":87,"props":1781,"children":1782},{},[1783],{"type":77,"value":1784},"Linear (affine):",{"type":72,"tag":261,"props":1786,"children":1788},{"className":263,"code":1787,"language":265,"meta":266,"style":266},"flirt -in moving.nii.gz -ref fixed.nii.gz \\\n  -out output.nii.gz -omat affine.mat -dof 12\n",[1789],{"type":72,"tag":131,"props":1790,"children":1791},{"__ignoreMap":266},[1792,1821],{"type":72,"tag":272,"props":1793,"children":1794},{"class":274,"line":275},[1795,1799,1804,1808,1813,1817],{"type":72,"tag":272,"props":1796,"children":1797},{"style":289},[1798],{"type":77,"value":144},{"type":72,"tag":272,"props":1800,"children":1801},{"style":294},[1802],{"type":77,"value":1803}," -in",{"type":72,"tag":272,"props":1805,"children":1806},{"style":294},[1807],{"type":77,"value":1309},{"type":72,"tag":272,"props":1809,"children":1810},{"style":294},[1811],{"type":77,"value":1812}," -ref",{"type":72,"tag":272,"props":1814,"children":1815},{"style":294},[1816],{"type":77,"value":1299},{"type":72,"tag":272,"props":1818,"children":1819},{"style":342},[1820],{"type":77,"value":345},{"type":72,"tag":272,"props":1822,"children":1823},{"class":274,"line":285},[1824,1829,1833,1838,1843,1848],{"type":72,"tag":272,"props":1825,"children":1826},{"style":294},[1827],{"type":77,"value":1828},"  -out",{"type":72,"tag":272,"props":1830,"children":1831},{"style":294},[1832],{"type":77,"value":1592},{"type":72,"tag":272,"props":1834,"children":1835},{"style":294},[1836],{"type":77,"value":1837}," -omat",{"type":72,"tag":272,"props":1839,"children":1840},{"style":294},[1841],{"type":77,"value":1842}," affine.mat",{"type":72,"tag":272,"props":1844,"children":1845},{"style":294},[1846],{"type":77,"value":1847}," -dof",{"type":72,"tag":272,"props":1849,"children":1850},{"style":336},[1851],{"type":77,"value":1852}," 12\n",{"type":72,"tag":87,"props":1854,"children":1855},{},[1856],{"type":77,"value":1857},"Nonlinear (requires affine init):",{"type":72,"tag":261,"props":1859,"children":1861},{"className":263,"code":1860,"language":265,"meta":266,"style":266},"fnirt --in=moving.nii.gz \\\n  --ref=$FSLDIR\u002Fdata\u002Fstandard\u002FMNI152_T1_1mm.nii.gz \\\n  --aff=affine.mat \\\n  --cout=warp \\\n  --iout=output.nii.gz\n",[1862],{"type":72,"tag":131,"props":1863,"children":1864},{"__ignoreMap":266},[1865,1881,1903,1915,1927],{"type":72,"tag":272,"props":1866,"children":1867},{"class":274,"line":275},[1868,1872,1877],{"type":72,"tag":272,"props":1869,"children":1870},{"style":289},[1871],{"type":77,"value":151},{"type":72,"tag":272,"props":1873,"children":1874},{"style":294},[1875],{"type":77,"value":1876}," --in=moving.nii.gz",{"type":72,"tag":272,"props":1878,"children":1879},{"style":342},[1880],{"type":77,"value":345},{"type":72,"tag":272,"props":1882,"children":1883},{"class":274,"line":285},[1884,1889,1894,1899],{"type":72,"tag":272,"props":1885,"children":1886},{"style":294},[1887],{"type":77,"value":1888},"  --ref=",{"type":72,"tag":272,"props":1890,"children":1891},{"style":342},[1892],{"type":77,"value":1893},"$FSLDIR",{"type":72,"tag":272,"props":1895,"children":1896},{"style":294},[1897],{"type":77,"value":1898},"\u002Fdata\u002Fstandard\u002FMNI152_T1_1mm.nii.gz",{"type":72,"tag":272,"props":1900,"children":1901},{"style":342},[1902],{"type":77,"value":345},{"type":72,"tag":272,"props":1904,"children":1905},{"class":274,"line":305},[1906,1911],{"type":72,"tag":272,"props":1907,"children":1908},{"style":294},[1909],{"type":77,"value":1910},"  --aff=affine.mat",{"type":72,"tag":272,"props":1912,"children":1913},{"style":342},[1914],{"type":77,"value":345},{"type":72,"tag":272,"props":1916,"children":1917},{"class":274,"line":26},[1918,1923],{"type":72,"tag":272,"props":1919,"children":1920},{"style":294},[1921],{"type":77,"value":1922},"  --cout=warp",{"type":72,"tag":272,"props":1924,"children":1925},{"style":342},[1926],{"type":77,"value":345},{"type":72,"tag":272,"props":1928,"children":1929},{"class":274,"line":323},[1930],{"type":72,"tag":272,"props":1931,"children":1932},{"style":294},[1933],{"type":77,"value":1934},"  --iout=output.nii.gz\n",{"type":72,"tag":87,"props":1936,"children":1937},{},[1938],{"type":77,"value":1939},"Apply warp to another image:",{"type":72,"tag":261,"props":1941,"children":1943},{"className":263,"code":1942,"language":265,"meta":266,"style":266},"applywarp -i input.nii.gz -r MNI152_T1_1mm.nii.gz -w warp -o output.nii.gz\n# For labels:\napplywarp -i labels.nii.gz -r MNI152_T1_1mm.nii.gz -w warp -o labels_mni.nii.gz --interp=nn\n",[1944],{"type":72,"tag":131,"props":1945,"children":1946},{"__ignoreMap":266},[1947,1992,2000],{"type":72,"tag":272,"props":1948,"children":1949},{"class":274,"line":275},[1950,1955,1959,1963,1968,1973,1978,1983,1987],{"type":72,"tag":272,"props":1951,"children":1952},{"style":289},[1953],{"type":77,"value":1954},"applywarp",{"type":72,"tag":272,"props":1956,"children":1957},{"style":294},[1958],{"type":77,"value":453},{"type":72,"tag":272,"props":1960,"children":1961},{"style":294},[1962],{"type":77,"value":297},{"type":72,"tag":272,"props":1964,"children":1965},{"style":294},[1966],{"type":77,"value":1967}," -r",{"type":72,"tag":272,"props":1969,"children":1970},{"style":294},[1971],{"type":77,"value":1972}," MNI152_T1_1mm.nii.gz",{"type":72,"tag":272,"props":1974,"children":1975},{"style":294},[1976],{"type":77,"value":1977}," -w",{"type":72,"tag":272,"props":1979,"children":1980},{"style":294},[1981],{"type":77,"value":1982}," warp",{"type":72,"tag":272,"props":1984,"children":1985},{"style":294},[1986],{"type":77,"value":463},{"type":72,"tag":272,"props":1988,"children":1989},{"style":294},[1990],{"type":77,"value":1991}," output.nii.gz\n",{"type":72,"tag":272,"props":1993,"children":1994},{"class":274,"line":285},[1995],{"type":72,"tag":272,"props":1996,"children":1997},{"style":279},[1998],{"type":77,"value":1999},"# For labels:\n",{"type":72,"tag":272,"props":2001,"children":2002},{"class":274,"line":305},[2003,2007,2011,2015,2019,2023,2027,2031,2035,2040],{"type":72,"tag":272,"props":2004,"children":2005},{"style":289},[2006],{"type":77,"value":1954},{"type":72,"tag":272,"props":2008,"children":2009},{"style":294},[2010],{"type":77,"value":453},{"type":72,"tag":272,"props":2012,"children":2013},{"style":294},[2014],{"type":77,"value":1670},{"type":72,"tag":272,"props":2016,"children":2017},{"style":294},[2018],{"type":77,"value":1967},{"type":72,"tag":272,"props":2020,"children":2021},{"style":294},[2022],{"type":77,"value":1972},{"type":72,"tag":272,"props":2024,"children":2025},{"style":294},[2026],{"type":77,"value":1977},{"type":72,"tag":272,"props":2028,"children":2029},{"style":294},[2030],{"type":77,"value":1982},{"type":72,"tag":272,"props":2032,"children":2033},{"style":294},[2034],{"type":77,"value":463},{"type":72,"tag":272,"props":2036,"children":2037},{"style":294},[2038],{"type":77,"value":2039}," labels_mni.nii.gz",{"type":72,"tag":272,"props":2041,"children":2042},{"style":294},[2043],{"type":77,"value":2044}," --interp=nn\n",{"type":72,"tag":249,"props":2046,"children":2048},{"id":2047},"_5-intensity-normalization",[2049],{"type":77,"value":2050},"5. Intensity normalization",{"type":72,"tag":87,"props":2052,"children":2053},{},[2054],{"type":77,"value":2055},"Needed before most ML models — raw MRI intensities are arbitrary units and vary across scanners\u002Fsessions.",{"type":72,"tag":87,"props":2057,"children":2058},{},[2059,2064],{"type":72,"tag":93,"props":2060,"children":2061},{},[2062],{"type":77,"value":2063},"Z-score within brain mask",{"type":77,"value":2065}," (most common):",{"type":72,"tag":261,"props":2067,"children":2069},{"className":263,"code":2068,"language":265,"meta":266,"style":266},"MEAN=$(fslstats brain.nii.gz -k brain_mask.nii.gz -M)\nSTD=$(fslstats brain.nii.gz -k brain_mask.nii.gz -S)\nfslmaths brain.nii.gz -sub $MEAN -div $STD -mas brain_mask.nii.gz zscore.nii.gz\n",[2070],{"type":72,"tag":131,"props":2071,"children":2072},{"__ignoreMap":266},[2073,2108,2143],{"type":72,"tag":272,"props":2074,"children":2075},{"class":274,"line":275},[2076,2080,2084,2088,2092,2096,2100,2104],{"type":72,"tag":272,"props":2077,"children":2078},{"style":342},[2079],{"type":77,"value":668},{"type":72,"tag":272,"props":2081,"children":2082},{"style":671},[2083],{"type":77,"value":674},{"type":72,"tag":272,"props":2085,"children":2086},{"style":289},[2087],{"type":77,"value":679},{"type":72,"tag":272,"props":2089,"children":2090},{"style":294},[2091],{"type":77,"value":468},{"type":72,"tag":272,"props":2093,"children":2094},{"style":294},[2095],{"type":77,"value":689},{"type":72,"tag":272,"props":2097,"children":2098},{"style":294},[2099],{"type":77,"value":654},{"type":72,"tag":272,"props":2101,"children":2102},{"style":294},[2103],{"type":77,"value":698},{"type":72,"tag":272,"props":2105,"children":2106},{"style":671},[2107],{"type":77,"value":703},{"type":72,"tag":272,"props":2109,"children":2110},{"class":274,"line":285},[2111,2115,2119,2123,2127,2131,2135,2139],{"type":72,"tag":272,"props":2112,"children":2113},{"style":342},[2114],{"type":77,"value":712},{"type":72,"tag":272,"props":2116,"children":2117},{"style":671},[2118],{"type":77,"value":674},{"type":72,"tag":272,"props":2120,"children":2121},{"style":289},[2122],{"type":77,"value":679},{"type":72,"tag":272,"props":2124,"children":2125},{"style":294},[2126],{"type":77,"value":468},{"type":72,"tag":272,"props":2128,"children":2129},{"style":294},[2130],{"type":77,"value":689},{"type":72,"tag":272,"props":2132,"children":2133},{"style":294},[2134],{"type":77,"value":654},{"type":72,"tag":272,"props":2136,"children":2137},{"style":294},[2138],{"type":77,"value":737},{"type":72,"tag":272,"props":2140,"children":2141},{"style":671},[2142],{"type":77,"value":703},{"type":72,"tag":272,"props":2144,"children":2145},{"class":274,"line":305},[2146,2150,2154,2158,2162,2166,2170,2174,2178],{"type":72,"tag":272,"props":2147,"children":2148},{"style":289},[2149],{"type":77,"value":158},{"type":72,"tag":272,"props":2151,"children":2152},{"style":294},[2153],{"type":77,"value":468},{"type":72,"tag":272,"props":2155,"children":2156},{"style":294},[2157],{"type":77,"value":758},{"type":72,"tag":272,"props":2159,"children":2160},{"style":342},[2161],{"type":77,"value":763},{"type":72,"tag":272,"props":2163,"children":2164},{"style":294},[2165],{"type":77,"value":768},{"type":72,"tag":272,"props":2167,"children":2168},{"style":342},[2169],{"type":77,"value":773},{"type":72,"tag":272,"props":2171,"children":2172},{"style":294},[2173],{"type":77,"value":778},{"type":72,"tag":272,"props":2175,"children":2176},{"style":294},[2177],{"type":77,"value":654},{"type":72,"tag":272,"props":2179,"children":2180},{"style":294},[2181],{"type":77,"value":2182}," zscore.nii.gz\n",{"type":72,"tag":87,"props":2184,"children":2185},{},[2186,2191],{"type":72,"tag":93,"props":2187,"children":2188},{},[2189],{"type":77,"value":2190},"White matter normalization",{"type":77,"value":2192}," (scanner-invariant):",{"type":72,"tag":2194,"props":2195,"children":2196},"ol",{},[2197,2202,2214],{"type":72,"tag":110,"props":2198,"children":2199},{},[2200],{"type":77,"value":2201},"Segment WM with FSL FAST or FreeSurfer.",{"type":72,"tag":110,"props":2203,"children":2204},{},[2205,2207,2213],{"type":77,"value":2206},"Compute mean intensity inside WM mask: ",{"type":72,"tag":131,"props":2208,"children":2210},{"className":2209},[],[2211],{"type":77,"value":2212},"fslstats brain.nii.gz -k wm_mask.nii.gz -M",{"type":77,"value":99},{"type":72,"tag":110,"props":2215,"children":2216},{},[2217],{"type":77,"value":2218},"Divide volume by that mean.",{"type":72,"tag":87,"props":2220,"children":2221},{},[2222,2227],{"type":72,"tag":93,"props":2223,"children":2224},{},[2225],{"type":77,"value":2226},"Histogram matching",{"type":77,"value":2228}," — match the intensity histogram to a reference subject:",{"type":72,"tag":106,"props":2230,"children":2231},{},[2232,2244],{"type":72,"tag":110,"props":2233,"children":2234},{},[2235,2237,2243],{"type":77,"value":2236},"ANTs: ",{"type":72,"tag":131,"props":2238,"children":2240},{"className":2239},[],[2241],{"type":77,"value":2242},"ImageMath 3 out.nii.gz HistogramMatch moving.nii.gz reference.nii.gz",{"type":77,"value":99},{"type":72,"tag":110,"props":2245,"children":2246},{},[2247,2249,2255],{"type":77,"value":2248},"SimpleITK: ",{"type":72,"tag":131,"props":2250,"children":2252},{"className":2251},[],[2253],{"type":77,"value":2254},"sitk.HistogramMatchingImageFilter()",{"type":77,"value":99},{"type":72,"tag":249,"props":2257,"children":2259},{"id":2258},"_6-resampling",[2260],{"type":77,"value":2261},"6. Resampling",{"type":72,"tag":87,"props":2263,"children":2264},{},[2265],{"type":77,"value":2266},"FreeSurfer (preferred for isotropic resampling):",{"type":72,"tag":261,"props":2268,"children":2270},{"className":263,"code":2269,"language":265,"meta":266,"style":266},"mri_convert --voxel-size 1 1 1 input.nii.gz output_1mm.nii.gz\n",[2271],{"type":72,"tag":131,"props":2272,"children":2273},{"__ignoreMap":266},[2274],{"type":72,"tag":272,"props":2275,"children":2276},{"class":274,"line":275},[2277,2281,2286,2291,2295,2299,2303],{"type":72,"tag":272,"props":2278,"children":2279},{"style":289},[2280],{"type":77,"value":211},{"type":72,"tag":272,"props":2282,"children":2283},{"style":294},[2284],{"type":77,"value":2285}," --voxel-size",{"type":72,"tag":272,"props":2287,"children":2288},{"style":336},[2289],{"type":77,"value":2290}," 1",{"type":72,"tag":272,"props":2292,"children":2293},{"style":336},[2294],{"type":77,"value":2290},{"type":72,"tag":272,"props":2296,"children":2297},{"style":336},[2298],{"type":77,"value":2290},{"type":72,"tag":272,"props":2300,"children":2301},{"style":294},[2302],{"type":77,"value":297},{"type":72,"tag":272,"props":2304,"children":2305},{"style":294},[2306],{"type":77,"value":2307}," output_1mm.nii.gz\n",{"type":72,"tag":87,"props":2309,"children":2310},{},[2311],{"type":77,"value":2312},"FSL:",{"type":72,"tag":261,"props":2314,"children":2316},{"className":263,"code":2315,"language":265,"meta":266,"style":266},"flirt -in input.nii.gz -ref input.nii.gz -applyisoxfm 1 -out output_1mm.nii.gz\n# For labels use: -interp nearestneighbour\n",[2317],{"type":72,"tag":131,"props":2318,"children":2319},{"__ignoreMap":266},[2320,2361],{"type":72,"tag":272,"props":2321,"children":2322},{"class":274,"line":275},[2323,2327,2331,2335,2339,2343,2348,2352,2357],{"type":72,"tag":272,"props":2324,"children":2325},{"style":289},[2326],{"type":77,"value":144},{"type":72,"tag":272,"props":2328,"children":2329},{"style":294},[2330],{"type":77,"value":1803},{"type":72,"tag":272,"props":2332,"children":2333},{"style":294},[2334],{"type":77,"value":297},{"type":72,"tag":272,"props":2336,"children":2337},{"style":294},[2338],{"type":77,"value":1812},{"type":72,"tag":272,"props":2340,"children":2341},{"style":294},[2342],{"type":77,"value":297},{"type":72,"tag":272,"props":2344,"children":2345},{"style":294},[2346],{"type":77,"value":2347}," -applyisoxfm",{"type":72,"tag":272,"props":2349,"children":2350},{"style":336},[2351],{"type":77,"value":2290},{"type":72,"tag":272,"props":2353,"children":2354},{"style":294},[2355],{"type":77,"value":2356}," -out",{"type":72,"tag":272,"props":2358,"children":2359},{"style":294},[2360],{"type":77,"value":2307},{"type":72,"tag":272,"props":2362,"children":2363},{"class":274,"line":285},[2364],{"type":72,"tag":272,"props":2365,"children":2366},{"style":279},[2367],{"type":77,"value":2368},"# For labels use: -interp nearestneighbour\n",{"type":72,"tag":249,"props":2370,"children":2372},{"id":2371},"standard-pipeline-order",[2373],{"type":77,"value":2374},"Standard pipeline order",{"type":72,"tag":261,"props":2376,"children":2380},{"className":2377,"code":2379,"language":77},[2378],"language-text","reorient (fslreorient2std)\n  → N4 bias correction\n  → skull strip (HD-BET)\n  → registration (ANTs SyN or FSL FNIRT)\n  → intensity normalization (z-score \u002F WM)\n",[2381],{"type":72,"tag":131,"props":2382,"children":2383},{"__ignoreMap":266},[2384],{"type":77,"value":2379},{"type":72,"tag":87,"props":2386,"children":2387},{},[2388],{"type":77,"value":2389},"Resampling to isotropic 1 mm is usually done either at reorient time (if input is anisotropic) or implicitly by registration to a 1 mm template.",{"type":72,"tag":80,"props":2391,"children":2393},{"id":2392},"quick-reference",[2394],{"type":77,"value":2395},"Quick Reference",{"type":72,"tag":2397,"props":2398,"children":2399},"table",{},[2400,2419],{"type":72,"tag":2401,"props":2402,"children":2403},"thead",{},[2404],{"type":72,"tag":2405,"props":2406,"children":2407},"tr",{},[2408,2414],{"type":72,"tag":2409,"props":2410,"children":2411},"th",{},[2412],{"type":77,"value":2413},"Task",{"type":72,"tag":2409,"props":2415,"children":2416},{},[2417],{"type":77,"value":2418},"Command",{"type":72,"tag":2420,"props":2421,"children":2422},"tbody",{},[2423,2441,2458,2475,2492,2509,2526,2543,2560,2579,2596,2613,2630,2647],{"type":72,"tag":2405,"props":2424,"children":2425},{},[2426,2432],{"type":72,"tag":2427,"props":2428,"children":2429},"td",{},[2430],{"type":77,"value":2431},"Reorient to standard",{"type":72,"tag":2427,"props":2433,"children":2434},{},[2435],{"type":72,"tag":131,"props":2436,"children":2438},{"className":2437},[],[2439],{"type":77,"value":2440},"fslreorient2std in.nii.gz out.nii.gz",{"type":72,"tag":2405,"props":2442,"children":2443},{},[2444,2449],{"type":72,"tag":2427,"props":2445,"children":2446},{},[2447],{"type":77,"value":2448},"N4 bias correction",{"type":72,"tag":2427,"props":2450,"children":2451},{},[2452],{"type":72,"tag":131,"props":2453,"children":2455},{"className":2454},[],[2456],{"type":77,"value":2457},"N4BiasFieldCorrection -d 3 -i in.nii.gz -o [out.nii.gz,bias.nii.gz] -s 3 -c [50x50x30x20,1e-6] -b [300]",{"type":72,"tag":2405,"props":2459,"children":2460},{},[2461,2466],{"type":72,"tag":2427,"props":2462,"children":2463},{},[2464],{"type":77,"value":2465},"Skull strip (HD-BET)",{"type":72,"tag":2427,"props":2467,"children":2468},{},[2469],{"type":72,"tag":131,"props":2470,"children":2472},{"className":2471},[],[2473],{"type":77,"value":2474},"hd-bet -i in.nii.gz -o brain.nii.gz -device cpu -mode fast -tta 0",{"type":72,"tag":2405,"props":2476,"children":2477},{},[2478,2483],{"type":72,"tag":2427,"props":2479,"children":2480},{},[2481],{"type":77,"value":2482},"Skull strip (BET)",{"type":72,"tag":2427,"props":2484,"children":2485},{},[2486],{"type":72,"tag":131,"props":2487,"children":2489},{"className":2488},[],[2490],{"type":77,"value":2491},"bet in.nii.gz brain.nii.gz -R -f 0.3 -g 0",{"type":72,"tag":2405,"props":2493,"children":2494},{},[2495,2500],{"type":72,"tag":2427,"props":2496,"children":2497},{},[2498],{"type":77,"value":2499},"Rigid register (ANTs)",{"type":72,"tag":2427,"props":2501,"children":2502},{},[2503],{"type":72,"tag":131,"props":2504,"children":2506},{"className":2505},[],[2507],{"type":77,"value":2508},"antsRegistrationSyNQuick.sh -d 3 -f fix.nii.gz -m mov.nii.gz -o out_ -t r",{"type":72,"tag":2405,"props":2510,"children":2511},{},[2512,2517],{"type":72,"tag":2427,"props":2513,"children":2514},{},[2515],{"type":77,"value":2516},"Affine register (ANTs)",{"type":72,"tag":2427,"props":2518,"children":2519},{},[2520],{"type":72,"tag":131,"props":2521,"children":2523},{"className":2522},[],[2524],{"type":77,"value":2525},"antsRegistrationSyNQuick.sh -d 3 -f fix.nii.gz -m mov.nii.gz -o out_ -t a",{"type":72,"tag":2405,"props":2527,"children":2528},{},[2529,2534],{"type":72,"tag":2427,"props":2530,"children":2531},{},[2532],{"type":77,"value":2533},"SyN register (ANTs)",{"type":72,"tag":2427,"props":2535,"children":2536},{},[2537],{"type":72,"tag":131,"props":2538,"children":2540},{"className":2539},[],[2541],{"type":77,"value":2542},"antsRegistrationSyNQuick.sh -d 3 -f fix.nii.gz -m mov.nii.gz -o out_ -t s",{"type":72,"tag":2405,"props":2544,"children":2545},{},[2546,2551],{"type":72,"tag":2427,"props":2547,"children":2548},{},[2549],{"type":77,"value":2550},"Apply ANTs transform (image)",{"type":72,"tag":2427,"props":2552,"children":2553},{},[2554],{"type":72,"tag":131,"props":2555,"children":2557},{"className":2556},[],[2558],{"type":77,"value":2559},"antsApplyTransforms -d 3 -i in.nii.gz -r ref.nii.gz -o out.nii.gz -t out_1Warp.nii.gz -t out_0GenericAffine.mat",{"type":72,"tag":2405,"props":2561,"children":2562},{},[2563,2568],{"type":72,"tag":2427,"props":2564,"children":2565},{},[2566],{"type":77,"value":2567},"Apply ANTs transform (labels)",{"type":72,"tag":2427,"props":2569,"children":2570},{},[2571,2573],{"type":77,"value":2572},"Add ",{"type":72,"tag":131,"props":2574,"children":2576},{"className":2575},[],[2577],{"type":77,"value":2578},"-n NearestNeighbor",{"type":72,"tag":2405,"props":2580,"children":2581},{},[2582,2587],{"type":72,"tag":2427,"props":2583,"children":2584},{},[2585],{"type":77,"value":2586},"FLIRT affine",{"type":72,"tag":2427,"props":2588,"children":2589},{},[2590],{"type":72,"tag":131,"props":2591,"children":2593},{"className":2592},[],[2594],{"type":77,"value":2595},"flirt -in mov.nii.gz -ref fix.nii.gz -out out.nii.gz -omat aff.mat -dof 12",{"type":72,"tag":2405,"props":2597,"children":2598},{},[2599,2604],{"type":72,"tag":2427,"props":2600,"children":2601},{},[2602],{"type":77,"value":2603},"FNIRT nonlinear",{"type":72,"tag":2427,"props":2605,"children":2606},{},[2607],{"type":72,"tag":131,"props":2608,"children":2610},{"className":2609},[],[2611],{"type":77,"value":2612},"fnirt --in=mov.nii.gz --ref=MNI152_T1_1mm.nii.gz --aff=aff.mat --cout=warp --iout=out.nii.gz",{"type":72,"tag":2405,"props":2614,"children":2615},{},[2616,2621],{"type":72,"tag":2427,"props":2617,"children":2618},{},[2619],{"type":77,"value":2620},"Z-score normalize",{"type":72,"tag":2427,"props":2622,"children":2623},{},[2624],{"type":72,"tag":131,"props":2625,"children":2627},{"className":2626},[],[2628],{"type":77,"value":2629},"fslmaths in.nii.gz -sub $MEAN -div $STD -mas mask.nii.gz out.nii.gz",{"type":72,"tag":2405,"props":2631,"children":2632},{},[2633,2638],{"type":72,"tag":2427,"props":2634,"children":2635},{},[2636],{"type":77,"value":2637},"Histogram match (ANTs)",{"type":72,"tag":2427,"props":2639,"children":2640},{},[2641],{"type":72,"tag":131,"props":2642,"children":2644},{"className":2643},[],[2645],{"type":77,"value":2646},"ImageMath 3 out.nii.gz HistogramMatch mov.nii.gz ref.nii.gz",{"type":72,"tag":2405,"props":2648,"children":2649},{},[2650,2655],{"type":72,"tag":2427,"props":2651,"children":2652},{},[2653],{"type":77,"value":2654},"Resample isotropic 1 mm",{"type":72,"tag":2427,"props":2656,"children":2657},{},[2658],{"type":72,"tag":131,"props":2659,"children":2661},{"className":2660},[],[2662],{"type":77,"value":2663},"mri_convert --voxel-size 1 1 1 in.nii.gz out.nii.gz",{"type":72,"tag":249,"props":2665,"children":2667},{"id":2666},"standard-templates-fsl",[2668],{"type":77,"value":2669},"Standard templates (FSL)",{"type":72,"tag":106,"props":2671,"children":2672},{},[2673,2684,2695],{"type":72,"tag":110,"props":2674,"children":2675},{},[2676,2682],{"type":72,"tag":131,"props":2677,"children":2679},{"className":2678},[],[2680],{"type":77,"value":2681},"$FSLDIR\u002Fdata\u002Fstandard\u002FMNI152_T1_1mm.nii.gz",{"type":77,"value":2683}," — whole-head.",{"type":72,"tag":110,"props":2685,"children":2686},{},[2687,2693],{"type":72,"tag":131,"props":2688,"children":2690},{"className":2689},[],[2691],{"type":77,"value":2692},"$FSLDIR\u002Fdata\u002Fstandard\u002FMNI152_T1_1mm_brain.nii.gz",{"type":77,"value":2694}," — brain-only.",{"type":72,"tag":110,"props":2696,"children":2697},{},[2698,2704],{"type":72,"tag":131,"props":2699,"children":2701},{"className":2700},[],[2702],{"type":77,"value":2703},"$FSLDIR\u002Fdata\u002Fstandard\u002FMNI152_T1_2mm_brain.nii.gz",{"type":77,"value":2705}," — 2 mm for faster registration.",{"type":72,"tag":80,"props":2707,"children":2709},{"id":2708},"common-mistakes",[2710],{"type":77,"value":2711},"Common Mistakes",{"type":72,"tag":106,"props":2713,"children":2714},{},[2715,2739,2783,2825,2846,2874],{"type":72,"tag":110,"props":2716,"children":2717},{},[2718,2723,2725,2730,2732,2737],{"type":72,"tag":93,"props":2719,"children":2720},{},[2721],{"type":77,"value":2722},"Wrong:",{"type":77,"value":2724}," Running skull stripping before bias field correction\n",{"type":72,"tag":93,"props":2726,"children":2727},{},[2728],{"type":77,"value":2729},"Right:",{"type":77,"value":2731}," Always run N4 bias correction first, then skull strip\n",{"type":72,"tag":93,"props":2733,"children":2734},{},[2735],{"type":77,"value":2736},"Why:",{"type":77,"value":2738}," Bias field estimation needs the full field of view including skull\u002Fneck to fit a smooth B-spline; N4 on an already-stripped brain introduces edge artifacts and leaves residual inhomogeneity",{"type":72,"tag":110,"props":2740,"children":2741},{},[2742,2746,2748,2752,2754,2760,2762,2767,2769,2775,2777,2781],{"type":72,"tag":93,"props":2743,"children":2744},{},[2745],{"type":77,"value":2722},{"type":77,"value":2747}," Using linear\u002Ftrilinear interpolation when resampling label maps\n",{"type":72,"tag":93,"props":2749,"children":2750},{},[2751],{"type":77,"value":2729},{"type":77,"value":2753}," Use ",{"type":72,"tag":131,"props":2755,"children":2757},{"className":2756},[],[2758],{"type":77,"value":2759},"NearestNeighbor",{"type":77,"value":2761}," (ANTs: ",{"type":72,"tag":131,"props":2763,"children":2765},{"className":2764},[],[2766],{"type":77,"value":2578},{"type":77,"value":2768},"; FSL: ",{"type":72,"tag":131,"props":2770,"children":2772},{"className":2771},[],[2773],{"type":77,"value":2774},"--interp=nn",{"type":77,"value":2776},") for any discrete label volume\n",{"type":72,"tag":93,"props":2778,"children":2779},{},[2780],{"type":77,"value":2736},{"type":77,"value":2782}," Linear interpolation on integer segmentation labels produces meaningless fractional values and destroys class boundaries",{"type":72,"tag":110,"props":2784,"children":2785},{},[2786,2790,2792,2796,2797,2803,2805,2809,2811,2816,2818,2823],{"type":72,"tag":93,"props":2787,"children":2788},{},[2789],{"type":77,"value":2722},{"type":77,"value":2791}," Specifying ANTs transforms in forward CLI order (affine then warp)\n",{"type":72,"tag":93,"props":2793,"children":2794},{},[2795],{"type":77,"value":2729},{"type":77,"value":2753},{"type":72,"tag":131,"props":2798,"children":2800},{"className":2799},[],[2801],{"type":77,"value":2802},"-t output_1Warp.nii.gz -t output_0GenericAffine.mat",{"type":77,"value":2804}," — warp first in CLI, affine second\n",{"type":72,"tag":93,"props":2806,"children":2807},{},[2808],{"type":77,"value":2736},{"type":77,"value":2810}," ",{"type":72,"tag":131,"props":2812,"children":2814},{"className":2813},[],[2815],{"type":77,"value":195},{"type":77,"value":2817}," composes in reverse CLI order (last ",{"type":72,"tag":131,"props":2819,"children":2821},{"className":2820},[],[2822],{"type":77,"value":1764},{"type":77,"value":2824}," applied first); reversing them silently produces misregistered output",{"type":72,"tag":110,"props":2826,"children":2827},{},[2828,2832,2834,2838,2840,2844],{"type":72,"tag":93,"props":2829,"children":2830},{},[2831],{"type":77,"value":2722},{"type":77,"value":2833}," Registering each longitudinal timepoint independently to MNI\n",{"type":72,"tag":93,"props":2835,"children":2836},{},[2837],{"type":77,"value":2729},{"type":77,"value":2839}," Build a subject-specific midpoint template, register each timepoint to it, then register the midpoint once to MNI\n",{"type":72,"tag":93,"props":2841,"children":2842},{},[2843],{"type":77,"value":2736},{"type":77,"value":2845}," Independent registration introduces asymmetric interpolation bias that corrupts longitudinal measurements (e.g., atrophy)",{"type":72,"tag":110,"props":2847,"children":2848},{},[2849,2853,2855,2859,2861,2866,2868,2872],{"type":72,"tag":93,"props":2850,"children":2851},{},[2852],{"type":77,"value":2722},{"type":77,"value":2854}," Skipping reorientation at the start of the pipeline\n",{"type":72,"tag":93,"props":2856,"children":2857},{},[2858],{"type":77,"value":2729},{"type":77,"value":2860}," Always run ",{"type":72,"tag":131,"props":2862,"children":2864},{"className":2863},[],[2865],{"type":77,"value":165},{"type":77,"value":2867}," first on inputs from different scanners\u002Fvendors\n",{"type":72,"tag":93,"props":2869,"children":2870},{},[2871],{"type":77,"value":2736},{"type":77,"value":2873}," Inconsistent storage orientations cause downstream tools to misinterpret coordinate frames",{"type":72,"tag":110,"props":2875,"children":2876},{},[2877,2881,2883,2887,2889,2895,2896,2900],{"type":72,"tag":93,"props":2878,"children":2879},{},[2880],{"type":77,"value":2722},{"type":77,"value":2882}," Computing z-score normalization over the full volume including background\n",{"type":72,"tag":93,"props":2884,"children":2885},{},[2886],{"type":77,"value":2729},{"type":77,"value":2888}," Compute mean\u002Fstd within the brain mask only (",{"type":72,"tag":131,"props":2890,"children":2892},{"className":2891},[],[2893],{"type":77,"value":2894},"fslstats -k brain_mask.nii.gz",{"type":77,"value":703},{"type":72,"tag":93,"props":2897,"children":2898},{},[2899],{"type":77,"value":2736},{"type":77,"value":2901}," Including background zeros drags the mean down and inflates the standard deviation, producing incorrect normalization",{"type":72,"tag":80,"props":2903,"children":2905},{"id":2904},"references",[2906],{"type":77,"value":2907},"References",{"type":72,"tag":106,"props":2909,"children":2910},{},[2911,2924,2935,2946],{"type":72,"tag":110,"props":2912,"children":2913},{},[2914,2916],{"type":77,"value":2915},"HD-BET: Isensee et al. Hum Brain Mapp 2019, ",{"type":72,"tag":2917,"props":2918,"children":2922},"a",{"href":2919,"rel":2920},"https:\u002F\u002Fdoi.org\u002F10.1002\u002Fhbm.24750",[2921],"nofollow",[2923],{"type":77,"value":2919},{"type":72,"tag":110,"props":2925,"children":2926},{},[2927,2929],{"type":77,"value":2928},"ANTs: Avants et al. NeuroImage 2011, ",{"type":72,"tag":2917,"props":2930,"children":2933},{"href":2931,"rel":2932},"https:\u002F\u002Fdoi.org\u002F10.1016\u002Fj.neuroimage.2010.09.025",[2921],[2934],{"type":77,"value":2931},{"type":72,"tag":110,"props":2936,"children":2937},{},[2938,2940],{"type":77,"value":2939},"N4 bias correction: Tustison et al. IEEE TMI 2010, ",{"type":72,"tag":2917,"props":2941,"children":2944},{"href":2942,"rel":2943},"https:\u002F\u002Fdoi.org\u002F10.1109\u002FTMI.2010.2046908",[2921],[2945],{"type":77,"value":2942},{"type":72,"tag":110,"props":2947,"children":2948},{},[2949,2951],{"type":77,"value":2950},"FSL: Jenkinson et al. NeuroImage 2012, ",{"type":72,"tag":2917,"props":2952,"children":2955},{"href":2953,"rel":2954},"https:\u002F\u002Fdoi.org\u002F10.1016\u002Fj.neuroimage.2011.09.015",[2921],[2956],{"type":77,"value":2953},{"type":72,"tag":2958,"props":2959,"children":2960},"style",{},[2961],{"type":77,"value":2962},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":2964,"total":3062},[2965,2982,2997,3011,3026,3039,3052],{"slug":2966,"name":2966,"fn":2967,"description":2968,"org":2969,"tags":2970,"stars":26,"repoUrl":27,"updatedAt":2981},"aws-genai-ml-architect","design AWS GenAI and ML architectures","Reasoning skill for designing AWS GenAI and ML architectures for healthcare and life sciences workloads. Use when the user asks to choose between SageMaker and Bedrock, design a RAG system over medical literature, architect clinical NLP or medical imaging inference, plan genomics or drug discovery pipelines on AWS, address HIPAA\u002FPHI compliance in ML systems, design MLOps for regulated clinical models, or optimize cost for HCLS ML workloads. Triggers include \"AWS architecture\", \"SageMaker vs Bedrock\", \"HIPAA ML\", \"clinical RAG\", \"medical imaging inference\", \"genomics on AWS\", \"PHI training\", \"MLOps healthcare\", \"Bedrock guardrails\", \"HealthLake\", \"HCLS cloud architecture\", \"BAA compliance\", \"SageMaker endpoint\", \"Bedrock knowledge base\", \"clinical NLP on AWS\", \"FDA SaMD on AWS\".",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2971,2974,2975,2976,2978],{"name":2972,"slug":2973,"type":16},"Architecture","architecture",{"name":24,"slug":25,"type":16},{"name":18,"slug":19,"type":16},{"name":2977,"slug":41,"type":16},"Life Sciences",{"name":2979,"slug":2980,"type":16},"LLM","llm","2026-07-12T08:38:07.975937",{"slug":2983,"name":2983,"fn":2984,"description":2985,"org":2986,"tags":2987,"stars":26,"repoUrl":27,"updatedAt":2996},"biomarker-discovery","guide biomarker discovery and validation","Reason about biomarker discovery and validation in HCLS — classifying biomarker intent, choosing feature-selection and cross-validation strategies, avoiding leakage, and planning external replication. Use when the user asks to discover, develop, or validate a biomarker; select features from high-dimensional omics or clinical data; design a validation study; choose evaluation metrics; justify sample size; combine multi-omics signals; or assess clinical utility. Triggers include \"discover a biomarker\", \"validate biomarker\", \"prognostic vs predictive\", \"feature selection\", \"LASSO vs elastic net\", \"nested cross-validation\", \"data leakage\", \"C-index\", \"time-dependent AUC\", \"decision curve analysis\", \"external validation cohort\", \"events per variable\", \"optimism-corrected\", \"multi-omics integration\", \"clinical utility of a biomarker\", \"is this biomarker ready\".",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2988,2989,2992,2993],{"name":24,"slug":25,"type":16},{"name":2990,"slug":2991,"type":16},"Bioinformatics","bioinformatics",{"name":2977,"slug":41,"type":16},{"name":2994,"slug":2995,"type":16},"Research","research","2026-07-12T08:37:49.295301",{"slug":2998,"name":2998,"fn":2999,"description":3000,"org":3001,"tags":3002,"stars":26,"repoUrl":27,"updatedAt":3010},"cdisc-compliance","reason about CDISC SDTM and ADaM implementation","Reason about CDISC SDTM and ADaM implementation for regulatory submissions. Use when the user asks about SDTM domain mapping, ADaM dataset design, controlled terminology versioning, define.xml completeness, FDA or PMDA submission requirements, query prioritization by clinical impact, SUPPQUAL usage, or CDISC compliance review. Triggers include \"SDTM mapping\", \"ADaM dataset\", \"CDISC compliance\", \"controlled terminology\", \"define.xml\", \"FDA submission data\", \"PMDA submission\", \"SDTM domain\", \"ADSL\", \"ADAE\", \"ADLB\", \"BDS structure\", \"SUPPQUAL\", \"RELREC\", \"value-level metadata\", \"CDISC CT\", \"regulatory submission data standards\", \"eCTD datasets\", \"SDTM 3.3\", \"ADaM 1.1\", \"query prioritization\", \"clinical data review\".\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3003,3006,3007],{"name":3004,"slug":3005,"type":16},"Clinical Trials","clinical-trials",{"name":2977,"slug":41,"type":16},{"name":3008,"slug":3009,"type":16},"Regulatory Compliance","regulatory-compliance","2026-07-12T08:37:33.35594",{"slug":3012,"name":3012,"fn":3013,"description":3014,"org":3015,"tags":3016,"stars":26,"repoUrl":27,"updatedAt":3025},"cell-type-annotation","annotate single-cell RNA-seq clusters","Generate code to assign cell type labels to single-cell RNA-seq clusters using CellTypist, SingleR, marker-based annotation, or reference label transfer (scANVI\u002Fingest). Triggers on requests to \"annotate cell types\", \"label clusters\", \"run CellTypist\", \"SingleR annotation\", \"marker gene dotplot\", \"transfer labels from reference atlas\", \"cell identity\", \"automated annotation\", \"reference mapping\", \"scANVI label transfer\", \"canonical markers\", \"immune cell types\", \"hierarchical annotation\", \"majority voting CellTypist\", \"over-clustering annotation\".",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3017,3018,3021,3022],{"name":2990,"slug":2991,"type":16},{"name":3019,"slug":3020,"type":16},"Data Analysis","data-analysis",{"name":2977,"slug":41,"type":16},{"name":3023,"slug":3024,"type":16},"RNA-seq","rna-seq","2026-07-12T08:38:05.443454",{"slug":3027,"name":3027,"fn":3028,"description":3029,"org":3030,"tags":3031,"stars":26,"repoUrl":27,"updatedAt":3038},"cheminformatics","calculate molecular properties with RDKit","Cheminformatics pipeline for small-molecule property calculation, filtering, and similarity analysis using RDKit. Use when the user asks to compute molecular descriptors, filter compounds by Lipinski or Veber rules, detect PAINS, calculate fingerprint similarity, run matched molecular pair analysis, generate ADMET descriptors, or process SMILES. Triggers include \"RDKit\", \"molecular descriptors\", \"Lipinski\", \"rule of five\", \"Veber\", \"PAINS\", \"pan-assay interference\", \"Morgan fingerprint\", \"Tanimoto\", \"fingerprint similarity\", \"matched molecular pair\", \"MMP\", \"mmpdb\", \"ADMET\", \"druglikeness\", \"SMILES\", \"cheminformatics\", \"compound filtering\", \"chemical similarity\".",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3032,3033,3036,3037],{"name":2990,"slug":2991,"type":16},{"name":3034,"slug":3035,"type":16},"Chemistry","chemistry",{"name":3019,"slug":3020,"type":16},{"name":2994,"slug":2995,"type":16},"2026-07-12T08:37:28.334619",{"slug":3040,"name":3040,"fn":3041,"description":3042,"org":3043,"tags":3044,"stars":26,"repoUrl":27,"updatedAt":3051},"claims-analytics","analyze and parse healthcare claims data","Pipeline skill for healthcare claims data parsing, analysis, and fraud detection. Use when the user asks to parse X12 837 or 835 claim files, manipulate ICD-10 CPT or HCPCS codes, detect billing pattern anomalies, profile providers against specialty peers, identify outlier billing behavior, validate NCCI edits programmatically, detect duplicate claims, run Benford's law analysis on charges, build claims data pipelines, or analyze E&M code distributions. Triggers include \"parse X12 837\", \"parse 835\", \"claims SQL\", \"ICD-10 manipulation\", \"CPT code analysis\", \"provider profiling\", \"billing outlier\", \"NCCI validation code\", \"duplicate claim detection\", \"Benford's law charges\", \"claims ETL\", \"E&M distribution analysis\", \"claims analytics pipeline\".\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3045,3046,3047,3050],{"name":3019,"slug":3020,"type":16},{"name":18,"slug":19,"type":16},{"name":3048,"slug":3049,"type":16},"Insurance","insurance",{"name":2977,"slug":41,"type":16},"2026-07-12T08:37:34.815088",{"slug":3053,"name":3053,"fn":3054,"description":3055,"org":3056,"tags":3057,"stars":26,"repoUrl":27,"updatedAt":3061},"claims-billing-rules","analyze healthcare claims billing rules","Reasoning skill for healthcare claims billing rules and fraud detection logic. Use when the user asks about CMS billing rules, place of service codes, global surgery periods, modifier usage (25 59 76 77), NCCI edit logic, column 1 column 2 code pairs, mutually exclusive procedures, modifier indicators, fraud waste and abuse patterns, E&M upcoding, unbundling, phantom billing, impossible day detection, coding error versus fraud distinction, FWA investigation methodology, or claims audit logic. Triggers include \"CMS billing rules\", \"NCCI edits\", \"modifier 25\", \"modifier 59\", \"global surgery period\", \"upcoding\", \"unbundling\", \"phantom billing\", \"impossible day\", \"FWA\", \"fraud waste abuse\", \"coding error vs fraud\", \"claims audit\", \"billing compliance\", \"E&M level selection\".\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3058,3059,3060],{"name":18,"slug":19,"type":16},{"name":3048,"slug":3049,"type":16},{"name":3008,"slug":3009,"type":16},"2026-07-12T08:38:28.210856",40,{"items":3064,"total":3240},[3065,3084,3105,3115,3128,3141,3151,3161,3182,3197,3212,3227],{"slug":3066,"name":3066,"fn":3067,"description":3068,"org":3069,"tags":3070,"stars":3081,"repoUrl":3082,"updatedAt":3083},"agentcore-investigation","investigate Bedrock AgentCore runtime sessions","Investigate Bedrock AgentCore runtime sessions via CloudWatch Logs Insights — resolve session\u002Ftrace IDs, query OTEL spans, filter noise, build timelines. Use when debugging AgentCore agent sessions, tracing tool calls, or analyzing latency.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3071,3072,3075,3078],{"name":24,"slug":25,"type":16},{"name":3073,"slug":3074,"type":16},"Debugging","debugging",{"name":3076,"slug":3077,"type":16},"Logs","logs",{"name":3079,"slug":3080,"type":16},"Observability","observability",9427,"https:\u002F\u002Fgithub.com\u002Fawslabs\u002Fmcp","2026-07-12T08:37:22.601527",{"slug":3085,"name":3086,"fn":3087,"description":3088,"org":3089,"tags":3090,"stars":3081,"repoUrl":3082,"updatedAt":3104},"amazon-aurora-dsql","amazon aurora dsql","build applications with Aurora DSQL","Build with Aurora DSQL — manage schemas, execute queries, handle migrations, diagnose query plans, load data, and develop applications with a serverless, distributed SQL database. Covers IAM auth, multi-tenant patterns, MySQL-to-DSQL and PostgreSQL-to-DSQL schema conversion, FK replacement code generation, OCC retry patterns, ORM migration (Django\u002FHibernate\u002FRails), DDL operations, query plan explainability, SQL compatibility validation, and bulk data loading. Triggers on phrases like: DSQL, Aurora DSQL, create DSQL table, DSQL schema, migrate to DSQL, distributed SQL database, serverless PostgreSQL-compatible database, DSQL query plan, DSQL EXPLAIN ANALYZE, why is my DSQL query slow, DSQL foreign key, DSQL OCC retry, DSQL multi-region, load into DSQL, load CSV into DSQL, bulk load DSQL, aurora-dsql-loader.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3091,3094,3095,3098,3101],{"name":3092,"slug":3093,"type":16},"Aurora","aurora",{"name":24,"slug":25,"type":16},{"name":3096,"slug":3097,"type":16},"Database","database",{"name":3099,"slug":3100,"type":16},"Serverless","serverless",{"name":3102,"slug":3103,"type":16},"SQL","sql","2026-07-12T08:36:45.053393",{"slug":3106,"name":3107,"fn":3087,"description":3088,"org":3108,"tags":3109,"stars":3081,"repoUrl":3082,"updatedAt":3114},"aurora-dsql","aurora dsql",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3110,3111,3112,3113],{"name":24,"slug":25,"type":16},{"name":3096,"slug":3097,"type":16},{"name":3099,"slug":3100,"type":16},{"name":3102,"slug":3103,"type":16},"2026-07-12T08:36:42.694299",{"slug":3116,"name":3117,"fn":3087,"description":3088,"org":3118,"tags":3119,"stars":3081,"repoUrl":3082,"updatedAt":3127},"aws-dsql","aws dsql",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3120,3121,3122,3125,3126],{"name":24,"slug":25,"type":16},{"name":3096,"slug":3097,"type":16},{"name":3123,"slug":3124,"type":16},"Migration","migration",{"name":3099,"slug":3100,"type":16},{"name":3102,"slug":3103,"type":16},"2026-07-12T08:36:38.584057",{"slug":3129,"name":3130,"fn":3087,"description":3088,"org":3131,"tags":3132,"stars":3081,"repoUrl":3082,"updatedAt":3140},"distributed-postgres","distributed postgres",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3133,3134,3135,3138,3139],{"name":24,"slug":25,"type":16},{"name":3096,"slug":3097,"type":16},{"name":3136,"slug":3137,"type":16},"PostgreSQL","postgresql",{"name":3099,"slug":3100,"type":16},{"name":3102,"slug":3103,"type":16},"2026-07-12T08:36:46.530743",{"slug":3142,"name":3143,"fn":3087,"description":3088,"org":3144,"tags":3145,"stars":3081,"repoUrl":3082,"updatedAt":3150},"distributed-sql","distributed sql",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3146,3147,3148,3149],{"name":24,"slug":25,"type":16},{"name":3096,"slug":3097,"type":16},{"name":3099,"slug":3100,"type":16},{"name":3102,"slug":3103,"type":16},"2026-07-12T08:36:48.104182",{"slug":3152,"name":3152,"fn":3087,"description":3088,"org":3153,"tags":3154,"stars":3081,"repoUrl":3082,"updatedAt":3160},"dsql",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3155,3156,3157,3158,3159],{"name":24,"slug":25,"type":16},{"name":3096,"slug":3097,"type":16},{"name":3123,"slug":3124,"type":16},{"name":3099,"slug":3100,"type":16},{"name":3102,"slug":3103,"type":16},"2026-07-12T08:36:36.374512",{"slug":3162,"name":3162,"fn":3163,"description":3164,"org":3165,"tags":3166,"stars":3179,"repoUrl":3180,"updatedAt":3181},"cost-efficiency-analyzer","analyze cost efficiency and expenses","Analyzes cost structure, cost efficiency, and expense management from P&L data. Use when the user asks about costs, expenses, COGS, operating expenses, cost ratios, cost control, spending efficiency, margin compression from cost side, or wants to understand where money is going. Also use for \"are we spending too much\", \"cost breakdown\", \"expense analysis\", or \"how efficient are our operations\". NOT for revenue or top-line analysis.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3167,3170,3173,3176],{"name":3168,"slug":3169,"type":16},"Accounting","accounting",{"name":3171,"slug":3172,"type":16},"Analytics","analytics",{"name":3174,"slug":3175,"type":16},"Cost Optimization","cost-optimization",{"name":3177,"slug":3178,"type":16},"Finance","finance",3176,"https:\u002F\u002Fgithub.com\u002Fawslabs\u002Fagentcore-samples","2026-07-12T08:40:03.29555",{"slug":3183,"name":3183,"fn":3184,"description":3185,"org":3186,"tags":3187,"stars":3179,"repoUrl":3180,"updatedAt":3196},"executive-financial-briefing","generate executive financial briefings","Generates a concise executive-level financial briefing or summary suitable for a CEO, CFO, or board presentation. Use when the user asks for a summary, briefing, executive summary, board update, financial overview, financial health check, or \"how is the business doing\". Covers the full P&L picture in one page. Also use for \"give me the highlights\", \"what do I need to know\", or \"quick financial update\".",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3188,3189,3190,3193],{"name":24,"slug":25,"type":16},{"name":3177,"slug":3178,"type":16},{"name":3191,"slug":3192,"type":16},"Management","management",{"name":3194,"slug":3195,"type":16},"Reporting","reporting","2026-07-12T08:40:02.066471",{"slug":3198,"name":3198,"fn":3199,"description":3200,"org":3201,"tags":3202,"stars":3179,"repoUrl":3180,"updatedAt":3211},"multi-quarter-trend-analysis","analyze multi-quarter financial trends","Analyzes financial trends across multiple quarters by comparing P&L metrics over time. Use when the user wants to see trends, patterns, trajectories, or directional movement across 3 or more quarters. Also use for \"how are we trending\", \"show me the trend\", \"track performance over time\", \"quarter over quarter comparison across all quarters\", or any multi-period longitudinal analysis.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3203,3204,3205,3208],{"name":3171,"slug":3172,"type":16},{"name":3177,"slug":3178,"type":16},{"name":3206,"slug":3207,"type":16},"Financial Statements","financial-statements",{"name":3209,"slug":3210,"type":16},"Variance Analysis","variance-analysis","2026-07-12T08:40:00.79141",{"slug":3213,"name":3213,"fn":3214,"description":3215,"org":3216,"tags":3217,"stars":3179,"repoUrl":3180,"updatedAt":3226},"pdf","process and manipulate PDF documents","Use this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text\u002Ftables from PDFs, combining or merging multiple PDFs into one, splitting PDFs apart, rotating pages, adding watermarks, creating new PDFs, filling PDF forms, encrypting\u002Fdecrypting PDFs, extracting images, and OCR on scanned PDFs to make them searchable. If the user mentions a .pdf file or asks to produce one, use this skill.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3218,3221,3224],{"name":3219,"slug":3220,"type":16},"Automation","automation",{"name":3222,"slug":3223,"type":16},"Documents","documents",{"name":3225,"slug":3213,"type":16},"PDF","2026-07-12T08:41:44.135656",{"slug":3228,"name":3228,"fn":3229,"description":3230,"org":3231,"tags":3232,"stars":3179,"repoUrl":3180,"updatedAt":3239},"quarterly-kpi-calculator","calculate quarterly financial KPIs","Calculates quarterly financial KPIs from P&L data. P&L figures can be provided directly by the user or fetched from the financial data MCP server. Use when the user wants KPI calculations such as Gross Margin %, EBITDA Margin %, Operating Expense Ratio, or Revenue Growth % QoQ. Also use for quarterly performance review, P&L analysis, or interpreting financial ratios against benchmarks.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3233,3234,3235,3236],{"name":3168,"slug":3169,"type":16},{"name":3019,"slug":3020,"type":16},{"name":3177,"slug":3178,"type":16},{"name":3237,"slug":3238,"type":16},"KPI","kpi","2026-07-12T08:39:59.54971",150]