package
imea.measure_3d
3-dimensional shape measurements.
module
imea.measure_3d.macro
3-dimensional macrodescriptors.
Functions
feret_and_max_dimensions_3d(convex_hull,spatial_resolution,dalpha)(tuple) — Calculates 3D feret diameter (min, max) and max dimensions (x_max, y_max, z_max) [1].min_3d_bounding_box(img_3d_equalspace,spatial_resolution)(tuple) — Calculate minimal 3-dimensional bounding box from a 3D grayscale image.surfacearea_convexhull(convex_hull,spatial_resolution)(float) — Calculate surface area of convex hull.surfacearea_equivalent_diameter(surface_area)(float) — Calculate surfacearea-equivalent diameter.volume(img_3d_equalspace,spatial_resolution)(float) — Calculate volume.volume_convexhull(convex_hull,spatial_resolution)(float) — Calculate volume of convex hull.volume_equivalent_diameter(volume)(float) — Calculate volume equivalent diameter.
function
imea.measure_3d.macro.volume(img_3d_equalspace, spatial_resolution)
Calculate volume.
Parameters
img_3d_equalspace(numpy.ndarray, type float) — 2-dimensional grayscale heightmap of single object with equal spacing, i.e. dx = dy = dz. Pixels not showing the pixel should be 0.spatial_resolution(float) — Spatial resolution ofimg_3d_equalspacein [mm/Voxel]. The following must be true: spatial_resolution == dx == dy == dz.
Returns (float)
volume(float): Volume in [mm^3].
function
imea.measure_3d.macro.volume_convexhull(convex_hull, spatial_resolution)
Calculate volume of convex hull.
Parameters
convex_hull(scipy.spatial.ConvexHull) — Convex Hull.spatial_resolution(float) — Spatial resolution ofconvex_hullin [mm/Voxel].
Returns (float)
volume_convexhull(float): Volume of convex hull in [mm^3].
function
imea.measure_3d.macro.volume_equivalent_diameter(volume)
Calculate volume equivalent diameter.
Parameters
volume(float) — Volume.
Returns (float)
volume_equivalent_diameter(float): Volume-equivalent diameter.
function
imea.measure_3d.macro.surfacearea_convexhull(convex_hull, spatial_resolution)
Calculate surface area of convex hull.
Parameters
convex_hull(scipy.spatial.ConvexHull) — Convex Hull.spatial_resolution(float) — Spatial resolution ofconvex_hullin [mm/Voxel].
Returns (float)
surface_area(float): Surface area of convex hull in [mm^2].
function
imea.measure_3d.macro.surfacearea_equivalent_diameter(surface_area)
Calculate surfacearea-equivalent diameter.
Parameters
surface_area(float) — Surface area.
Returns (float)
surfacearea_equivalent_diameter(float): Surface area-equivalent diameter.
function
imea.measure_3d.macro.min_3d_bounding_box(img_3d_equalspace, spatial_resolution)
Calculate minimal 3-dimensional bounding box from a 3D grayscale image.
Parameters
img_3d_equalspace(numpy.ndarray, type float) — 2-dimensional grayscale heightmap of single object with equal spacing, i.e. dx = dy = dz. Pixels not showing the pixel should be 0.spatial_resolution(float) — Spatial resolution ofimg_3d_equalspacein [mm/Voxel]. The following must be true: spatial_resolution == dx == dy == dz.
Returns (tuple)
length(float): Length of minimal 3-dimensional bounding box.width(float): Width of minimal 3-dimensional bounding box.height(float): Height of minimal 3-dimensional bounding box.
Notes
length and width are identical to the 2d bounding box.
height is the maximum height in z-direction.
function
imea.measure_3d.macro.feret_and_max_dimensions_3d(convex_hull, spatial_resolution, dalpha=9)
Calculates 3D feret diameter (min, max) and max dimensions (x_max, y_max, z_max) [1].
Parameters
convex_hull(scipy.spatial.ConvexHull) — 3D convex hull.spatial_resolution(float) — Spatial resolution ofconvex_hullin [mm].dalpha(int, optional) — Angle in degrees by whichconvex_hullat each iteration, by default 9.
Returns (tuple)
feret_3d_max(float): Max feret diameter.feret_3d_min(float): Min feret diameter.x_max_3d(float): x_max (equal to max_feret) [1].y_max_3d(float): y_max (orthogonal to x_max) [1].z_max_3d(float): z_max (orthogonal to x_max and y_max) [1].
References
[1] M. Steuer (2010). "Serial classification". In: AT Mineral Processing 51(1).
module
imea.measure_3d.utils
Helping functions for 3-dimensional shape measurements.
Functions
compute_convexhull(img_3d_equalspace)(scipy.spatial.ConvexHull) — Calculate convex hull from 3d image.
function
imea.measure_3d.utils.compute_convexhull(img_3d_equalspace)
Calculate convex hull from 3d image.
Parameters
img_3d_equalspace(numpy.ndarray, type float) — 2-dimensional grayscale heightmap of single object with equal spacing, i.e. dx = dy = dz. Pixels not showing the pixel should be 0.
Returns (scipy.spatial.ConvexHull)
convex_hull(scipy.spatial.ConvexHull): Convex hull.