Right now the contour runs into the boundary of the box, and it is then open. One thing that I could think of was to either surround the current volume with a layer of zero voxels (which would close the contour), or modify the volume itself by setting the voxels close to the boundary to zero.
Is this a good approach, hopefully supported by slicer. Or is there something better?