Scene
Optional dependencies
To use this module, install the optional dependency nanodrr[scene].
nanodrr.scene
¶
visualize_scene
¶
visualize_scene(
subject: Subject,
k_inv: Float[Tensor, "B 3 3"],
rt_inv: Float[Tensor, "B 4 4"],
sdd: Float[Tensor, B],
height: int,
width: int,
render_imgs: bool = True,
single_channel: bool = False,
culling: str | None = "back",
verbose: bool = False,
**kwargs
) -> Plotter
Render a DRR and return a 3D scene with camera frustums and anatomy.
| PARAMETER | DESCRIPTION |
|---|---|
subject
|
The subject containing the CT volume and labelmap.
TYPE:
|
k_inv
|
Inverse intrinsic matrices.
TYPE:
|
rt_inv
|
Camera-to-world transforms.
TYPE:
|
sdd
|
Source-to-detector distances.
TYPE:
|
height
|
Detector height in pixels.
TYPE:
|
width
|
Detector width in pixels.
TYPE:
|
render_imgs
|
If True, render DRRs before plotting
TYPE:
|
single_channel
|
If True, sum channels before texturing the detector.
TYPE:
|
culling
|
Face culling mode passed to each mesh (e.g.
TYPE:
|
verbose
|
If True, print progress during mesh extraction.
TYPE:
|
**kwargs
|
Additional arguments forwarded to :func:
DEFAULT:
|
| RETURNS | DESCRIPTION |
|---|---|
Plotter
|
A PyVista plotter with the anatomy mesh and camera frustums added. |