# Efficient Extraction of Single Slices from 3D Image Data without Scalar Data Looping

**URL:** https://discourse.vtk.org/t/efficient-extraction-of-single-slices-from-3d-image-data-without-scalar-data-looping/12886
**Category:** vtk.js
**Tags:** code
**Created:** [December 12, 2023, 4:24pm UTC](https://discourse.vtk.org/t/efficient-extraction-of-single-slices-from-3d-image-data-without-scalar-data-looping/12886 "2023-12-12T16:24:13Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Alireza](https://discourse.vtk.org/user_avatar/discourse.vtk.org/alireza/32/6230_2.png) [@Alireza](https://discourse.vtk.org/u/Alireza)
#### Post date: [December 12, 2023, 4:24pm UTC](https://discourse.vtk.org/t/efficient-extraction-of-single-slices-from-3d-image-data-without-scalar-data-looping/12886/1 "2023-12-12T16:24:13Z")

</div>

What is the quickest method to extract a single slice from any axis of the 3D imageData? For example, if I need slice number 10 in the J direction of the imageData, I prefer to avoid the need for looping over scalar data.
