Skip to content

Commit

Permalink
Fix 404: colorbar discretising colors issue in SIFT
Browse files Browse the repository at this point in the history
  • Loading branch information
AnaVukasinovic authored and RudiLauster committed Feb 26, 2025
1 parent 975e3ca commit ba5ad44
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions uwsift/view/scene_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,12 @@
)
DEFAULT_TEXTURE_SHAPE = (4, 16)

class CustomImage(Image):
"""Custom image override to fix issue #404."""

def _init_texture(self, data, texture_format, **texture_kwargs):
return super()._init_texture(data, texture_format, internalformat="r32f")


class Markers2(Markers):
pass
Expand Down Expand Up @@ -952,7 +958,7 @@ def add_node_for_image_dataset(self, layer: LayerItem, product_dataset: ProductD
image.determine_reference_points()
elif IMAGE_DISPLAY_MODE == ImageDisplayMode.SIMPLE_GEOLOCATED:
grid = self._calc_subdivision_grid(product_dataset.info)
image = Image(
image = CustomImage(
image_data,
name=str(product_dataset.uuid),
interpolation="nearest",
Expand All @@ -965,7 +971,7 @@ def add_node_for_image_dataset(self, layer: LayerItem, product_dataset: ProductD
translate=(product_dataset.info[Info.ORIGIN_X], product_dataset.info[Info.ORIGIN_Y], 0),
)
else:
image = Image(
image = CustomImage(
image_data,
name=str(product_dataset.uuid),
interpolation="nearest",
Expand Down

0 comments on commit ba5ad44

Please sign in to comment.