firestudio.studios.studio.Drawer
- class firestudio.studios.studio.Drawer[source]
Bases:
object- __init__()
Methods
__init__()addScaleBar(image)_summary_
addText(ax)_summary_
drawCoordinateAxes(ax[, spacing, length, colors])_summary_
gradientBlendImages(image_1[, image_2, ...])_summary_
plotImage(ax, final_image, **kwargs)Base method for overlaying artists on top of projected image.
render([ax])Generates an image with the produceImage method and then plots it with the plotImage method.
renormalizeTransposeImage(image, min_val, ...)_summary_
saveFigure(fig[, image_name])_summary_
- addScaleBar(image: numpy.ndarray)[source]
_summary_
- Parameters
image (np.ndarray) – array of RGB image pixel values
- Returns
image
- Return type
np.ndarray
- drawCoordinateAxes(ax: matplotlib.axes._axes.Axes, spacing: float = 1, length: float = 10, colors: Optional[list] = None)[source]
_summary_
- Parameters
ax (plt.Axes) – _description_
spacing (float, optional) – _description_, defaults to
1length (float, optional) – _description_, defaults to
10colors (list, optional) – _description_, defaults to
None
- Returns
_description_
- Return type
_type_
- gradientBlendImages(image_1: numpy.ndarray, image_2: Optional[numpy.ndarray] = None, gradient_width_percent: float = 0.1, angle: Optional[float] = None, **kwargs)[source]
_summary_
- Parameters
image_1 (np.ndarray) – _description_
image_2 (np.ndarray, optional) – _description_, defaults to
Nonegradient_width_percent (float, optional) – _description_, defaults to
0.1angle (float, optional) – _description_, defaults to
None
- Returns
_description_
- Return type
_type_
- plotImage(ax: matplotlib.axes._axes.Axes, final_image: numpy.ndarray, **kwargs)[source]
Base method for overlaying artists on top of projected image.
if self.scale_bar: overlays a scale bar by filling the RGB pixel values with white if self.noaxis: removes the coordinate axes, labels, and ticks
Will also add self.figure_label as text to the image. See
set_ImageParams()for details.- Parameters
ax (plt.Axes) – axis to plot image to
final_image (np.ndarray) – array of RGB image pixel values
- render(ax: Optional[matplotlib.axes._axes.Axes] = None, **kwargs)[source]
Generates an image with the produceImage method and then plots it with the plotImage method.
- Parameters
ax (plt.Axes, optional) – axis to plot image to, if None will create a new figure, defaults to
None- Returns
ax – the axis the image was plotted to final_image – Npixels x Npixels x 3 RGB pixel array
- Return type
plt.Axes, np.ndarray
- renormalizeTransposeImage(image: numpy.ndarray, min_val: float, max_val: float, quantity_name: str)[source]
_summary_
- Parameters
image (np.ndarray) – _description_
min_val (float) – _description_
max_val (float) – _description_
quantity_name (str) – _description_
- Returns
_description_
- Return type
_type_