tools.ssim#
- bartorch.tools.ssim()#
Mean structural similarity of the magnitudes.
Magnitudes are the root sum of squares over the coil axis, and each image is divided by the maximum magnitude of its
reference. SSIM withk1 = 0.01,k2 = 0.03, dynamic range one and population statistics over a uniform 7x7 window in(y, x), at every position the window fits whole (no padding), averaged over those positions, overzand over every other axis.- Parameters:
reference (torch.Tensor) –
(..., coils, z, y, x), or a(y, x)image;yandxat least seven.input (torch.Tensor) –
(..., coils, z, y, x), or a(y, x)image;yandxat least seven.
- Returns:
Mean SSIM, at most one.
- Return type:
float
- Raises:
ValueError – If
yorxis below seven.