Export volume data in segment?

Is it possible to export the volume data in a segment? Meaning, using the Segment Editor, you create a segment, then export a TIFF stack or NRRD with the same volume size as your original data set, but with just the data in your segment, all other voxels at 0?

Thanks!

-Hollister

In Segmentations module open the Import/Export section and export the segments into labelmap. If you have overlapping structures you need to export each to a different labelmap. Then you can click Save in the toolbar or main menu and export the labelmap to nrrd

Thanks for the reply Csaba.

This exports just the label map, with areas in the label as 1 and outside as zero. Is there a way to do the exact same thing, but exporting the volume data inside that label map? Meaning the greyscale values, not just the 1/0 inside/outside the label map.

Thanks!!!

-Hollister

Ah I see. You can use the Mask Scalar Volume module

Exactly what I was looking for. I knew there had to be a way!

Thanks!!

-Hollister

1 Like

@cpinter is there an easy way to do this programmatically, is there a “recipe” somewhere?

If I understand correctly, this function is doing the export, but at this point I cannot quickly figure out how to get to it from python. I was also not sure if parameterizing the export through the widget is the only approach to do this.

Found this thread: Get label map node from segmentation node that also discusses programmatic use. Let me study that first!

@fedorov Sounds good. Sorry for not reacting, I’m still in the process of moving continents. However, now the move itself is done and I’m gradually getting back to normal. Let me know if you need any guidance!

1 Like

No worries Csaba, I figured it out - Discourse search was very handy to locate that thread, and @lassoan helped with the bits I was missing. Good luck with the move, and settling down at the new place!

1 Like