<p>Your problem can be solved by the &quot;Marching cubes&quot; algorithm and is more appropriately placed in a 3D modeling stack exchange.
Here is an answer to a similar question about constructing 3D models from CT-scans: <a href="https://3dprinting.stackexchange.com/questions/2736/conversion-of-dicom-files-to-stl-files/2739#2739">Conversion of DICOM files to STL files</a></p>

CC BY-SA 4.0
2023-04-28T06:28:26.630Z
2023-04-28T06:28:26.630Z
Hacky
<p>In 3D printing, the opposite is usually the desired project, that is, to take a solid and slice it into layers. Many options abound in that respect.</p>
<p>For your objective, one might arbitrarily assign a thickness to each layer in order to provide for the third dimension and cluster each layer appropriately.</p>
<p>One can possibly use a program known as <a href="https://openscad.org/" rel="nofollow noreferrer">OpenSCAD</a>, free multi-platform. The code that comes to mind is to import the bitmap (which will have to be converted to SVG) and use linear_extrude() to create a thickness. Each image will then be translated in the z-axis to stack them with a minimal overlap to ensure manifold status (required for 3D models). The overlap can be as small as 0.0625 to minimize the overall effect, which can match the extrusion thickness as appropriate.</p>
<p>OpenSCAD uses implicit union to form the complete model, creating a result of one cell structure.</p>
<p>I see complications in that your TIFF file is grey scale and the process I describe is two-bit, black and white. If you can convert the bitmap to SVG and filter out by a threshold value, it may work.</p>
<p>OpenSCAD supports scripting but I think the key factor will be greyscale to two-bit and whether you can separate the images you have in a manner suitable for your objective.</p>
<p>To that end, consider to post in the <a href="https://graphicdesign.stackexchange.com/">graphic design SE</a> for a suitable program and/or method to solve the bitmap problem. Alignment of each layer is going to be based on the position in the original bitmap and the subsequent SVG file creation. If they are not properly aligned, some manual adjustment may be required.</p>

CC BY-SA 4.0
2023-04-29T12:45:26.870Z
+1 for OpenSCAD. The classic `admesh` utility might be useful for some analysis of the output, too.
R.. GitHub STOP HELPING ICE
CC BY-SA 4.0
2023-04-24T17:08:12.610Z
2023-04-24T17:16:12.670Z
2023-04-24T17:16:12.670Z
fred_dot_u
<p>for my graduation project I have to compare cells in a 3D- Model to one another in regard of their volume, side faces and the corresponding forms and their numbers.
First, I have about 300 Tif-Files of microscopic planes of cells (black and white) that I want to create a 3D-Model orientating on the cell membranes.</p>
<p>Second, I need a code or program that can differentiate the cell membrane (white to grey in TIF) from the cytoplasm (black in TIF), kind of trace it and then analyze the volumina of each cell and side faces in regard to their forms (what types of polygons they resemble) and the number of each form in the whole 3D-Stack (not bound to the cells where they occur, just a numeric listing).</p>
<p>Can you recommend a program for these problems? Or for the individual programms?</p>
<p>I am unfortunately not very knowledgeable in this field and would greatly appreciate your advice.</p>

CC BY-SA 4.0
2023-04-24T12:37:39.760Z
I'm not sure that this is particularly related to 3D printing
Greenonline
CC BY-SA 4.0
2023-05-04T12:41:47.223Z
Could you please clarify the relation to 3D printing? Furthermore, recommendations for a software are out of scope for SE sites other than hardware or sofware recommendation SE's.
0scar
<3d-models><3d-design><software>
Create a 3D-Model out of a 2D-Stack of microscopic planes and analyze it according to volume, side faces and number?
Sarah
# Create a 3D-Model out of a 2D-Stack of microscopic planes and analyze it according to volume, side faces and number?

(Asked by: username_0 on 2023-04-24)

for my graduation project I have to compare cells in a 3D- Model to one another in regard of their volume, side faces and the corresponding forms and their numbers.
First, I have about 300 Tif-Files of microscopic planes of cells (black and white) that I want to create a 3D-Model orientating on the cell membranes.

Second, I need a code or program that can differentiate the cell membrane (white to grey in TIF) from the cytoplasm (black in TIF), kind of trace it and then analyze the volumina of each cell and side faces in regard to their forms (what types of polygons they resemble) and the number of each form in the whole 3D-Stack (not bound to the cells where they occur, just a numeric listing).

Can you recommend a program for these problems? Or for the individual programms?

I am unfortunately not very knowledgeable in this field and would greatly appreciate your advice.

**Tags:** 3d-models, 3d-design, software
> **Comments:**
> **username_1**: I'm not sure that this is particularly related to 3D printing  
> **username_2**: Could you please clarify the relation to 3D printing? Furthermore, recommendations for a software are out of scope for SE sites other than hardware or sofware recommendation SE's.  

---

## 2 answers

### Answer by username_4 on 2023-04-24. Score: 1

In 3D printing, the opposite is usually the desired project, that is, to take a solid and slice it into layers. Many options abound in that respect.

For your objective, one might arbitrarily assign a thickness to each layer in order to provide for the third dimension and cluster each layer appropriately.

One can possibly use a program known as [OpenSCAD](https://openscad.org/), free multi-platform. The code that comes to mind is to import the bitmap (which will have to be converted to SVG) and use linear\_extrude() to create a thickness. Each image will then be translated in the z-axis to stack them with a minimal overlap to ensure manifold status (required for 3D models). The overlap can be as small as 0.0625 to minimize the overall effect, which can match the extrusion thickness as appropriate.

OpenSCAD uses implicit union to form the complete model, creating a result of one cell structure.

I see complications in that your TIFF file is grey scale and the process I describe is two-bit, black and white. If you can convert the bitmap to SVG and filter out by a threshold value, it may work.

OpenSCAD supports scripting but I think the key factor will be greyscale to two-bit and whether you can separate the images you have in a manner suitable for your objective.

To that end, consider to post in the [graphic design SE](https://graphicdesign.stackexchange.com/) for a suitable program and/or method to solve the bitmap problem. Alignment of each layer is going to be based on the position in the original bitmap and the subsequent SVG file creation. If they are not properly aligned, some manual adjustment may be required.

> **Comments:**
> **username_5**: +1 for OpenSCAD. The classic `admesh` utility might be useful for some analysis of the output, too.  

---

### Answer by username_3 on 2023-04-28. Score: 0

Your problem can be solved by the "Marching cubes" algorithm and is more appropriately placed in a 3D modeling stack exchange.
Here is an answer to a similar question about constructing 3D models from CT-scans: [Conversion of DICOM files to STL files](https://3dprinting.stackexchange.com/questions/2736/conversion-of-dicom-files-to-stl-files/2739#2739)


---

