I want to create a closed contour from hdr/img data

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?

If you load the image as segmentation then this boundary is automatically added for you.

However, for this first you need to convert the legacy hdr/img format to nrrd or nifti. You can do that by loading the hdr/img file into Slicer as a Volume and then saving it in the new format.