# Overlaying UI mockup PNGs on vtkImageData without hurting picking

**URL:** https://discourse.vtk.org/t/overlaying-ui-mockup-pngs-on-vtkimagedata-without-hurting-picking/16491
**Category:** Support
**Created:** [July 21, 2026, 6:32am UTC](https://discourse.vtk.org/t/overlaying-ui-mockup-pngs-on-vtkimagedata-without-hurting-picking/16491 "2026-07-21T06:32:47Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Martyn\_Foster](https://discourse.vtk.org/user_avatar/discourse.vtk.org/martyn_foster/32/10701_2.png) [@Martyn\_Foster](https://discourse.vtk.org/u/Martyn_Foster)
#### Post date: [July 21, 2026, 6:32am UTC](https://discourse.vtk.org/t/overlaying-ui-mockup-pngs-on-vtkimagedata-without-hurting-picking/16491/1 "2026-07-21T06:32:47Z")

</div>

## Context

I’m prototyping a scientific visualization interface where the base render is real vtkImageData (volume slices), but I want to overlay UI chrome and annotation mockups that were generated as static PNGs in a browser tool. For reference, I used [Seedream 5.0 Pro AI Image Generator](https://seedream50.pro/) purely as an external image source to sketch overlay concepts before touching VTK - no integration exists, it’s just PNG output I’m importing.

## The actual VTK question

Once the PNG is in hand, what’s the more robust path for compositing:

- A `vtkImageActor` in a separate renderer layer, or
- A `vtkImageSlice` with its own mapper, positioned in display/overlay coordinates?

I need the overlay to stay screen-locked (like a HUD) rather than move with camera pan/zoom on the 3D layer beneath it. Is a second `vtkRenderer` with `SetLayer()` and a `vtkCoordinate` transform to `VTK_DISPLAY` the standard approach, or is there a cleaner idiom for this in current VTK?

## Alpha and resizing

The mockups have transparent backgrounds. Does `vtkPNGReader` preserve the alpha channel automatically into the RGBA image data, or do I need to explicitly request 4 components? Also, when the render window resizes, how do people avoid blurring the overlay - is nearest-neighbor interpolation on the image property enough, or should the overlay be regenerated per-resize event?

## Picking

Finally, since this overlay is purely cosmetic, how do I exclude it from `vtkPropPicker` or cell/point picking so it never gets selected accidentally during normal interaction with the underlying dataset?

Any pointers to relevant examples or classes would be appreciated.
