deepdrrzmq.devices package

Submodules

deepdrrzmq.devices.SimpleDevice module

class deepdrrzmq.devices.SimpleDevice.SimpleDevice(sensor_height: int, sensor_width: int, pixel_size: float, source_to_detector_distance: float, world_from_device: FrameTransform)

Bases: Device

Simple DeepDRR device which only uses the camera intrinsics and the world from device transform.

__init__(sensor_height: int, sensor_width: int, pixel_size: float, source_to_detector_distance: float, world_from_device: FrameTransform)
Parameters:
  • sensor_height – height of the sensor in pixels

  • sensor_width – width of the sensor in pixels

  • pixel_size – size of a pixel in mm

  • source_to_detector_distance – distance from the source to the detector in mm

  • world_from_device – transform from the device to the world

camera_intrinsics: CameraIntrinsicTransform
property device_from_camera3d: FrameTransform

Get the FrameTransform for the device’s camera3d_from_device frame (in the current pose).

Args:

camera3d_transform (FrameTransform): the “camera3d_from_device” frame transformation for the device.

Returns:

FrameTransform: the “device_from_camera3d” frame transformation for the device.

pixel_size: float
property principle_ray: Vector3D

Get the principle ray for the device in the current pose in the device frame.

The principle ray is the direction of the ray that passes through the center of the image. It points from the source toward the detector.

By default, this is just the z axis, but this can be overridden by sub classes.

Returns:

Vector3D: the principle ray for the device as a unit vector.

sensor_height: int
sensor_width: int
source_to_detector_distance: float
world_from_device: FrameTransform

Module contents

class deepdrrzmq.devices.SimpleDevice(sensor_height: int, sensor_width: int, pixel_size: float, source_to_detector_distance: float, world_from_device: FrameTransform)

Bases: Device

Simple DeepDRR device which only uses the camera intrinsics and the world from device transform.

__init__(sensor_height: int, sensor_width: int, pixel_size: float, source_to_detector_distance: float, world_from_device: FrameTransform)
Parameters:
  • sensor_height – height of the sensor in pixels

  • sensor_width – width of the sensor in pixels

  • pixel_size – size of a pixel in mm

  • source_to_detector_distance – distance from the source to the detector in mm

  • world_from_device – transform from the device to the world

camera_intrinsics: CameraIntrinsicTransform
property device_from_camera3d: FrameTransform

Get the FrameTransform for the device’s camera3d_from_device frame (in the current pose).

Args:

camera3d_transform (FrameTransform): the “camera3d_from_device” frame transformation for the device.

Returns:

FrameTransform: the “device_from_camera3d” frame transformation for the device.

pixel_size: float
property principle_ray: Vector3D

Get the principle ray for the device in the current pose in the device frame.

The principle ray is the direction of the ray that passes through the center of the image. It points from the source toward the detector.

By default, this is just the z axis, but this can be overridden by sub classes.

Returns:

Vector3D: the principle ray for the device as a unit vector.

sensor_height: int
sensor_width: int
source_to_detector_distance: float
world_from_device: FrameTransform