eyepy.core.eyevolume
EyeVolume(data, meta=None, localizer=None, transformation=None)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data |
NDArray[float32]
|
A 3D numpy array containing the OCT data in shape (n_bscans, bscan_height, bscan_width) |
required |
meta |
Optional[EyeVolumeMeta]
|
Optional EyeVolumeMeta object. |
None
|
localizer |
Optional[EyeEnface]
|
|
None
|
transformation |
Optional[_GeometricTransform]
|
|
None
|
Source code in src/eyepy/core/eyevolume.py
data: np.ndarray
property
Returns:
laterality: str
property
writable
Returns:
layers: dict[str, EyeVolumeLayerAnnotation]
property
Returns:
scale: tuple[float, float, float]
property
writable
Returns:
scale_unit: str
property
writable
Returns:
scale_x: float
property
writable
Returns:
scale_y: float
property
writable
Returns:
scale_z: float
property
writable
Returns:
shape: tuple[int, int, int]
property
writable
Returns:
size_x: int
property
writable
Returns:
size_y: int
property
writable
Returns:
size_z: int
property
writable
Returns:
volume_maps: dict[str, EyeVolumePixelAnnotation]
property
Returns:
__getitem__(index)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
index |
Union[SupportsIndex, slice]
|
|
required |
Returns:
Source code in src/eyepy/core/eyevolume.py
__len__()
add_layer_annotation(height_map=None, meta=None, **kwargs)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
height_map |
Optional[NDArray[float_]]
|
Height in shape (n_Bscans, Bscan_width) The first index refers to the bottom most B-scan |
None
|
meta |
Optional[dict]
|
name, current_color, and knots |
None
|
**kwargs |
|
{}
|
Returns:
Source code in src/eyepy/core/eyevolume.py
add_pixel_annotation(voxel_map=None, meta=None, **kwargs)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
voxel_map |
Optional[NDArray[bool_]]
|
|
None
|
meta |
Optional[dict]
|
|
None
|
**kwargs |
|
{}
|
Returns:
Source code in src/eyepy/core/eyevolume.py
load(path)
classmethod
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
Union[str, Path]
|
|
required |
Returns:
Source code in src/eyepy/core/eyevolume.py
150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 |
|
plot(ax=None, projections=False, bscan_region=False, bscan_positions=False, quantification=None, region=np.s_[:, :], annotations_only=False, projection_kwargs=None, line_kwargs=None, scalebar='botleft', scalebar_kwargs=None, watermark=True)
Plot an annotated OCT localizer image.
If the volume does not provide a localizer image an enface projection of the OCT volume is used instead.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
ax |
Optional[Axes]
|
Axes to plot on. If not provided plot on the current axes (plt.gca()). |
None
|
projections |
Union[bool, list[str]]
|
If |
False
|
bscan_region |
bool
|
If |
False
|
bscan_positions |
Union[bool, list[int]]
|
If |
False
|
quantification |
Optional[str]
|
Name of the OCT volume annotations to plot a quantification for (default: |
None
|
region |
tuple[slice, slice]
|
Region of the localizer to plot (default: |
s_[:, :]
|
annotations_only |
bool
|
If |
False
|
projection_kwargs |
Optional[dict]
|
Optional keyword arguments for the projection plots. If |
None
|
line_kwargs |
Optional[dict]
|
Optional keyword arguments for customizing the lines to show B-scan region and positions plots. If |
None
|
scalebar |
Union[bool, str]
|
Position of the scalebar, one of "topright", "topleft", "botright", "botleft" or |
'botleft'
|
scalebar_kwargs |
Optional[dict]
|
Optional keyword arguments for customizing the scalebar. Check the documentation of plot_scalebar for more information. |
None
|
watermark |
bool
|
If |
True
|
Returns: None
Source code in src/eyepy/core/eyevolume.py
614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 |
|
remove_layer_annotation(name)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name |
str
|
|
required |
Returns:
Source code in src/eyepy/core/eyevolume.py
remove_pixel_annotation(name)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name |
str
|
|
required |
Returns:
Source code in src/eyepy/core/eyevolume.py
save(path)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
Union[str, Path]
|
|
required |
Returns:
Source code in src/eyepy/core/eyevolume.py
set_intensity_transform(func)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
func |
Union[str, Callable]
|
Either a string specifying a transform from eyepy.core.utils.intensity_transforms or a function |
required |
Returns: