ants.label.image_to_cluster_images
- image_to_cluster_images(image, min_cluster_size=50, min_thresh=1e-06, max_thresh=1)[source]
Converts an image to several independent images.
Produces a unique image for each connected component 1 through N of size > min_cluster_size
ANTsR function: image2ClusterImages
- Parameters:
image (
ants.core.ANTsImage) – input imagemin_cluster_size (
int) – throw away clusters smaller than this valuemin_thresh (
scalar) – threshold to a statistical mapmax_thresh (
scalar) – threshold to a statistical map
- Return type:
listofANTsImage types
Example
>>> import ants >>> image = ants.image_read(ants.get_ants_data('r16')) >>> image = ants.threshold_image(image, 1, 1e15) >>> image_cluster_list = ants.image_to_cluster_images(image)