I have been trying to use SciView to convert an STL or OBJ file into an image stack using the thread here: Converting .STL file into stack of images. Based on the information shared there, I started following the instructions on the ImageJ Voxelization webpage: https://imagej.net/Voxelization.
I can get the 3D model imported into Fiji through SciView but receive the following error in the console:
[ERROR] No SciJava display available. Use getOrCreateActiveSciView() to automatically create a display if one does not exist.
When I select āMesh To Imageā, I receive the following error message in the console and then no image stack is created:
[ERROR] Module threw exception
java.lang.IndexOutOfBoundsException
at java.nio.Buffer.checkIndex(Buffer.java:540)
at java.nio.DirectFloatBufferU.get(DirectFloatBufferU.java:253)
at net.imagej.mesh.nio.BufferMesh$Vertices.xf(BufferMesh.java:135)
at net.imagej.mesh.Vertices.x(Vertices.java:134)
at net.imagej.mesh.Vertex.x(Vertex.java:95)
at net.imagej.mesh.Vertex.localize(Vertex.java:144)
at net.imglib2.RealPoint.<init>(RealPoint.java:108)
at net.imagej.ops.geom.geom3d.DefaultVoxelization3D.calculate(DefaultVoxelization3D.java:85)
at net.imagej.ops.geom.geom3d.DefaultVoxelization3D.calculate(DefaultVoxelization3D.java:62)
at net.imagej.ops.special.function.UnaryFunctionOp.run(UnaryFunctionOp.java:74)
at net.imagej.ops.special.function.AbstractUnaryFunctionOp.run(AbstractUnaryFunctionOp.java:58)
at org.scijava.command.CommandModule.run(CommandModule.java:199)
at net.imagej.ops.OpEnvironment.run(OpEnvironment.java:950)
at net.imagej.ops.OpEnvironment.run(OpEnvironment.java:157)
at net.imagej.ops.geom.GeomNamespace.voxelization(GeomNamespace.java:284)
at sc.iview.commands.process.MeshToImage.run(MeshToImage.java:83)
at org.scijava.command.CommandModule.run(CommandModule.java:199)
at org.scijava.module.ModuleRunner.run(ModuleRunner.java:168)
at org.scijava.module.ModuleRunner.call(ModuleRunner.java:127)
at org.scijava.module.ModuleRunner.call(ModuleRunner.java:66)
at org.scijava.thread.DefaultThreadService.lambda$wrap$2(DefaultThreadService.java:228)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
I am running Fiji / ImageJ version 2.0.0-rc-71/1.52p, build: ea9a94b5e9.
Could anyone offer some recommendations on how to troubleshoot this, or alternative procedures to convert an STL to an image stack?
Thanks for your time!