# STL model voxel

**URL:** https://discourse.vtk.org/t/stl-model-voxel/5188
**Category:** Support
**Created:** [February 15, 2021, 3:00am UTC](https://discourse.vtk.org/t/stl-model-voxel/5188 "2021-02-15T03:00:30Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![wjx2580](https://discourse.vtk.org/user_avatar/discourse.vtk.org/wjx2580/32/3013_2.png) [@wjx2580](https://discourse.vtk.org/u/wjx2580)
#### Post date: [February 15, 2021, 3:00am UTC](https://discourse.vtk.org/t/stl-model-voxel/5188/1 "2021-02-15T03:00:30Z")

</div>

Hello, everyone. I am a novice. Does anyone know how to use octree algorithm to voxel STL model？

---

<div class="post-metadata">

### Author: ![lassoan](https://discourse.vtk.org/user_avatar/discourse.vtk.org/lassoan/32/50_2.png) [@lassoan](https://discourse.vtk.org/u/lassoan)
#### Post date: [February 16, 2021, 12:25am UTC](https://discourse.vtk.org/t/stl-model-voxel/5188/2 "2021-02-16T00:25:38Z")

</div>

You can convert an STL model to voxel array using [vtkPolyDataToImageStencil](https://vtk.org/doc/nightly/html/classvtkPolyDataToImageStencil.html) filter.

---

<div class="post-metadata">

### Author: ![wb0518](https://discourse.vtk.org/user_avatar/discourse.vtk.org/wb0518/32/7410_2.png) [@wb0518](https://discourse.vtk.org/u/wb0518)
#### Post date: [July 6, 2023, 8:18am UTC](https://discourse.vtk.org/t/stl-model-voxel/5188/3 "2023-07-06T08:18:26Z")

</div>

Can you be more specific? I’ve had the same problem recently. Thank you very much!
