After opening and making the desired configuration in the Volume Viewer application, click on "Export" (the rightmost button on the toolbar) to save what you did.
Now just go to the command window and type:
That is assuming, for example, that the volume is called "Volume_Variable" in your current workspace and that the configuration you exported is called "config".
The function "volshow" will open a figure with the volume specified and the configuration you created beforehand. From here, exporting the figure to any format is rather straightforward - just click on the save button and choose whatever format you'd like.
Edit: The "Export" button in the volume viewer application was only introduced in Matlab R2019b.