In current Slicer versions, segmentation is not cropped to the minimum extent anymore by default. You can enable this option (to reduce memory usage) or disable it (to make it easier to use the segmentation in software that operates in voxel space instead of physical space) in the Save data dialog.
Have a look at the files - MRHead, Segmentation, and the labelmap all have the same extent. They are all correct.
The segmentation that is imported from a labelmap is not associated with any reference volume, so there is no reference geometry to stick to when the segmentation is saved. We need to consider other use cases, too, but probably we can change the behavior so that reference geometry will be set when importing a plain nrrd or nifti file. I’ve added a ticket to track this request:
I would recommend to use .seg.nrrd file format for storing segmentations. You can use it the same way in SimpleITK, but it stores extra information, such as segment names, colors, etc. You can access this metadata from Python, without Slicer as shown here.
Reference image geometry is stored in Segmentation_ConversionParameters field:
Segmentation_ConversionParameters:=…sampling is calculated.&Reference image geometry|0;0;1.2999954223632812;-86.64489746093749;-1;0;0;133.92860412597656;0;-1;0;116.78569793701172;0;0;0;1;0;255;0;255;0;129;|Image geometry description string determining the geometry of the labelmap that is created in course of conversion. Can be copied from a volume, using the button.&Smoothing factor|0.5|Smoo…