Viewer¤
Interactive Volume Rendering in an iPython environment.
vape4d.viewer
¤
ViewerSettings
dataclass
¤
Source code in vape4d/viewer.py
48 49 50 51 52 53 54 55 56 57 58 | |
__init__
¤
__init__(
width: int,
height: int,
background_color: tuple,
show_colormap_editor: bool,
show_volume_info: bool,
vmin: Optional[float],
vmax: Optional[float],
distance_scale: float,
duration: Optional[float] = None,
) -> None
VolumeViewer
¤
Bases: DisplayObject
Source code in vape4d/viewer.py
108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 | |
__init__
¤
__init__(
data: ndarray,
colormap: Colormap,
settings: ViewerSettings,
)
Source code in vape4d/viewer.py
109 110 111 112 | |
__html__
¤
__html__()
Source code in vape4d/viewer.py
140 141 | |
viewer
¤
viewer(
data: ndarray,
colormap: Optional[Colormap] = None,
width: int = 800,
height: int = 600,
background_color=(0.0, 0.0, 0.0, 1.0),
show_colormap_editor=False,
show_volume_info=False,
vmin=None,
vmax=None,
distance_scale=1.0,
duration=None,
)
summary
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
ndarray
|
volume data of shape [T,C, D, H, W] |
required |
colormap
|
Optional[Colormap]
|
description. Defaults to matplotlib default colormap. |
None
|
width
|
int
|
viewer width. Defaults to 800. |
800
|
height
|
int
|
viewer height. Defaults to 600. |
600
|
background_color
|
tuple
|
background color in renderer. Defaults to black. |
(0.0, 0.0, 0.0, 1.0)
|
show_colormap_editor
|
bool
|
show the transfer function editor. Defaults to False. |
False
|
show_volume_info
|
bool
|
show the volume info window. Defaults to False. |
False
|
vmin
|
float
|
all values in data are clamped to this value. Defaults to minimum value in data. |
None
|
vmax
|
float
|
all values in data are clamped to this value. Defaults to maximum value in data. |
None
|
distance_scale
|
float
|
distance scale used for rendering. Defaults to 1.0. |
1.0
|
duration
|
_type_
|
duration of one animation cycle. Defaults to 5 seconds. |
None
|
Source code in vape4d/viewer.py
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 | |
vape4d.VolumeViewer
¤
Bases: DisplayObject
Source code in vape4d/viewer.py
108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 | |
__init__
¤
__init__(
data: ndarray,
colormap: Colormap,
settings: ViewerSettings,
)
Source code in vape4d/viewer.py
109 110 111 112 | |
__html__
¤
__html__()
Source code in vape4d/viewer.py
140 141 | |
vape4d.ViewerSettings
dataclass
¤
Source code in vape4d/viewer.py
48 49 50 51 52 53 54 55 56 57 58 | |
__init__
¤
__init__(
width: int,
height: int,
background_color: tuple,
show_colormap_editor: bool,
show_volume_info: bool,
vmin: Optional[float],
vmax: Optional[float],
distance_scale: float,
duration: Optional[float] = None,
) -> None