0

I have a three dimensional binary image for which I am working on determining the two-point cluster function. The first step to doing this is to define all of the connected regions within the image. I have successfully done so with skimage as:

from skimage.measure import label
from skimage.morphology import remove_small_objects
from skimage.measure import label
from skimage.morphology import remove_small_objects
min = 64
label_file = label(newim_int, return_num=True, connectivity=2)
image_clean = remove_small_objects(label_file[0], min_size=min,connectivity=2, in_place=True)
label_file = label(image_clean, return_num=True, connectivity=2)

with a bunch of stuff missing to read in the file, etc between min= and label_file= I would now like to know the distribution of sizes of the regions labeled here. Unfortunately, skimage.measure.regionprops tells me it only works for 2D images. Is there another way to do this? Thanks

LM Anovitz
  • 61
  • 1
  • 5
  • you would like to do a 3d hough transformation. You will find a tool written in matlab in the fileexchange site. Maybe you code it in python. I do not know if it is implemented in python – Moritz May 27 '15 at 00:20

1 Answers1

0

regionprops has already started being expanded to include 3d images; at present some of the properties return a NotImplementedError.

Fortunately, area already works for 3d so you should be able to use this property.

jmetz
  • 12,144
  • 3
  • 30
  • 41