예제 #1
0
def apply_equalize3d(input: torch.Tensor, params: Dict[str, torch.Tensor]) -> torch.Tensor:
    r"""Equalize a tensor volume or a batch of tensors volumes with given random parameters.

    Args:
        input (torch.Tensor): Tensor to be transformed with shape :math:`(*, C, D, H, W)`.
        params (Dict[str, torch.Tensor]): shall be empty.

    Returns:
        torch.Tensor: Equalized input with shape :math:`(*, C, D, H, W)`.
    """

    return equalize3d(input)
예제 #2
0
def apply_equalize3d(input: torch.Tensor,
                     params: Dict[str, torch.Tensor]) -> torch.Tensor:
    r"""Equalize a tensor volume or a batch of tensors volumes with given random parameters.
    Args:
        input (torch.Tensor): Tensor to be transformed with shape :math:`(D, H, W)`, :math:`(C, D, H, W)`,
            :math:`(*, C, D, H, W)`.
        params (Dict[str, torch.Tensor]): shall be empty.
    Returns:
        torch.Tensor: The equalized input. :math:`(D, H, W)`, :math:`(C, D, H, W)`, :math:`(*, C, D, H, W)`.
    """
    input = _transform_input3d(input)
    _validate_input_dtype(
        input, accepted_dtypes=[torch.float16, torch.float32, torch.float64])

    return equalize3d(input)
예제 #3
0
 def apply_transform(
     self, input: Tensor, params: Dict[str, Tensor], transform: Optional[Tensor] = None
 ) -> Tensor:
     return equalize3d(input)