InsightSoftwareConsortium / itkwidgets

An elegant Python interface for visualization on the web platform to interactively generate insights into multidimensional images, point sets, and geometry.
https://itkwidgets.readthedocs.io/
Apache License 2.0
576 stars 83 forks source link

Boundary at lower image edge does not appear in 3D #663

Open tbirdso opened 1 year ago

tbirdso commented 1 year ago

Overview

An image region that extends to the border of the region is not rendered with a boundary at the image edge.

Expected behavior

There is a visible border distinction in 3D volume rendering separating image contents from the background outside of the image.

Observed behavior

No border is drawn at the lower edge of an image whose feature region extends to the lower bounds of the image.

Minimum Reproducible Example

arr1 = np.zeros([25,25,25], dtype=np.uint8)
arr1[:15,:25,:15] = 1
image1 = itk.image_view_from_array(arr1)

itkwidgets.view(image1)

min-example-bounds

Platforms

itkwidgets 1.0a33 itk v5.3.0 Python 3.8 / JupyterLab 3.0.9 (CodeOcean) Google Chrome Windows 10

Notes

Behavior may be due to default vtk-js handling of volume rendering at image bounds, uncertain whether there are parameters that could be tweaked to addressed.

cc @PaulHax

thewtex commented 1 year ago

Let's start with bounding box visualization support to see if it addresses the need here, and go from there.