See the script repository for an example how to create a new volume: https://www.slicer.org/wiki/Documentation/Nightly/ScriptRepository#Create_a_new_volume
In recent Slicer nightly builds, there is a feature introduced exactly for this, as explained in this post: Improve the resolution of segment for "import a model"