InsightSoftwareConsortium / InsightSoftwareConsortium/itkwidgets

Label image volume is not visible outside of intensity image bounds in `view`

Open
#662 2 comments 0 reactions 1 assignee Claimed by @bnmajor View on GitHub
Dominant language
Python
Stars
624
Forks
83
PR merge metrics
No merged PRs in 30d

Description

## Overview

When viewing two binary images with `view(image1, label_image=image2)`, only the first image volume is displayed. The second image volume can be inferred as intersections on the label surface.

![itkwidgets-boundary-contour](https://github.com/InsightSoftwareConsortium/itkwidgets/assets/40648863/9bc4bf1f-add1-4c70-9b09-532373bde02e)

## Expected Behavior

Two volumes of different colors are visible in the scene.

## Observed Behavior

One volume is visible as a 3D boundary. The intersection of the other volume is implied as discoloration on the first volume surface.

## Minimum Reproducible Example

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

arr2 = np.zeros([25,25,25], dtype=np.uint8)
arr2[:20,:5,:5] = 1
image2 = itk.image_view_from_array(arr2)

itkwidgets.view(image1, label_image=image2)
```

Intersection in red:

![min-example](https://github.com/InsightSoftwareConsortium/itkwidgets/assets/40648863/cce5ea48-beff-4a87-86d5-d74af58b6adb)

cc @PaulHax

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.