Skip to content
Back to skills

Data Io Signal

ASecurity

"Handle Nilearn Niimg image I/O, volume image operations,

  • 247 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 8, 2026
businesspythonapi

Works with

  • api

Security analysis

A100/100

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

Scanned September 8, 2026

npx -y skills add VectorSpaceLab/AREX-Skill --skill data-io-signal --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Data Io Signal?

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

Security grade badge for Data Io Signal
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-data-io-signal/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-data-io-signal)

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: data-io-signal
description: "Handle Nilearn Niimg image I/O, volume image operations,
  masking/unmasking, and signal cleaning with tiny no-network checks."
disable-model-invocation: true
metadata:
  disco-role: operating
license: BSD 3-Clause
---

# Nilearn Data I/O and Signal Skill

Use this sub-skill when the task is about low-level Nilearn volume images and
array time series: loading 3D/4D Niimg inputs, creating new NIfTI images,
resampling, smoothing, thresholding, applying or computing masks, and cleaning
signals with confounds or sample masks.

## Route Tasks

- **Image input validation:** Use `nilearn.image.load_img` and
  `nilearn.image.check_niimg` for path, glob, `pathlib.Path`, or in-memory
  nibabel inputs. See [data formats](references/data-formats.md) and
  [API reference](references/api-reference.md).
- **Image transforms:** Use `index_img`, `iter_img`, `concat_imgs`, `mean_img`,
  `new_img_like`, `math_img`, `resample_img`, `resample_to_img`, `smooth_img`,
  `threshold_img`, and `clean_img`. See [workflows](references/workflows.md).
- **Masking:** Use `compute_epi_mask`, `compute_background_mask`,
  `compute_brain_mask`, `intersect_masks`, `apply_mask`, and `unmask` for
  direct image-to-array workflows. See [API reference](references/api-reference.md).
- **Signal arrays:** Use `nilearn.signal.clean` for 2D arrays shaped
  `(n_samples, n_features)`, confounds, run labels, temporal filtering,
  scrubbing, and standardization. See [data formats](references/data-formats.md).
- **Smoke checks:** Run the bundled no-network script:
  `python scripts/smoke_image_signal.py` from this sub-skill directory.

## Boundaries

- Route estimator objects such as `NiftiMasker`, labels/spheres maskers,
  region extraction, and scikit-learn pipeline integration to `maskers-regions`.
- Route surface mesh/image workflows, `SurfaceImage`, and `vol_to_surf` to
  `surface-workflows`.
- Route plotting displays, reports, HTML views, and figure export to
  `plotting-reporting`.
- Keep examples no-network by generating tiny `numpy` arrays and
  `nibabel.Nifti1Image` objects in memory.

## Quick Checklist

1. Confirm dimensionality with `check_niimg(..., ensure_ndim=3 or 4)` before
   assuming a 3D map or 4D run.
2. Compare both `shape[:3]` and `affine` before `apply_mask`; resample to a
   shared field of view before masking.
3. Ensure masks are 3D, binary, non-empty, and in the same field of view as
   the image.
4. Treat `apply_mask` output as `(n_samples, n_voxels)` and `signal.clean`
   input as `(n_samples, n_features)`.
5. Pass `t_r` when using temporal filters (`low_pass` or `high_pass`) and make
   confounds/sample masks align to the original number of time points.

## References

- [API reference](references/api-reference.md)
- [Workflows](references/workflows.md)
- [Data formats](references/data-formats.md)
- [Troubleshooting](references/troubleshooting.md)
- [Smoke script](scripts/smoke_image_signal.py)

Files in this skill

  • SKILL.md2.9 KB
  • references/api-reference.md6.9 KB
  • references/data-formats.md4.3 KB
  • references/troubleshooting.md6.1 KB
  • references/workflows.md5.8 KB
  • scripts/smoke_image_signal.py4.5 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.