# How to add vtkImageSlice for addActor

**URL:** https://discourse.vtk.org/t/how-to-add-vtkimageslice-for-addactor/8778
**Category:** Web
**Created:** [June 22, 2022, 7:31am UTC](https://discourse.vtk.org/t/how-to-add-vtkimageslice-for-addactor/8778 "2022-06-22T07:31:43Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![henry.min](https://discourse.vtk.org/user_avatar/discourse.vtk.org/henry.min/32/5386_2.png) [@henry.min](https://discourse.vtk.org/u/henry.min)
#### Post date: [June 22, 2022, 7:31am UTC](https://discourse.vtk.org/t/how-to-add-vtkimageslice-for-addactor/8778/1 "2022-06-22T07:31:43Z")

</div>

Hello, i’m beginer vtk.js using 24.18.7

I tried to convert a 2D image to 3D as in your [MultiSliceImageMapper example](https://kitware.github.io/vtk-js/examples/MultiSliceImageMapper.html)

```auto
const renderer = fullScreenRenderWindow.getRenderer();
const imageActorI = vtkImageSlice.newInstance();
renderer.addActor(imageActorI);

```

TypeScript error message:  
`TS2345: Argument of type 'vtkImageSlice' is not assignable to parameter of type 'vtkActor'.`

imageSlice/index.d.ts

```auto
export interface vtkImageSlice extends vtkProp3D {
	/**
	 * 
	 */
	getActors(): any;
...
}

```

but ImageSlice/index.js

```auto
  publicAPI.getActors = () => publicAPI;

```

is not implemented getActors in imageSlice in 24.18.7?  
Do you have any other options for implementation?

---

<div class="post-metadata">

### Author: ![Forrest](https://discourse.vtk.org/user_avatar/discourse.vtk.org/forrest/32/300_2.png) [@Forrest](https://discourse.vtk.org/u/Forrest)
#### Post date: [June 22, 2022, 3:07pm UTC](https://discourse.vtk.org/t/how-to-add-vtkimageslice-for-addactor/8778/2 "2022-06-22T15:07:48Z")

</div>

This looks like a bug in the vtk.js types. Please post this as an issue to [the vtk.js issue tracker](https://github.com/Kitware/vtk-js/issues), and we can address this soon.

In the meantime, you can instead call `renderer.addViewProp(imageActorI)`. The `addActor` signature should accept vtkProp, not just vtkActor.
