Resampling a Labelmap Volume

How can I resample a binary labelmap volume to an image origin of [0,0,0] and an image spacing of [1,1,1] that preserves the labelmap classes in the volume output? Is there a way to do this programmatically?

You can use any of the resample modules. The simplest way to preserve label values is to use nearest neighbor “interpolation”.

To invoke the resample volume programmatically, you could look into: