Data Directory Structure#
regrender works on a folder of serial section images (-D/--directory) or a single
image (-I/--image). All outputs are written next to the input images. A typical folder
looks like this after running the full pipeline:
<slices_dir>/
├── <stem>.tif # input histology slices (one per section)
│
├── transformations/ # created by `regrender register`
│ ├── <stem>_transform.json # registration metadata (see below)
│ ├── <stem>_transformed.tif # histology warped into atlas space
│ └── <stem>_overlay.png # histology + boundaries, outside the brain transparent
│
├── roi/ # created by `regrender roi`
│ ├── roi_points_raw.csv # ROIs in raw pixel coords
│ └── roi_points_ccf.csv # ROIs projected into CCF (after "Project")
│
└── probe_shanks.csv # created by `regrender probe`
Registration metadata — <stem>_transform.json#
Written by regrender register and consumed by roi / probe. Fields:
Field |
Meaning |
|---|---|
|
3×3 homography (or affine) mapping the resized slice onto atlas-plane pixels. |
|
Cutting plane ( |
|
Atlas resolution in µm (default |
|
Atlas plane index (voxel) the slice was matched to. |
|
Cutting-plane tilt offsets. |
|
In-plane rotation (degrees) applied to the raw slice. |
|
Whether the raw slice was flipped before registration. |
|
|
|
The matched landmark point pairs (slice pixels / atlas pixels). |
The rotate / flip_lr / flip_ud fields record the preprocessing so raw ROI points
can be replayed into atlas space (raw → flip → rotate → resize → apply matrix).
ROI CSVs — roi/#
roi_points_raw.csv (from labeling on raw images):
slice— source slice stemx,y— ROI position in raw image pixelsraw_h,raw_w— raw image shape (needed to replay the transform)channel—merge/R/G/B
roi_points_ccf.csv (after “Project + Render” or roi --project) adds:
AP_location,DV_location,ML_location— bregma-relative CCF coordinates (mm)region— Allen region acronym at that pointsource— source slice stemchannel
Probe CSV — probe_shanks.csv#
From regrender probe:
ap_mm,dv_mm,ml_mm— bregma-relative CCF coordinates (mm)probe_idx— shank indexpoint—dorsal(superficial) orventral(deep)source— source slice stem the point was picked on
The Region profile plot button also writes probe_region_profile.pdf and
probe_region_profile.csv (one row per region span per shank: shank, region,
extrapolated, dv_start_mm, dv_end_mm, depth_start_mm, depth_end_mm,
length_mm).