afids_utils.plotting#
Methods for plotting anatomical fiducials
- afids_utils.plotting.plot_ortho(afids, afid_nii, opacity=1)#
Generate interactive, html ortho view of the slices. Uses
nilearn.plottingto generate the figures.The generated view can either be opened interactively or saved as a figure per
nilearn.plottingfunctionality:
Interactive view -
view.open_in_browser()Save -
view.save_as_html(file_name.html)
- Parameters:
afids (AfidVoxel | AfidPosition | list[AfidVoxel | AfidPosition]) – List of AFIDs to visualize, with assumption that they are in the same space as the provided nifti image. If AFIDs are provided as AfidPositions, transformation to voxel coordinates will be performed using the affine from the provided nifti image.
afid_nii (Nifti1Image) – Input nifti image object to overlay afids on
opacity (float) – Opacity value [0 - transparent, 1 - opaque] of overlaid AFIDs
- Returns:
View object with fiducials overlaid on provided background nifti image
- Return type:
niplot.html_stat_map.StatMapView
- afids_utils.plotting.plot_distance_summary(afid_distances, afid_labels=None, plot_type='connectome')#
Generate a summary plot of average distances for a complete
AfidSetcollection.
- Parameters:
afid_distances (list[float]) – List of average distances either along a spatial component or Euclidean distance
afid_labels (list[str] | None) – List of strings denoting associated labels with distances. Note, these are only used with plot type “histogram” and “scatter”.
plot_type (str) – Type of plot to generate - one of [“connectome”, “scatter”, “histogram”].
- Returns:
View object as either a connectome, scatter or histogram dependent on plot_type
- Return type:
LYRZProjector | goFigure