# Using ImageJ segmentations with Pyradiomics

**URL:** <https://discourse.slicer.org/t/using-imagej-segmentations-with-pyradiomics/20835>\
**Category:** Radiomics\
**Created:** [November 30, 2021, 1:39am UTC](https://discourse.slicer.org/t/using-imagej-segmentations-with-pyradiomics/20835 "2021-11-30T01:39:14Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sari\_Khalil](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/sari_khalil/32/12690_2.png) [@Sari\_Khalil](https://discourse.slicer.org/u/Sari_Khalil)\
**Post date:** [November 30, 2021, 1:39am UTC](https://discourse.slicer.org/t/using-imagej-segmentations-with-pyradiomics/20835/1 "2021-11-30T01:39:14Z")

</div>

![Screen Shot 2021-11-29 at 8.18.49 PM](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/3/0/30fba87c1eb541d12d3c92391f1e18e98f21d81c.png)

Hello,  
I want to convert a deck of segmentations of multiple slices in a CT image made using ImageJ into usable input for pyRadiomics. For example, in the attached screenshot, you can see that I have 3 segmentations, one per slice in the CT (outlining a portion of a kidney tumor), and my goal is to save all three of them into a usable mask for pyradiomics, e.g., an nrrd file, so that the radiomic features are extracted only from the area inside each segmentation. Is this possible?

Thanks!  
S

---

<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:** [November 30, 2021, 2:37am UTC](https://discourse.slicer.org/t/using-imagej-segmentations-with-pyradiomics/20835/2 "2021-11-30T02:37:51Z")

</div>

Should be real simple, if you use Fiji, which supports exporting NRRD.

---

<div class="post-metadata">

**Author:** ![Sari\_Khalil](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/sari_khalil/32/12690_2.png) [@Sari\_Khalil](https://discourse.slicer.org/u/Sari_Khalil)\
**Post date:** [December 1, 2021, 12:33pm UTC](https://discourse.slicer.org/t/using-imagej-segmentations-with-pyradiomics/20835/3 "2021-12-01T12:33:30Z")

</div>

Not really - the issue is that there are several slices here, each with their own segmentation, and when I save the image as nrrd, none of these segmentations show up on the nrrd file. I then tried to save the segmentations as an overlay (Image \> Overlay \> From ROI manager), but the overlay is done for a single ROI at a time. Am I missing something?

---

<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:** [December 1, 2021, 5:37pm UTC](https://discourse.slicer.org/t/using-imagej-segmentations-with-pyradiomics/20835/4 "2021-12-01T17:37:27Z")

</div>

I am not all that knowledgeable with ImageJ/Fiji. I expect you should be able to export each of your ROI to its own imagestack first, and then save as NRRD. But that’s as much as I can help.

If you do not have extensive segmentation, it might be faster to redo the segmentations in Slicer and avoid all these issues.

---

<div class="post-metadata">

**Author:** ![Sari\_Khalil](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/sari_khalil/32/12690_2.png) [@Sari\_Khalil](https://discourse.slicer.org/u/Sari_Khalil)\
**Post date:** [December 5, 2021, 1:15pm UTC](https://discourse.slicer.org/t/using-imagej-segmentations-with-pyradiomics/20835/5 "2021-12-05T13:15:42Z")

</div>

Got it. Yeah, I think it would be easier to redo this in 3D slicer. Unfortunately, it’s a bit of work regardless of what I end up doing - a former colleague left me with 150 meticulously segmented dicoms using Fiji, and I was trying to salvage them. Thanks.

S

---

<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:** [December 5, 2021, 3:35pm UTC](https://discourse.slicer.org/t/using-imagej-segmentations-with-pyradiomics/20835/6 "2021-12-05T15:35:36Z")

</div>

Then, ask in Fiji forums how you can turn those segment to separate binary image sequences. Once you do that, rest should be more straightforward.
