Mean values from spherical ROIs in 3D image
I am trying to measure the mean pixel values from ~ 100 individual ROIs in a 4D image hyperstacks (x,y,z,and 4 channels) and doing this for a few hundred images. I have a list of xyz coords to site the centre of the ROI. Now, I know how to do this for a 2D image with multiple channels, but I'm wondering if there is a simple way to do this in 3D? As a further detail, I would ideally like the ROI to be "spherical" not a cube. I'd like to be able to vary the radius of the spherical ROI to optimise the measurements. Any help would be much appreciated.
My current thought is to loop through each location, seed a spherical ROI wave (in binary, not sure how), multiply the image by this ROIwave and sum the pixels and divide by ROI size to get the result. I've not tried this yet, but it sound like it could be pretty slow and given the optimisation and number of images, I'm wondering about a more efficient method. Maybe ImageStats can use a 3D ROI wave...?
Wed, 07/04/2018 - 03:06 am