Paint Segment Using Data Points in Python

Hi, so I have a series of (x,y,z) data points. I want to create a segmentation that will use paint to set the location and paint a sphere with a diameter of 3 at that location using code. I would be adding this to an existing segmentation of the spine. The circle location does not have to be super exact so I could round to the nearest existing pixel in the image. Would appreciate any guidance I am very new at this. Thank you!

You can create spheres and import them into the segmentation. See complete example here. You can find many more examples in the script repository.