Thresholding series of 2D images

I have a series of 2D images, for which I would like to use the segment editor to mask out the background. It seems fine in the preview, but when I apply there is this ghost of other slices?

Is this because of interpolation between slices (this is not a 3D volume, but series of 2D images). If so, is there a chance to apply the threshold per slice basis?

The thresholding would be at the pixel level, so slice/volume shouldn’t matter. Are you sure this isn’t just a rendering issue? Maybe turn off interpolation in the slice view.

Interesting, it seems like a rendering issue in my other computer. I can’t replicate it with a different computer. Thanks.

I do have one more question. There are small gaps, which I would like to fill. Normally I would use closing filter to do that. But when I do, due to 3D interpolation I get artifacts (i.e, mask extending into places where it shouldnt). Would it be possible to run this slice-by-slice somehow?

Yes, unlike thresholding, any of the 3d operations are going to have trouble with this kind of data (since it’s not a volume). The thing I would look at doing would be to do some of these operations at the numpy array level.

Regarding the rendering issue, that really shouldn’t happen differently on different machines. If you are able to replicate it in some small test maybe you can share the steps and others can try?

1 Like

You can find the sample data here;
OSF | 39384_cropped_photos.zip

It didn’t happen for me either (on mac book air m2). Is it repeatable on the machine where it happened? What is different about that computer?

It is an older Macbook pro (intel chip), but funny thing I can’t reproduce it anymore.