visualizer
tit.plotting.nilearn.visualizer ¶
Multi-slice field figures with atlas outlines for Nilearn Visuals.
:func:field_nifti names the MNI field file one simulation contributes, and
:class:NilearnVisualizer draws the 3 x 7 slice grid of a group-averaged field
(:mod:tit.plotting.nilearn.img_slices wraps it for the runner).
NilearnVisualizer ¶
Draws a group-averaged field as a multi-slice PDF with atlas outlines.
See Also¶
tit.plotting.nilearn.img_slices : The runner's entry point to this class. tit.plotting.nilearn.img_glass : The glass-brain PDF of the same field.
create_pdf_visualization_group ¶
create_pdf_visualization_group(averaged_img, base_filename: str, output_dir: str, min_cutoff: float | None = None, max_cutoff: float | None = None, atlas_name: str = 'harvard_oxford_sub', selected_regions: list[int] | None = None) -> str | None
Create a multi-slice PDF from a pre-averaged group NIfTI image.
Sagittal, coronal and axial rows of seven slices each, the field on a hot colour map over the MNI template, with optional atlas outlines.
Parameters¶
averaged_img : nibabel.Nifti1Image Pre-averaged electric-field image. base_filename : str Base filename for output (without extension). output_dir : str Directory where the PDF will be saved. min_cutoff : float or None, optional Lower display threshold in V/m. When None the 95th percentile of non-zero voxels is used. max_cutoff : float or None, optional Upper display threshold in V/m. When None the 99.9th percentile of non-zero voxels is used. atlas_name : str, optional Nilearn atlas key. selected_regions : list of int or None, optional 0-indexed region indices for the atlas overlay.
Returns¶
str or None Path to the saved PDF, or None on failure.
Source code in tit/plotting/nilearn/visualizer.py
198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 | |
field_nifti ¶
The MNI grey-matter field NIfTI one simulation contributes to these figures.
TI/niftis/grey_<sim>_TI_MNI_MNI_TI_max.nii.gz for a two-pair run, and
mTI/niftis/grey_<sim>_mTI_MNI_MNI_mTI_max.nii.gz for an mTI run
(:mod:tit.sim.mTI): the same quantity, the modulation depth, named per mode.