Skip to content

Convert colored mesh to volume #897

Discussion options

You must be logged in to vote

No issues at all! So let's consider an image of a cat next to a dog. The labels may be a 2D binary mask, where each pixel is either foreground (1; either cat or dog) or background (0). This contains two classes (foreground and background) and the problem can be extended to n classes (e.g. background (0), dog (1), cat (2)). So every pixel in this labels image aligns with the original image. If you do image[np.where(label_mask == 1)] then all pixels will belong to a cat.

Now, in our previous discussion, this is in 3D space. So I want a label mask (integers) where each voxel is a label for the raw volume (in lego format according to vedo docs). To retain this information from a mesh, we need…

Replies: 7 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by marcomusy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #894 on July 14, 2023 11:58.