# Equalizing the number of slices of volumes

**URL:** <https://discourse.slicer.org/t/equalizing-the-number-of-slices-of-volumes/40852>\
**Category:** Support\
**Created:** [December 25, 2024, 8:31pm UTC](https://discourse.slicer.org/t/equalizing-the-number-of-slices-of-volumes/40852 "2024-12-25T20:31:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![OmerAfsin](https://avatars.discourse-cdn.com/v4/letter/o/eb8c5e/32.png) [@OmerAfsin](https://discourse.slicer.org/u/OmerAfsin)\
**Post date:** [December 25, 2024, 8:31pm UTC](https://discourse.slicer.org/t/equalizing-the-number-of-slices-of-volumes/40852/1 "2024-12-25T20:31:52Z")

</div>

Hi everyone,  
I have some issue with interpolation. I am working on a project which aims to automatic segmentation of Aorta and Pulmonary. I got 20 different volumes from hospital but these volumes consist of different number of slices. I have tried to make them same with interpolation techniques. I decided to fix them to 319 slices in Resample Scalar/Vector/DWI Volume module’s Linear interpolation with taking one of the volumes as reference. Volumes that less than 319 slices are okay, higher ones lost information as I expected but is there any way can I specify the region of interest so that data is not harmed?

1-205  
2-319  
3-338  
4-427  
5-393  
6-305  
7-273  
8-581  
9-310  
10-319  
11-319  
12-306  
13-408  
14-212  
15-345  
16-366  
17-363  
18-382  
19-382  
20-382  
These are the number of slices in each volume that I have. While trying interpolation techniques (not only Linear one) I choose the 2. volume as my reference. This issue so important for me and if you have any advise or comment please don’t hesitate to share.

 ![Ekran görüntüsü 2024-12-25 232724](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/8/2/8255aebc2269d26c5d07fc33bf5f637719e4059c.jpeg)  
 ![Ekran görüntüsü 2024-12-25 232625](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/a/f/af91b9a9c96efcf48c9942ec6357d86eba53bd89.jpeg)

Thank you for your time.

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [December 27, 2024, 1:35am UTC](https://discourse.slicer.org/t/equalizing-the-number-of-slices-of-volumes/40852/2 "2024-12-27T01:35:04Z")

</div>

Sounds like you are on a reasonable track, but you may also want to do a rigid registration first so you at least have the anatomy lined up before cropping and resampling.

But also, check out the lung segmentation tools ([GitHub - Slicer/SlicerLungCTAnalyzer: This is a 3D Slicer extension for segmentation and spatial reconstruction of infiltrated, collapsed, and emphysematous areas in lung CT.](https://github.com/Slicer/SlicerLungCTAnalyzer) and [New extension: MONAI Auto3DSeg - raise the bar in AI medical image segmentation](https://discourse.slicer.org/t/new-extension-monai-auto3dseg-raise-the-bar-in-ai-medical-image-segmentation/35680) for example) before investing too much time in new tools.

If there things missing from existing tools please report back here.

---

<div class="post-metadata">

**Author:** ![OmerAfsin](https://avatars.discourse-cdn.com/v4/letter/o/eb8c5e/32.png) [@OmerAfsin](https://discourse.slicer.org/u/OmerAfsin)\
**Post date:** [December 27, 2024, 1:44am UTC](https://discourse.slicer.org/t/equalizing-the-number-of-slices-of-volumes/40852/3 "2024-12-27T01:44:28Z")

</div>

Thanks for your reply sir.  
I will search about rigid registration. If you can suggest any source I would be grateful.

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [December 27, 2024, 1:49am UTC](https://discourse.slicer.org/t/equalizing-the-number-of-slices-of-volumes/40852/4 "2024-12-27T01:49:49Z")

</div>

As I said, check what already exists for chest vessel segmentation first.

But also read about registration: [Registration — 3D Slicer documentation](https://slicer.readthedocs.io/en/latest/user_guide/registration.html)
