Solve an import problem for skimage version  0.18 or above
Before skimage version '0.18' the structural similiarity index function was skimage.measure.compare_ssim
For version '0.18' or above this function was replaced by skimage.metrics.structural_similarity
@@ -10,7 +10,12 @@ __all__ = ['cube_distance']
import numpy as np
import scipy.stats
from matplotlib import pyplot as plt
+try:
+ # before skimage version '0.18' the function is skimage.measure.compare_ssim
from skimage.measure import compare_ssim as ssim
+except:
+ # for skimage version '0.18' or above the function is skimage.metrics.structural_similarity
+ from skimage.metrics import structural_similarity as ssim
from ..var import get_annulus_segments
from ..conf import vip_figsize
