Skip to content
Back to skills

Denoising Preprocessing

ASecurity

"Choose and run Dipy denoising and preprocessing steps, including

  • 247 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added September 8, 2026
datagoapi

Works with

  • cli
  • api

Security analysis

A100/100

Pro scans all 5 files and shows the line behind each finding

Scanned September 8, 2026

npx -y skills add VectorSpaceLab/AREX-Skill --skill denoising-preprocessing --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Denoising Preprocessing?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Denoising Preprocessing
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-denoising-preprocessing/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-denoising-preprocessing)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: denoising-preprocessing
description: "Choose and run Dipy denoising and preprocessing steps, including
  NLMeans, local PCA, MPPCA, Patch2Self, Gibbs removal, noise estimation, bias
  correction, and pre-fit validation."
disable-model-invocation: true
metadata:
  disco-role: operating
license: NOASSERTION
---

# Denoising And Preprocessing

Use this sub-skill when a Dipy task needs denoising or preprocessing before reconstruction, tracking, segmentation, or metric extraction: `NLMeans`, `localpca`, `mppca`, `Patch2Self`, Gibbs ringing removal, noise estimation, DWI bias-field correction, preprocessing masks, and validation of 3D/4D volume, mask, sigma, and patch-radius choices.

## Route First

- Use `../io-data/` for loading/saving NIfTI files, b-values/b-vectors, `GradientTable` construction from files, affine/header preservation, and image/gradient shape validation.
- Use `../reconstruction-models/` after preprocessing when the next task is tensor/CSD/DKI/ODF/peak fitting or reconstruction metric generation.
- Use `../tracking-segmentation/` for brain masks, tissue classification, streamline tracking, segmentation, and tractometry; keep only preprocessing-specific masks here.
- Use `../cli-workflows/` for console-entry discovery, parser behavior, `--help` probing, globbing semantics, and generic `dipy_*` command mechanics.
- Treat neural-network surfaces such as `dipy_evac_plus` and `dipy_correct_biasfield --method n4` as optional because base installs may lack model assets or ML dependencies.

## Core References

- `references/api-reference.md` lists denoising/preprocessing APIs, signatures, array contracts, and validation checks.
- `references/workflows.md` gives decision rules and safe API/CLI recipes for NLMeans, LPCA, MPPCA, Patch2Self, Gibbs removal, and bias correction.
- `references/troubleshooting.md` maps common shape, sigma, patch, mask, CLI, and optional-dependency failures to concrete fixes.
- `scripts/dipy_denoise_smoke.py` runs deterministic tiny in-memory checks and prints JSON; it does not download data or write persistent outputs.

## Fast Operating Pattern

1. Classify the preprocessing goal: suppress random noise, estimate noise, remove Gibbs ringing, correct smooth DWI intensity bias, or validate inputs before fitting.
2. Confirm data dimensionality before choosing an API: PCA and Patch2Self need 4D DWI data; NLMeans accepts 3D or 4D; Gibbs accepts 2D, 3D, or 4D.
3. Validate `data.shape[-1]` against b-values/b-vectors for gradient-aware paths and validate any mask with `mask.shape == data.shape[:3]`.
4. Choose the method from available information: use NLMeans with a credible `sigma`, LPCA with `sigma` or a `gtab`, MPPCA when noise is unknown and volume count supports local PCA, and Patch2Self for self-supervised DWI denoising with enough volumes.
5. Keep parameters conservative for first runs: small explicit output directories for CLIs, `num_processes=1` for deterministic Gibbs probes, and tiny synthetic arrays for smoke tests.
6. After preprocessing, validate finite values, preserved shape, expected dtype or requested `out_dtype`, nonempty in-mask output, and no accidental all-zero background expansion.

## Safety Defaults

- Prefer in-memory synthetic checks and existing user-provided images; do not fetch datasets, import visualization, train models, or download neural-network weights unless explicitly requested.
- Avoid running full-image Patch2Self, MPPCA, bias correction, or multi-process Gibbs on large data until the user confirms runtime expectations.
- If running inside a source checkout shadows the installed package and `import dipy` fails because generated version metadata is missing, run smoke checks from outside the checkout or use a normal installed package environment.
- Do not import `peaks_from_model` from `dipy.reconst.peaks`; route reconstruction to `../reconstruction-models/`, where the verified import is `dipy.direction.peaks.peaks_from_model`.

Files in this skill

  • SKILL.md3.9 KB
  • references/api-reference.md8.1 KB
  • references/troubleshooting.md8.5 KB
  • references/workflows.md9.4 KB
  • scripts/dipy_denoise_smoke.py10 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.