# How to store the segmented results in a container in itk?

**URL:** <https://discourse.itk.org/t/how-to-store-the-segmented-results-in-a-container-in-itk/4337>\
**Category:** Algorithms\
**Tags:** itk, dicom, segment, registration\
**Created:** [August 18, 2021, 4:42am UTC](https://discourse.itk.org/t/how-to-store-the-segmented-results-in-a-container-in-itk/4337 "2021-08-18T04:42:46Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![priyanka](https://discourse.itk.org/user_avatar/discourse.itk.org/priyanka/32/2399_2.png) [@priyanka](https://discourse.itk.org/u/priyanka)\
**Post date:** [August 18, 2021, 4:42am UTC](https://discourse.itk.org/t/how-to-store-the-segmented-results-in-a-container-in-itk/4337/1 "2021-08-18T04:42:46Z")

</div>

I’m segmenting the dicom slices, I want to store the results in one container. So that I can use them for 3d reconstruction.

---

<div class="post-metadata">

**Author:** ![dzenanz](https://discourse.itk.org/user_avatar/discourse.itk.org/dzenanz/32/1093_2.png) [@dzenanz](https://discourse.itk.org/u/dzenanz)\
**Post date:** [August 18, 2021, 1:43pm UTC](https://discourse.itk.org/t/how-to-store-the-segmented-results-in-a-container-in-itk/4337/2 "2021-08-18T13:43:29Z")

</div>

Have you considered loading a series of slices as a 3D image, then create a segmentation in the form of another 3D image (usually called a label-map)? If not, what container did you have in mind?

---

<div class="post-metadata">

**Author:** ![lassoan](https://discourse.itk.org/user_avatar/discourse.itk.org/lassoan/32/27_2.png) [@lassoan](https://discourse.itk.org/u/lassoan)\
**Post date:** [August 19, 2021, 12:20am UTC](https://discourse.itk.org/t/how-to-store-the-segmented-results-in-a-container-in-itk/4337/3 "2021-08-19T00:20:35Z")

</div>

By container do you mean file? There are a number of file formats and variants.

What kind of images did you segment? CT/MRI/PET/US, pathology, or not medical images?

Can segments overlap?

Besides ITK, what software are you going to use for analysis, quantification, and visualization?

Do you want to use the files for long-term archival and sharing with groups outside your institution, or just for your group’s internal use for a single project?

---

<div class="post-metadata">

**Author:** ![priyanka](https://discourse.itk.org/user_avatar/discourse.itk.org/priyanka/32/2399_2.png) [@priyanka](https://discourse.itk.org/u/priyanka)\
**Post date:** [August 19, 2021, 11:06am UTC](https://discourse.itk.org/t/how-to-store-the-segmented-results-in-a-container-in-itk/4337/4 "2021-08-19T11:06:16Z")

</div>

Thanks for the response,  
I segmented on 2d DICOM on 24 slices and want to store them in the memory and I need to do 3d reconstruction.

---

<div class="post-metadata">

**Author:** ![priyanka](https://discourse.itk.org/user_avatar/discourse.itk.org/priyanka/32/2399_2.png) [@priyanka](https://discourse.itk.org/u/priyanka)\
**Post date:** [August 19, 2021, 11:08am UTC](https://discourse.itk.org/t/how-to-store-the-segmented-results-in-a-container-in-itk/4337/5 "2021-08-19T11:08:40Z")

</div>

Thanks for the response,  
I wanted to store results in the form of objects.  
I used CT scans.

---

<div class="post-metadata">

**Author:** ![priyanka](https://discourse.itk.org/user_avatar/discourse.itk.org/priyanka/32/2399_2.png) [@priyanka](https://discourse.itk.org/u/priyanka)\
**Post date:** [August 19, 2021, 11:09am UTC](https://discourse.itk.org/t/how-to-store-the-segmented-results-in-a-container-in-itk/4337/6 "2021-08-19T11:09:42Z")

</div>

Also want to know how to perform segmentation on 3d volume?

---

<div class="post-metadata">

**Author:** ![dzenanz](https://discourse.itk.org/user_avatar/discourse.itk.org/dzenanz/32/1093_2.png) [@dzenanz](https://discourse.itk.org/u/dzenanz)\
**Post date:** [August 19, 2021, 1:34pm UTC](https://discourse.itk.org/t/how-to-store-the-segmented-results-in-a-container-in-itk/4337/7 "2021-08-19T13:34:38Z")

</div>

A library forum is not the best place to start learning about image segmentation. Maybe take a look at some of the [courses which employ ITK](https://blog.kitware.com/courses-in-medical-image-analysis-that-use-itk/) in order to get started?

---

<div class="post-metadata">

**Author:** ![lassoan](https://discourse.itk.org/user_avatar/discourse.itk.org/lassoan/32/27_2.png) [@lassoan](https://discourse.itk.org/u/lassoan)\
**Post date:** [August 19, 2021, 2:03pm UTC](https://discourse.itk.org/t/how-to-store-the-segmented-results-in-a-container-in-itk/4337/8 "2021-08-19T14:03:27Z")

</div>

I would recommend to store both your reconstructed 3D volumes and segmentations in NRRD file format. I did not get direct answers to my questions, but it seems that you are new to the field and therefore you just starting to learn about image segmentation by yourself. For this, you don’t need complicated formats, such as DICOM Segmentation Object, but you can work with the simplest research file formats, without embedding segment name&color information in the file.

The page that @dzenanz linked to above contains excellent resources, so I would recommend to check them out. Usually, it is hard to make image segmentation fully automatic - most often you need to provide some inputs and may need to review the end result and make some corrections. Therefore typically you segment images using an application with a GUI and dedicated segmentation tools, such as 3D Slicer ([this](https://slicer.readthedocs.io/en/latest/user_guide/image_segmentation.html) is a good page to get started), MITK, ITK-Snap, etc.

---

<div class="post-metadata">

**Author:** ![priyanka](https://discourse.itk.org/user_avatar/discourse.itk.org/priyanka/32/2399_2.png) [@priyanka](https://discourse.itk.org/u/priyanka)\
**Post date:** [August 20, 2021, 5:22pm UTC](https://discourse.itk.org/t/how-to-store-the-segmented-results-in-a-container-in-itk/4337/9 "2021-08-20T17:22:43Z")

</div>

Thanks for the resources, I’ll look into it.

---

<div class="post-metadata">

**Author:** ![priyanka](https://discourse.itk.org/user_avatar/discourse.itk.org/priyanka/32/2399_2.png) [@priyanka](https://discourse.itk.org/u/priyanka)\
**Post date:** [August 20, 2021, 5:23pm UTC](https://discourse.itk.org/t/how-to-store-the-segmented-results-in-a-container-in-itk/4337/10 "2021-08-20T17:23:53Z")

</div>

Thank you for being so helpful!
