You can do it a bit simpler:
- Load the STL as segmentation: in “Add data” dialog, choose “Segmentation” in description column
- Create master volume of at the desired resolution: Go to Segment Editor module, click on Specify geometry button (next to Master volume selector), select your input mesh as source geometry, specify voxel size (spacing values) and click OK
- Create binary labelmap representation: go to Data module, right-click on the segmentation and choose Export visible segments to binary labelmap