Mean values from spherical ROIs in 3D image
sjr51
Wed, 07/04/2018 - 03:06 am
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...?
July 4, 2018 at 06:48 am - Permalink
July 4, 2018 at 11:32 am - Permalink
July 4, 2018 at 01:10 pm - Permalink
July 6, 2018 at 08:48 am - Permalink
July 6, 2018 at 11:21 pm - Permalink
Variable re=x0+deltaX
// similarly for cs and ce.
MatrixOP/O aa=sum(subrange(w,rs,re,cs,ce))
July 7, 2018 at 01:32 pm - Permalink