Binary image to cloud points in physical coordinates

I have a binary 3d image. How can I extract a point cloud from the image surface in physical coordinates?

This example should help.

Hi, thanks for your answer but this example uses itk :: BinaryMask3DMeshSource. In my previous question Previous question I asked how to get the physical coordinates of the mesh. As you told me according to the comments and the code seems to be that the coordinates of the mesh are physical coordinates but when I assign the GetOutput () method of itk :: BinaryMask3DMeshSource object to an ITK :: Mesh and I access the nodes and the cells coordinates, both are still in CT image coordinates and not physical coordinates. Maybe I’m doing something wrong but I don’t know.

When reading your CT image, are you getting all its metadata too? Physical coordinates are computed from the metadata.

1 Like

I am reading an nrrd file, this file is a volume formed from several slices. I am reading the file the same as in this example Example

You could try a better image to mesh converter, in Cuberille module. It can be built as part of ITK by enabling Module_Cuberille in CMake configuration.

2 Likes