Skip to content

Commit 321fd7e

Browse files
authored
Merge pull request #638 from bnmajor/vector-image-support
ENH: Add support for itkVectorImage
2 parents e0bdcfc + 2a8233c commit 321fd7e

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

itkwidgets/integrations/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def _get_viewer_image(image, label=False):
7373

7474
if HAVE_ITK:
7575
import itk
76-
if isinstance(image, itk.Image):
76+
if isinstance(image, itk.Image) or isinstance(image, itk.VectorImage):
7777
ngff_image = itk_image_to_ngff_image(image)
7878
multiscales = to_multiscales(ngff_image, method=method)
7979
to_ngff_zarr(store, multiscales, chunk_store=chunk_store)
@@ -189,6 +189,8 @@ def _detect_render_type(data, input_type) -> RenderType:
189189
import itk
190190
if isinstance(data, itk.Image):
191191
return RenderType.IMAGE
192+
elif isinstance(data, itk.VectorImage):
193+
return RenderType.IMAGE
192194
elif isinstance(data, itk.PointSet):
193195
return RenderType.POINT_SET
194196
if HAVE_MULTISCALE_SPATIAL_IMAGE:

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ dependencies = [
4040
"imjoy-rpc >= 0.5.16",
4141
"imjoy-utils >= 0.1.2",
4242
"importlib-metadata == 4.13.0 ; python_version == '3.7'",
43-
"ngff-zarr[dask-image] >= 0.2.0",
43+
"ngff-zarr[dask-image] >= 0.4.0",
4444
"numcodecs",
4545
"zarr",
4646
]

0 commit comments

Comments
 (0)