cellmap_data.transforms.targets.distance#
Functions
|
Classes
|
Initialize the distance transform. |
|
Initialize the signed distance transform. |
- cellmap_data.transforms.targets.distance.transform(x: Tensor) Tensor [source]#
- Parameters:
x (Tensor)
- Return type:
Tensor
- class cellmap_data.transforms.targets.distance.DistanceTransform(use_cuda: bool = False, clip=[-inf, inf])[source]#
Initialize the distance transform.
- Parameters:
use_cuda (bool, optional) – Use CUDA. Defaults to False.
clip (list, optional) – Clip the output to the specified range. Defaults to [-torch.inf, torch.inf].
- Raises:
NotImplementedError – CUDA is not supported yet.
- class cellmap_data.transforms.targets.distance.SignedDistanceTransform(use_cuda: bool = False, clip=[-inf, inf])[source]#
Initialize the signed distance transform.
- Parameters:
use_cuda (bool, optional) – Use CUDA. Defaults to False.
clip (list, optional) – Clip the output to the specified range. Defaults to [-torch.inf, torch.inf].
- Raises:
NotImplementedError – CUDA is not supported yet.