# slicer resamples data by itself

**URL:** <https://discourse.slicer.org/t/slicer-resamples-data-by-itself/23176>\
**Category:** Support\
**Tags:** resample\
**Created:** [April 28, 2022, 4:46pm UTC](https://discourse.slicer.org/t/slicer-resamples-data-by-itself/23176 "2022-04-28T16:46:54Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Berkay](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/berkay/32/15119_2.png) [@Berkay](https://discourse.slicer.org/u/Berkay)\
**Post date:** [April 28, 2022, 4:46pm UTC](https://discourse.slicer.org/t/slicer-resamples-data-by-itself/23176/1 "2022-04-28T16:46:54Z")

</div>

Dear all,

Data I’m trying to use is in “nii.gz” format and it includes axial data.

Normally it has 21 slices in total. After loading data using “data loading” module, program shows maybe 100 slices. When I check properties of data, as you can see from image, I see 21 slices and I want to segment images, so I just want to segment 21 slices instead of hundreds.

I couldn’t find a way to fix this.

Thanks in advnace for your help.

Berkay

 ![Screenshot from 2022-04-28 13-51-54](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/4/a/4a7eee89a5799be964d3f4fd0f90c5a1fba733ca.png)

---

<div class="post-metadata">

**Author:** ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)\
**Post date:** [April 28, 2022, 7:47pm UTC](https://discourse.slicer.org/t/slicer-resamples-data-by-itself/23176/2 "2022-04-28T19:47:57Z")

</div>

Your image will have 21 slices only in Axial plane. Coronal and Sagittal views should have 384 slices.

Possibly you are not looking at the right plane?

---

<div class="post-metadata">

**Author:** ![Berkay](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/berkay/32/15119_2.png) [@Berkay](https://discourse.slicer.org/u/Berkay)\
**Post date:** [April 29, 2022, 2:27am UTC](https://discourse.slicer.org/t/slicer-resamples-data-by-itself/23176/3 "2022-04-29T02:27:55Z")

</div>

Thanks Murat. I’m looking at axial plane. It is easy to differentiate axial and other planes

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [April 29, 2022, 4:16am UTC](https://discourse.slicer.org/t/slicer-resamples-data-by-itself/23176/4 "2022-04-29T04:16:48Z")

</div>

When you browse slices using the arrow keys (or page up/down keys) then the slice jumps as much as the slice spacing along that axis. So, if you wave 21 slices then you should be able to step through it in 21 steps. If you can share with us a screen recording video that demonstrates what you experienced; or you save the scene as a .mrb file and share with us (upload somewhere and post the link here) then it may give us an idea why the software did not behave as you expected.

> [@Berkay](#):
>
> program shows maybe 100 slices

This is interesting, because it should not be possible to see slice boundaries (by default image interpolation is enabled, so pixel edges should not be visible). How did you determine that about 100 slices are shown? Can you maybe attach a screenshot and show it there?

> [@Berkay](#):
>
> I just want to segment 21 slices instead of hundreds

Usually it does not matter much how many slices you have, as manual segmentation on each and every slice would be too time-consuming and unnecessary anyway.

Instead, you can draw a few scribbles in each segment on a few orthogonal slices and let `Grow from seeds` effect create a complete 3D segmentation from it. See a very simple example here:

[![](https://img.youtube.com/vi/cybL5A0w3hw/maxresdefault.jpg "Brain tumor segmentation on MRI in 1 minute") ](https://www.youtube.com/watch?v=cybL5A0w3hw)

If there is no significant contrast between neighbor regions but you can separate regions based on your anatomical knowledge, then you can use `Fill between slices` effect. You can segment on a small number of parallel slices, and the effect automatically computes segmentation on slices between them by smooth interpolation. This works very efficiently for elongated structures that do not change a lot between nearby slices (for example muscles or long bones, resliced along their long axis). See this short demo:

[![](https://img.youtube.com/vi/u93kI1MG6Ic/maxresdefault.jpg "Quick manual segmentation with contour interpolation") ](https://www.youtube.com/watch?v=u93kI1MG6Ic)

---

<div class="post-metadata">

**Author:** ![Josefa\_Garcia](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/josefa_garcia/32/13792_2.png) [@Josefa\_Garcia](https://discourse.slicer.org/u/Josefa_Garcia)\
**Post date:** [June 17, 2022, 1:45pm UTC](https://discourse.slicer.org/t/slicer-resamples-data-by-itself/23176/5 "2022-06-17T13:45:29Z")

</div>

Hi Andras, quick question, when you interpolate the images using _ResampleScalarVolume_, it should change the pixel size and the distance between slices? it works as resampling and interpolation? Thanks.

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [June 17, 2022, 2:22pm UTC](https://discourse.slicer.org/t/slicer-resamples-data-by-itself/23176/6 "2022-06-17T14:22:54Z")

</div>

Once an image is loaded into Slicer, we have a 3D volume consisting of voxels. When the image is resampled then all axes are treated the same way - I would not say we change pixel sizes and slice spacing but change voxel size. Resampling happens using the chosen interpolation kernel (linear, bspline, sinc, etc.).
