Partition the lung
partition_lung( img, kernel_size = c(30, 30, 30), kernel_stride = c(30, 30, 30), centroid = TRUE )
| img | Lung scan to be partitioned. Can be in 3D matrix or ANTs image file format. |
|---|---|
| kernel_size | Size of the kernel, in voxel units of width, depth, and height. Must be c(3,3,3) or greater. Default: c(30,30,30) |
| kernel_stride | Stride (or spacing) between kernels, in voxel units, for width, depth, and height. If kernel_stride = kernel_size, the partitions are non-overlapping. If stride = c(1,1,1), then each voxel is returned. |
| centroid | Logical. If true, output includes the centroids of each partition. |
Matrix of x, y, and z coordinates for each partition