Converting .STL file into stack of images

fiji
3d-viewer
imagej
stackconverter
imageconverter

#1

Dear Forum,
I am as new as they come when it comes to ImageJ, and would greatly appreciate assistance on this.
I am interested in importing an STL file (which I know how to do through 3D viewer). Though, I would now like to convert that STL file as a series of stacked images, so that I can later open it in IMARIS, which doesn’t support the import of STL, but stacked images.

P.S. I’ve read tutorials on how convert stacked images to STL, but not the other way round, I am not sure that it’s possible, but I am looking forward to being proven wrong.

Regards,
Ahmed


3 D registration for image stack with 270 images
Fractal Dimension of STL mesh
Which input file format for 3D data?
3D viewer cannot work when following "The road to Java 8" steps
Unable to convert stl to stacks
bUnwarpJ registration
#2

I wrote a voxelizer for 3D viewer that does just this, but haven’t dealt with releasing it yet. Let me look into doing that…


#3

Until I add this to the main version of 3D viewer, you can get my version of 3D viewer (which works exactly the same as the current 3D viewer with couple of extra features) from the Funimage update site. You will get a dialog asking you to set the dimensions of the output image. This is what the output looks like:

The output is an image with voxels filled in along the surface. If you want a solid body as the image you can use 3D flood fill, which comes from the “3D ImageJ Suite” update site.


#4

Should be on the Funimage update site now


#5

Hey, thanks for getting back to me. I am on the Index of /Funimage, could you direct me towards the plugin, I can’t seem to find it.


#6

Well, it is inside the plugins/ directory of Funimage.

However, the easy way to install these things (including the 3D ImageJ Suite, is by using update sites through the FIJI version of ImageJ.


#7

Hi, I’ve installed the plugin, placed the JAR file into the plugin folder, and restarted ImageJ, though I either can’t see your plugin in the menu, or in 3D Viewer does not have the option to “voxelize mesh”.


#8

Did you move the version of 3D viewer that was already there? If you use update sites in FIJI this would be taken care of automatically, but you will need to move the older version manually out of the plugins directory otherwise.


#9

Here is my plugin directory, I moved the original 3D viewer out, checking Fiji again, I can no longer see 3D Viewer


#10

Rename the extension on 3D viewer to “.jar” from the current extension of “jar-20160525164909”. The version on the update site is setup to be handled by the FIJI updater, which would have done this renaming for you.


#11

woo! it’s sorted, ended up just going to Help > Update > Manage update sites, and added both plugins. Very nice plugin, thanks for the help!

Ahmed


#12

Good, I was just about to reply asking you to please not try to install stuff manually. We did a whole lot of work in ImageJ2 to make installation simple, so why not use it?

Glad it is working.


#13

The Voxelizer works fine, however, I am trying to use the 3D fill (as I require a solid shape), but isn’t changing anything.


#14

Is the color set? Changing the color can be kind of confusing: double-click the dropper icon in the ImageJ bar and change it to something like a mid-level gray.


#15

@kephale would it be possible to make the voxelisation a standalone plugin, that just calls the relevant methods? That way enormous STLs can be turned directly to TIFFs on disk without having to go through the pain of rendering them first. the user might also have the option to choose the pixel spacing of their image stack, relative to STL triangle size/scale. BoneJ bundles an STL converter which goes from open 3D ImagePlus -> STL on disk without display, but doesn’t go the other way.


#16

Hey, tried changing the color, but no change. I am using the function: 3D > 3D Fill Holes, I am assume that is the same function you are using. I’ve updated ImageJ to include the 3D Image Suite, all I see is 3D Fill Holes (not 3D Flood Fill).


#17

Aha!

3D fill holes does make things solid, but it wont work in this context due to the topology (I believe). It also automatically determines which regions to fill.

I may have been mistaken about the library providing the flood fill. Do you have this menu entry Plugins>Process>Flood Fill (3D)? This would be the one you want.


#18

Yes, I have some similar use cases. I’ll be working on cleaning up and separating this code at the hackathon, and will pester @rimadoma about making sure that it does the job for BoneJ!!


#19

Not sure there’s a great need for BoneJ to have this. What we do need to do is devolve the stack->STL code out of BoneJ1 and into ImageJ2’s general data conversion tools, which might already exist in ImageJ2’s Ops framework. It would make sense at that point to have the reverse procedure next to it, with some kind of harmonious naming / API.

This would fit in with the general thrust to decouple processing from display - at the moment, the 3D Viewer requires an intermediate display step which is not necessary and sometimes breaks the processing pipeline (usually because the data is too big for the GPU).


#20

Yeah, dissecting 3D viewer is also on the agenda. The hope is to migrate as much as is appropriate to Ops (@tibuch’s marching cubes was one of the bigger steps in that direction).