ibl_alignment_gui.backends.allen.anatomical_atlas
Classes
BrainAtlas subclass for anatomical atlases built from anatomical images. |
- class ibl_alignment_gui.backends.allen.anatomical_atlas.BrainAtlasAnatomical(intensity_img, label_img, pipeline_img)[source]
Bases:
BrainAtlasBrainAtlas subclass for anatomical atlases built from anatomical images.
In addition to the BrainAtlas intensity and label arrays, this class also stores the SimpleITK images for potential further processing.
- pipeline_sitk_image: sitk.Image
The pipeline image associated with this atlas for CCF conversion.
- intensity_sitk_image: sitk.Image
The anatomical intensity image.
- __init__(intensity_img, label_img, pipeline_img)[source]
Initialize the BrainAtlasAnatomical class.
- Parameters:
intensity_img (sitk.Image) – The anatomical intensity image.
label_img (sitk.Image) – The label image corresponding to the anatomical image. This must be the in the same space, and have the same array shape as the intensity image. The labels should be the lateralized IBL brain region labels, with the left hemisphere being the negative indices and the right hemisphere being the positive indices.
pipeline_img (sitk.Image) – The pipeline image associated with this atlas for CCF conversion. This should have the same array shape as the intensity image, but may be in a different physical space. Its physical space should be the one used by the CCF-registration pipeline, and allow conversion of the voxel indices to the physical domain of the pipeline-computed CCF transforms.
- indices_to_physical_points(channel_ndxs)[source]
Convert voxel indices in this atlas to physical points in the atlas space.
- Parameters:
channel_ndxs (np.ndarray) – An (N, 3) array of voxel indices in this atlas.
- Returns:
An (N, 3) array of physical points in the atlas space.
- Return type:
np.ndarray
-
intensity_sitk_image:
Image
- physical_points_to_indices(channel_ndxs, round_indices=False)[source]
Convert physical points in the atlas space to voxel indices in this atlas.
- Parameters:
channel_ndxs (np.ndarray) – An (N, 3) array of physical points in the atlas space.
- Returns:
An (N, 3) array of voxel indices in this atlas.
- Return type:
np.ndarray
-
pipeline_sitk_image:
Image