Using ImageJ segmentations with Pyradiomics

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?


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

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?

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.

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.


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.