skshapes package¶
Scikit-Shapes: shape analysis in python.
Subpackages¶
- skshapes.applications package
- skshapes.convolutions package
- skshapes.data package
Circle()
Sphere()
- Submodules
- skshapes.data.image module
- skshapes.data.polydata module
PolyData
PolyData.add_landmarks()
PolyData.bounding_grid()
PolyData.cache_clear()
PolyData.control_points
PolyData.copy()
PolyData.decimate()
PolyData.device
PolyData.dim
PolyData.edge_centers
PolyData.edge_data
PolyData.edge_lengths
PolyData.edges
PolyData.is_triangle_mesh()
PolyData.k_ring_graph()
PolyData.knn_graph()
PolyData.landmark_indices
PolyData.landmark_points
PolyData.landmark_points_3D
PolyData.landmarks
PolyData.mean_point
PolyData.n_edges
PolyData.n_landmarks
PolyData.n_points
PolyData.n_triangles
PolyData.plot()
PolyData.point_data
PolyData.point_weights
PolyData.points
PolyData.save()
PolyData.standard_deviation
PolyData.stiff_edges
PolyData.to()
PolyData.to_pyvista()
PolyData.to_vedo()
PolyData.to_weighted_points()
PolyData.triangle_areas
PolyData.triangle_centers
PolyData.triangle_data
PolyData.triangle_normals
PolyData.triangles
- skshapes.data.utils module
- skshapes.decimation package
- skshapes.features package
- skshapes.input_validation package
- skshapes.loss package
- skshapes.morphing package
- skshapes.multiscaling package
- skshapes.optimization package
- skshapes.tasks package
- skshapes.triangle_mesh package
Submodules¶
skshapes.errors module¶
Custom errors for the skshapes package.
skshapes.globals module¶
This modules contains global variables for the skshapes package
skshapes.types module¶
Types aliases and utility functions for scikit-shapes.
- class skshapes.types.CoarseToFinePolicy(smoothing: Literal['constant', 'point_convolution', 'mesh_convolution'] = 'constant', n_smoothing_steps: int = 1)¶
Bases:
NamedTuple
Parameters for the coarse to fine propagation scheme.
- Parameters:
smoothing (str, default="constant") – The smoothing operation to use when propagating the signal from the coarse to the fine resolutions. Possible values are “constant”, “point_convolution” and “mesh_convolution”.
n_smoothing_steps (int, default=1) – The number of smoothing steps to perform when propagating the signal from the coarse to the fine resolutions.
- class skshapes.types.FineToCoarsePolicy(reduce: Literal['mean', 'max', 'min', 'sum'] = 'mean')¶
Bases:
NamedTuple
Parameters for the fine to coarse propagation scheme.
- Parameters:
reduce (str, default="mean") – The reduction operation to use when propagating the signal from the fine to the coarse resolutions. Possible values are “mean”, “max”, “min” and “sum”.
- class skshapes.types.MorphingOutput(morphed_shape=None, regularization=None, path=None, path_length=None, **kwargs)¶
Bases:
object
Class containing the result of the morphing algorithms.
It acts as a container for the result of the morphing algorithms. It contains the morphed shape, the regularization parameter (if any), the path (if any), the path length (if any) and eventually other attributes.
- Parameters:
morphed_shape (
polydata_type
|image_type
|None
) – the morphed shaperegularization (
Float32[Tensor, '']
|None
) – the regularization parameterpath (
list
[polydata_type
|image_type
] |None
) – the path (list of shapes)path_length (
Float32[Tensor, '']
|None
) – the length of the pathkwargs – other attributes (if any)
skshapes.utils module¶
Utility functions for the skshapes package.
- skshapes.utils.diagonal_ranges(batch_x=None, batch_y=None)¶
Encode the block-diagonal structure associated to a batch vector.
- skshapes.utils.ranges_slices(batch)¶
Helper function for the diagonal ranges function.
- skshapes.utils.scatter(src, index, reduce='mean', min_length=None, blank_value=0)¶
Scatter operation on a tensor.
This function is a wrapper around the pytorch scatter function. Available reduce operations are “sum”, “min”, “max”, “mean”. It is compatible with automatic differentiation.
- Parameters:
src (
']
|']
) – The source tensor.index (
Int64[Tensor, '_']
) – The indices of the elements to scatter.reduce (
Literal
['sum'
,'min'
,'max'
,'mean'
]) – The reduce operation to apply. Defaults to “mean”.min_length (
int
|None
) – The minimum length of the output tensor. If None it is set according to the highest index value.blank_value (
int
|float
) – The value to set for the elements of the output tensor that are not referenced by the index tensor.