Skip to content

Commit

Permalink
Cleaned up a few things
Browse files Browse the repository at this point in the history
  • Loading branch information
IgorTatarnikov committed Jul 29, 2024
1 parent 64dddf1 commit 538cdd2
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions brainglobe_registration/elastix/register.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
from typing import List
from typing import List, Tuple

import itk
import numpy as np
import numpy.typing as npt
from brainglobe_atlasapi import BrainGlobeAtlas


Expand All @@ -28,28 +29,30 @@ def run_registration(
atlas_image,
moving_image,
annotation_image,
parameter_lists: List[tuple[str, dict]],
) -> tuple[np.ndarray, itk.ParameterObject, np.ndarray]:
parameter_lists: List[Tuple[str, dict]],
) -> Tuple[npt.NDArray, itk.ParameterObject, npt.NDArray]:
"""
Run the registration process on the given images.
Parameters
----------
atlas_image : np.ndarray
atlas_image : npt.NDArray
The atlas image.
moving_image : np.ndarray
moving_image : npt.NDArray
The moving image.
annotation_image : np.ndarray
annotation_image : npt.NDArray
The annotation image.
parameter_lists : List[tuple[str, dict]], optional
The list of parameter lists, by default None
Returns
-------
np.ndarray
npt.NDArray
The result image.
itk.ParameterObject
The result transform parameters.
npt.NDArray
The transformed annotation image.
"""
# convert to ITK, view only
atlas_image = itk.GetImageViewFromArray(atlas_image).astype(itk.F)
Expand Down

0 comments on commit 538cdd2

Please sign in to comment.