I have a set of .swc files representing traces of neurons. I would like to convert these to a binary volume, where each voxel is 0 if it is not in the trace, and 1 otherwise. Any 3D representation of the voxels would be fine for my use case, as long as it can be read into Python downstream.
It seems that the Simple Neurite Tracer plugin for Fiji previously supported this type of functionality – in fact, this exact procedure is described in the first paragraph of the Methods section in the following paper https://peerj.com/articles/4312/ .
However, it does not seem that the functionality described in this paper still exists any longer in the SNT plugin. I am using Fiji with ImageJ 1.52p, the SNT plugin as packaged in the NeuroAnatomy plugin (as recommended in the SNT dialogue). I am able to import and view the SWC file via SNT, but cannot see any way to “rasterize” it (convert from a network of vertex coordinates to a set of active pixels/voxels). How can I do this?
Below is the description of the methods used in the paper mentioned above (which refers to functionality no longer available in the SNT plugin):
"We downloaded the olfactory projection neuron 1 (OP-1) model as a SWC file from DIADEM’s website at http://diademchallenge.org/data_set_downloads.html, along with its corresponding 3D TIFF image stack. We then rasterised the model (i.e., converted it from a network of vertex coordinates to a set of active pixels) by using the Simple Neurite Tracer (Longair, Baker & Armstrong, 2011) plugin for Fiji, function “Analysis > Render/Analyze Skeletonized Paths.” This produces a 6-connected skeleton path, which we needed to convert to a (thinner) 26-connected path, so we further skeletonized the raster with the morphology.skeletonize3d function from scikit-image (Van der Walt et al., 2014), and saved it as a compressed TIFF file. "