Comments (3)
Hello
I have wondered about using the marching cubes algorithm before. I didn't know if it would produce produce simple closed surfaces. It sounds like a good idea though!
The scaling always uses the long axis of the image.
Lx = labeling.shape[2]*spacing[2]
Ly = labeling.shape[1]*spacing[1]
Lz = labelling.shape[0]*spacing[0]
(I suspect that is how python is ordering the axis, but if not I hope it makes sense.)
Then the scale factor will be
factor = 1/max(Lx, Ly, Lz)
The offset is half the image as you have noticed.
ox = -0.5*Lx*factor
oy = -0.5*Ly*factor
oz = -0.5*Lz*factor
So you need to know the spacing and the image dimensions. I hope that helps.
Cheers
from deformingmesh3d-plugin.
Awesome thanks!
I think the step_size
parameter in marching cubes will be crucial to generate simple meshes. With step_size = 1
the meshes are very dense and deforming them takes longs. However, if I use connection remesh
the meshes get simple enough. I will experiment now with increasing step_size
.
That being said, using these meshes as initialization works very well!
from deformingmesh3d-plugin.
Just in case, I put my script to convert a label image to meshes here: https://github.com/fmi-faim/faim-3d-organoid-seg/tree/main/ipa/convert-labeling-to-meshes
Using the step_size
parameter in marching cubes works well to get coarse meshes. One just has to be careful to handle objects which are smaller than the step_size
.
from deformingmesh3d-plugin.
Related Issues (9)
- Make ctrl-s save the current meshes. HOT 2
- Colors are linked to names. HOT 1
- sphere initialization handles are not scaled properly. HOT 1
- Volume displayed in the volume viewer doesn't update scale when a new image is opened. HOT 1
- BUG: Selected mesh stays selected when tracks are cleared. HOT 1
- Record snapshots is broken when the volume is showing. HOT 1
- Control the furrow plan from the 3D canvas.
- Interactive track adjustment.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from deformingmesh3d-plugin.