Skip to content

Inconsistent foreground/background labels #62

Open
@MattTheCuber

Description

@MattTheCuber

Hello,

This is probably a problem on my end due to lack of understanding of how this library works. When using this library to generate a mesh from a 3D binary array, I am getting inconsistent foreground/background labels and can't seem to find a pattern for this. Below is my code:

import itk
from itk import itkCleaverImageToMeshFilterPython

data = np.array(...)

tet_mesh, triangle_mesh = itkCleaverImageToMeshFilterPython.cleaver_image_to_mesh_filter(itk.image_from_array(data))
itk.meshwrite(triangle_mesh, "test.vtk")

Sometimes the background is 0s while the foreground is 1s when I inspect this mesh. I can't seem to find a way to reliably determine when it's one or the other.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions