I have stl file of packing of angular particles. The cubic packing size is 400 voxels and the voxel size is 0.03111 mm. I need to convert the stl file to the tiff stack with 400 slices and a pixel size of 0.03111 mm. I have tried the python script provided by the team in 3d slicer (Convert STL file to high-resolution TIFF stack - #8 by lassoan) but didn’t get the correct result. It just gave 2 slices after 1 hour and the slices just include a single black point.
I need to know what values should I use in the following parts:
outputVolumeLabelValue, inPlaneResolutionDpi, planeThicknessMm, outputVolumeMarginMm
How would you calculate 25.4 in the following part? What values should I use for my packing?
imageSpacingMm = [25.4/inPlaneResolutionDpi, 25.4/inPlaneResolutionDpi, planeThicknessMm]
If you have your image spacing defined as mm/pixel instead of inches/pixel (DPI) then you can set that directly in imageSpacingMm. 0.03111mm/pixel = 0.0012248 in/pixel => 816 pixel/in (DPI), so the default 400 DPI should be OK, but just for initial testing you can try lower resolution (40DPI).
How many points does your STL file contain? Can you share the file so that I can test it?