snake.core.handlers.fov
#
Handler for modifying the Field of View of the Phantom.
TODO: Add a FOV-motion handler that combines FOV and motion (moving the head is equivalent to changing the center point of FOV + angles).
Module Contents#
Classes#
Handler that update the FOV of the simulation. |
Functions#
Extract a rotated 3D rectangular region from a larger 3D array. |
|
API#
- snake.core.handlers.fov.extract_rotated_3d_region(volume: numpy.typing.NDArray, center: snake._meta.ThreeInts, size: snake._meta.ThreeInts, angles: snake._meta.ThreeFloats, zoom_factor: snake._meta.ThreeFloats) numpy.typing.NDArray [source]#
Extract a rotated 3D rectangular region from a larger 3D array.
- Parameters:
- Returns:
np.ndarray
- Return type:
The extracted 3D region.
- snake.core.handlers.fov._apply_transform(input: numpy.typing.NDArray, output: numpy.typing.NDArray, i: int, center: snake._meta.ThreeInts, size: snake._meta.ThreeInts, angles: snake._meta.ThreeFloats, zoom_factor: snake._meta.ThreeFloats) None [source]#
- class snake.core.handlers.fov.FOVHandler[source]#
Bases:
snake.core.handlers.base.AbstractHandler
Handler that update the FOV of the simulation.
- Parameters:
- __handler_name__ = 'fov-select'#
- get_static(phantom: snake.core.phantom.Phantom, sim_conf: snake.core.simulation.SimConfig) snake.core.phantom.Phantom [source]#
Modify the FOV of the phantom.