Polymender can be used to rasterize (or scan-convert) any 3D polyhedral model into an inside/outside volume at any chosen resolution.
First, download the latest Polymender executable
here. This tool takes any polyhedral model (represented as a triangulated mesh in PLY or STL
format) and fixes errors like gaps, holes, and
self-intersections. As an intermediate step, it rasterizes
the model to an inside/outside volume at a user-specified resolution. The volume is represented as an
octree, which is made up of (signed) cubic cells of different sizes depending
on where they are (the cells closer to the object surface are finer).
To output this signed octree, use ".sof" as the output format. For example:
Next, download this mrc.zip package. The package contains a program, sof2mrc.exe, which turns the signed octree in a ".sof" file into a regular signed volume on a uniform grid, represented in MRC format. For example, run:
About MRC format: This is a standard format of 3D volume used in molecular biology. The description of the file format can be found here. You can also view a MRC file using the free Chimera viewer. The mrc.zip package also contains some sample C++ code to write/read MRC files (in mrc_sample.h) and a test MRC data (bvp8.mrc). |