diff --git a/mantidimaging/core/operations/remove_dead_stripe/remove_dead_stripe.py b/mantidimaging/core/operations/remove_dead_stripe/remove_dead_stripe.py index 96bd40e6390..97a5339c922 100644 --- a/mantidimaging/core/operations/remove_dead_stripe/remove_dead_stripe.py +++ b/mantidimaging/core/operations/remove_dead_stripe/remove_dead_stripe.py @@ -35,8 +35,8 @@ class RemoveDeadStripesFilter(BaseFilter): link_histograms = True operate_on_sinograms = True - @classmethod - def filter_func(cls, images: ImageStack, snr=3, size=61, progress=None): + @staticmethod + def filter_func(images: ImageStack, snr=3, size=61, progress=None): """ :param snr: The ratio value. :param size: The window size of the median filter to remove dead stripes. @@ -47,9 +47,9 @@ def filter_func(cls, images: ImageStack, snr=3, size=61, progress=None): return images params = {"snr": snr, "size": size, "residual": False} if images.is_sinograms: - compute_func = cls.compute_function_sino + compute_func = RemoveDeadStripesFilter.compute_function_sino else: - compute_func = cls.compute_function + compute_func = RemoveDeadStripesFilter.compute_function ps.run_compute_func(compute_func, images.num_sinograms, images.shared_array, params, progress) return images diff --git a/mantidimaging/core/operations/remove_large_stripe/remove_large_stripe.py b/mantidimaging/core/operations/remove_large_stripe/remove_large_stripe.py index 1f035f95616..0fc53bda153 100644 --- a/mantidimaging/core/operations/remove_large_stripe/remove_large_stripe.py +++ b/mantidimaging/core/operations/remove_large_stripe/remove_large_stripe.py @@ -35,8 +35,8 @@ class RemoveLargeStripesFilter(BaseFilter): link_histograms = True operate_on_sinograms = True - @classmethod - def filter_func(cls, images: 'ImageStack', snr=3, la_size=61, progress=None): + @staticmethod + def filter_func(images: 'ImageStack', snr=3, la_size=61, progress=None): """ :param snr: The ratio value. :param size: The window size of the median filter to remove large stripes. @@ -45,9 +45,9 @@ def filter_func(cls, images: 'ImageStack', snr=3, la_size=61, progress=None): """ params = {"snr": snr, "size": la_size} if images.is_sinograms: - compute_func = cls.compute_function_sino + compute_func = RemoveLargeStripesFilter.compute_function_sino else: - compute_func = cls.compute_function + compute_func = RemoveLargeStripesFilter.compute_function ps.run_compute_func(compute_func, images.num_sinograms, images.shared_array, params, progress) return images diff --git a/mantidimaging/core/operations/remove_stripe_filtering/remove_stripe_filtering.py b/mantidimaging/core/operations/remove_stripe_filtering/remove_stripe_filtering.py index 9cc8e469ae2..a888ad6f28f 100644 --- a/mantidimaging/core/operations/remove_stripe_filtering/remove_stripe_filtering.py +++ b/mantidimaging/core/operations/remove_stripe_filtering/remove_stripe_filtering.py @@ -35,8 +35,8 @@ class RemoveStripeFilteringFilter(BaseFilter): link_histograms = True operate_on_sinograms = True - @classmethod - def filter_func(cls, images: ImageStack, sigma=3, size=21, window_dim=1, filtering_dim=1, progress=None): + @staticmethod + def filter_func(images: ImageStack, sigma=3, size=21, window_dim=1, filtering_dim=1, progress=None): """ :param sigma: The sigma of the Gaussian window used to separate the low-pass and high-pass components of the intensity profile @@ -55,15 +55,15 @@ def filter_func(cls, images: ImageStack, sigma=3, size=21, window_dim=1, filteri if images.is_sinograms: if filtering_dim == 1: params["sort"] = True - compute_func = cls.compute_function_sino + compute_func = RemoveStripeFilteringFilter.compute_function_sino else: - compute_func = cls.compute_function_2d_sino + compute_func = RemoveStripeFilteringFilter.compute_function_2d_sino else: if filtering_dim == 1: params["sort"] = True - compute_func = cls.compute_function + compute_func = RemoveStripeFilteringFilter.compute_function else: - compute_func = cls.compute_function_2d + compute_func = RemoveStripeFilteringFilter.compute_function_2d ps.run_compute_func(compute_func, images.num_sinograms, images.shared_array, params, progress) return images diff --git a/mantidimaging/core/operations/remove_stripe_sorting_fitting/remove_stripe_sorting_fitting.py b/mantidimaging/core/operations/remove_stripe_sorting_fitting/remove_stripe_sorting_fitting.py index ab56c55fc6b..9fd88c1d925 100644 --- a/mantidimaging/core/operations/remove_stripe_sorting_fitting/remove_stripe_sorting_fitting.py +++ b/mantidimaging/core/operations/remove_stripe_sorting_fitting/remove_stripe_sorting_fitting.py @@ -35,8 +35,8 @@ class RemoveStripeSortingFittingFilter(BaseFilter): link_histograms = True operate_on_sinograms = True - @classmethod - def filter_func(cls, images: ImageStack, order=1, sigma=3, progress=None): + @staticmethod + def filter_func(images: ImageStack, order=1, sigma=3, progress=None): """ :param order: The polynomial fit order. Check algotom docs for more information. @@ -49,9 +49,9 @@ def filter_func(cls, images: ImageStack, order=1, sigma=3, progress=None): return images params = {'order': order, 'sigma': sigma, 'sort': True} if images.is_sinograms: - compute_func = cls.compute_function_sino + compute_func = RemoveStripeSortingFittingFilter.compute_function_sino else: - compute_func = cls.compute_function + compute_func = RemoveStripeSortingFittingFilter.compute_function ps.run_compute_func(compute_func, images.num_sinograms, images.shared_array, params, progress) return images