Export multiple individual segment .stl files from one segmented nii.gz file using python script

Yes, you can save segmentations to all these formats. You can find more examples in this forum, for example: