INNER CODE UNIT · Python

image

fury-gl/fury · fury/actor/core.py:367

        image = image / 255.0

    if image.ndim == 3 and image.shape[2] == 1:
        image = image[:, :, 0]
    elif image.ndim == 3 and image.shape[2] == 3:
        alpha = np.ones((*image.shape[:2], 1), dtype=np.float32)
        image = np.concatenate([image, alpha], axis=-1)

    if not isinstance(material, ImageBasicMaterial):
        raise TypeError("material must be an instance of ImageBasicMaterial.")

    image = Image(
        Geometry(grid=Texture(image.astype(np.float32), dim=2)), material=material
    )
    return image


def actor_from_primitive(

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…