Batch Processing Stl files into binary images for Radiomics

Hi, is there a way to batch process the discretization of stl files into binary images to be loaded into either slicerradiomics or into pyradiomics for feature extraction? Or maybe there is a way to simply load in the stl file with trimesh or numpy-stl and discretize it in order to use pyradiomics?

Yes, you can do that with a small python script. See these examples

How do you go about batch importing files into a MRML scene and then accessing each node in order to use the example code you provided?

Generally you probably want to load each one, convert it, save it, and delete it. Just do that in a loop over all your file names. I don’t think we have a canned example of that but it’s something a chatbot should be good at generating for you.