From 4a289ae9b2d25cd6209d061b0e2e1e95aeb61255 Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Thu, 5 Mar 2026 17:02:07 +0900 Subject: [PATCH 001/152] Fix typo: reigstration -> registration --- examples/acrobat_2023/valis/non_rigid_registrars.py | 8 ++++---- examples/acrobat_2023/valis/serial_non_rigid.py | 2 +- valis/non_rigid_registrars.py | 8 ++++---- valis/serial_non_rigid.py | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/examples/acrobat_2023/valis/non_rigid_registrars.py b/examples/acrobat_2023/valis/non_rigid_registrars.py index 7740416b..ed1a5814 100644 --- a/examples/acrobat_2023/valis/non_rigid_registrars.py +++ b/examples/acrobat_2023/valis/non_rigid_registrars.py @@ -90,7 +90,7 @@ def __init__(self, params=None): Parameters ---------- params : dictionary - Keyword: value dictionary of parameters to be used in reigstration. + Keyword: value dictionary of parameters to be used in registration. Will get used in the calc() method. In the case where simple ITK will be used, params should be @@ -388,7 +388,7 @@ def __init__(self, params=None): Parameters ---------- params : dictionary - Keyword: value dictionary of parameters to be used in reigstration. + Keyword: value dictionary of parameters to be used in registration. Will get used in the calc() method. In the case where simple ITK will be used, params should be @@ -929,7 +929,7 @@ def __init__(self, params=None, optical_flow_obj=None, Parameters ---------- params : dictionary - Keyword: value dictionary of parameters to be used in reigstration. + Keyword: value dictionary of parameters to be used in registration. Will get used in the calc() method. optical_flow_obj : object @@ -1197,7 +1197,7 @@ def __init__(self, params=None, tile_wh=512, tile_buffer=100): Parameters ---------- params : dictionary - Keyword: value dictionary of parameters to be used in reigstration. + Keyword: value dictionary of parameters to be used in registration. Will get used when initializing the `non_rigid_registrar_cls` In the case where simple ITK will be used, params should be diff --git a/examples/acrobat_2023/valis/serial_non_rigid.py b/examples/acrobat_2023/valis/serial_non_rigid.py index fb9c68b0..8af466ea 100644 --- a/examples/acrobat_2023/valis/serial_non_rigid.py +++ b/examples/acrobat_2023/valis/serial_non_rigid.py @@ -373,7 +373,7 @@ def calc_deformation(self, registered_fixed_image, non_rigid_reg_class, Used to warp the registered_img before finding deformation fields. params : dictionary, optional - Keyword: value dictionary of parameters to be used in reigstration. + Keyword: value dictionary of parameters to be used in registration. Passed to the non_rigid_reg_class' init() method. In the case where simple ITK will be used, params should be diff --git a/valis/non_rigid_registrars.py b/valis/non_rigid_registrars.py index 33e20d9c..f6c168c6 100644 --- a/valis/non_rigid_registrars.py +++ b/valis/non_rigid_registrars.py @@ -106,7 +106,7 @@ def __init__(self, params=None, rgb=False): Parameters ---------- params : dictionary - Keyword: value dictionary of parameters to be used in reigstration. + Keyword: value dictionary of parameters to be used in registration. Will get used in the calc() method. In the case where simple ITK will be used, params should be @@ -403,7 +403,7 @@ def __init__(self, params=None): Parameters ---------- params : dictionary - Keyword: value dictionary of parameters to be used in reigstration. + Keyword: value dictionary of parameters to be used in registration. Will get used in the calc() method. In the case where simple ITK will be used, params should be @@ -944,7 +944,7 @@ def __init__(self, params=None, optical_flow_obj=cv2.optflow.createOptFlow_DeepF Parameters ---------- params : dictionary - Keyword: value dictionary of parameters to be used in reigstration. + Keyword: value dictionary of parameters to be used in registration. Will get used in the calc() method. optical_flow_obj : object @@ -1307,7 +1307,7 @@ def __init__(self, params=None, tile_wh=512, tile_buffer=100): Parameters ---------- params : dictionary - Keyword: value dictionary of parameters to be used in reigstration. + Keyword: value dictionary of parameters to be used in registration. Will get used when initializing the `non_rigid_registrar_cls` In the case where simple ITK will be used, params should be diff --git a/valis/serial_non_rigid.py b/valis/serial_non_rigid.py index de345f69..7f928727 100644 --- a/valis/serial_non_rigid.py +++ b/valis/serial_non_rigid.py @@ -375,7 +375,7 @@ def calc_deformation(self, registered_fixed_image, non_rigid_reg_obj, Used to warp the registered_img before finding deformation fields. params : dictionary, optional - Keyword: value dictionary of parameters to be used in reigstration. + Keyword: value dictionary of parameters to be used in registration. Passed to the non_rigid_reg_class' init() method. In the case where simple ITK will be used, params should be From c72a207232bb41f4d2874445a4661c482cb9683f Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Thu, 5 Mar 2026 17:02:42 +0900 Subject: [PATCH 002/152] Fix typo: needd -> need --- examples/acrobat_2023/valis/non_rigid_registrars.py | 6 +++--- examples/acrobat_2023/valis/serial_non_rigid.py | 2 +- valis/non_rigid_registrars.py | 6 +++--- valis/serial_non_rigid.py | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/examples/acrobat_2023/valis/non_rigid_registrars.py b/examples/acrobat_2023/valis/non_rigid_registrars.py index ed1a5814..68ed66ff 100644 --- a/examples/acrobat_2023/valis/non_rigid_registrars.py +++ b/examples/acrobat_2023/valis/non_rigid_registrars.py @@ -94,7 +94,7 @@ def __init__(self, params=None): Will get used in the calc() method. In the case where simple ITK will be used, params should be - a SimpleITK.ParameterMap. Note that numeric values needd to be + a SimpleITK.ParameterMap. Note that numeric values need to be converted to strings. """ @@ -392,7 +392,7 @@ def __init__(self, params=None): Will get used in the calc() method. In the case where simple ITK will be used, params should be - a SimpleITK.ParameterMap. Note that numeric values needd to be + a SimpleITK.ParameterMap. Note that numeric values need to be converted to strings. moving_xy : ndarray, optional @@ -1201,7 +1201,7 @@ def __init__(self, params=None, tile_wh=512, tile_buffer=100): Will get used when initializing the `non_rigid_registrar_cls` In the case where simple ITK will be used, params should be - a SimpleITK.ParameterMap. Note that numeric values needd to be + a SimpleITK.ParameterMap. Note that numeric values need to be converted to strings. tile_wh : int diff --git a/examples/acrobat_2023/valis/serial_non_rigid.py b/examples/acrobat_2023/valis/serial_non_rigid.py index 8af466ea..87a036aa 100644 --- a/examples/acrobat_2023/valis/serial_non_rigid.py +++ b/examples/acrobat_2023/valis/serial_non_rigid.py @@ -377,7 +377,7 @@ def calc_deformation(self, registered_fixed_image, non_rigid_reg_class, Passed to the non_rigid_reg_class' init() method. In the case where simple ITK will be used, params should be - a SimpleITK.ParameterMap. Note that numeric values needd to be + a SimpleITK.ParameterMap. Note that numeric values need to be converted to strings. mask : ndarray, optional diff --git a/valis/non_rigid_registrars.py b/valis/non_rigid_registrars.py index f6c168c6..188bb985 100644 --- a/valis/non_rigid_registrars.py +++ b/valis/non_rigid_registrars.py @@ -110,7 +110,7 @@ def __init__(self, params=None, rgb=False): Will get used in the calc() method. In the case where simple ITK will be used, params should be - a SimpleITK.ParameterMap. Note that numeric values needd to be + a SimpleITK.ParameterMap. Note that numeric values need to be converted to strings. """ @@ -407,7 +407,7 @@ def __init__(self, params=None): Will get used in the calc() method. In the case where simple ITK will be used, params should be - a SimpleITK.ParameterMap. Note that numeric values needd to be + a SimpleITK.ParameterMap. Note that numeric values need to be converted to strings. moving_xy : ndarray, optional @@ -1311,7 +1311,7 @@ def __init__(self, params=None, tile_wh=512, tile_buffer=100): Will get used when initializing the `non_rigid_registrar_cls` In the case where simple ITK will be used, params should be - a SimpleITK.ParameterMap. Note that numeric values needd to be + a SimpleITK.ParameterMap. Note that numeric values need to be converted to strings. tile_wh : int diff --git a/valis/serial_non_rigid.py b/valis/serial_non_rigid.py index 7f928727..71bb4c71 100644 --- a/valis/serial_non_rigid.py +++ b/valis/serial_non_rigid.py @@ -379,7 +379,7 @@ def calc_deformation(self, registered_fixed_image, non_rigid_reg_obj, Passed to the non_rigid_reg_class' init() method. In the case where simple ITK will be used, params should be - a SimpleITK.ParameterMap. Note that numeric values needd to be + a SimpleITK.ParameterMap. Note that numeric values need to be converted to strings. mask : ndarray, optional From 56ee48f1692eff6aa85a19d2e9dc9d572436bdf2 Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Thu, 5 Mar 2026 17:11:37 +0900 Subject: [PATCH 003/152] Fix typo: optimzation -> optimization --- examples/acrobat_2023/valis/affine_optimizer.py | 2 +- valis/affine_optimizer.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/acrobat_2023/valis/affine_optimizer.py b/examples/acrobat_2023/valis/affine_optimizer.py index bede3e79..6b665996 100644 --- a/examples/acrobat_2023/valis/affine_optimizer.py +++ b/examples/acrobat_2023/valis/affine_optimizer.py @@ -1,7 +1,7 @@ """Optimize rigid alignment Contains functions related to optimization, as well as the AffineOptimizer -class that performs the optimzation. This class can be subclassed to implement +class that performs the optimization. This class can be subclassed to implement custom optimization methods. There are several subclasses, but AffineOptimizerMattesMI is the diff --git a/valis/affine_optimizer.py b/valis/affine_optimizer.py index 6194bb6a..d9995ba2 100644 --- a/valis/affine_optimizer.py +++ b/valis/affine_optimizer.py @@ -1,7 +1,7 @@ """Optimize rigid alignment Contains functions related to optimization, as well as the AffineOptimizer -class that performs the optimzation. This class can be subclassed to implement +class that performs the optimization. This class can be subclassed to implement custom optimization methods. There are several subclasses, but AffineOptimizerMattesMI is the From d8104315f13e2a4b92cde7a42f66a0be95741738 Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Thu, 5 Mar 2026 17:12:10 +0900 Subject: [PATCH 004/152] Remove duplicate 'the's --- examples/acrobat_2023/valis/affine_optimizer.py | 2 +- valis/affine_optimizer.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/acrobat_2023/valis/affine_optimizer.py b/examples/acrobat_2023/valis/affine_optimizer.py index 6b665996..ceba4e3b 100644 --- a/examples/acrobat_2023/valis/affine_optimizer.py +++ b/examples/acrobat_2023/valis/affine_optimizer.py @@ -4,7 +4,7 @@ class that performs the optimization. This class can be subclassed to implement custom optimization methods. -There are several subclasses, but AffineOptimizerMattesMI is the +There are several subclasses, but AffineOptimizerMattesMI is the fastest and most accurate, and so is default affine optimizer in VALIS. It's not recommended that the other subclasses be used, but they are kept to provide examples on how to subclass AffineOptimizer. diff --git a/valis/affine_optimizer.py b/valis/affine_optimizer.py index d9995ba2..41039b25 100644 --- a/valis/affine_optimizer.py +++ b/valis/affine_optimizer.py @@ -4,7 +4,7 @@ class that performs the optimization. This class can be subclassed to implement custom optimization methods. -There are several subclasses, but AffineOptimizerMattesMI is the +There are several subclasses, but AffineOptimizerMattesMI is the fastest and most accurate, and so is default affine optimizer in VALIS. It's not recommended that the other subclasses be used, but they are kept to provide examples on how to subclass AffineOptimizer. From 66ddc1d0400a0493e9bd8f0218d7e9d6d76a638c Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Thu, 5 Mar 2026 17:25:04 +0900 Subject: [PATCH 005/152] Remove 'of' from 'all of the slides' --- examples/acrobat_2023/valis/micro_rigid_registrar.py | 4 ++-- examples/acrobat_2023/valis/registration.py | 2 +- examples/register_ihc.py | 2 +- tests/test_examples.py | 2 +- valis/micro_rigid_registrar.py | 4 ++-- valis/registration.py | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/examples/acrobat_2023/valis/micro_rigid_registrar.py b/examples/acrobat_2023/valis/micro_rigid_registrar.py index 6743f972..2b59e834 100644 --- a/examples/acrobat_2023/valis/micro_rigid_registrar.py +++ b/examples/acrobat_2023/valis/micro_rigid_registrar.py @@ -34,7 +34,7 @@ class MicroRigidRegistrar(object): Attributes ---------- val_obj : Valis - The "parent" object that registers all of the slides. + The "parent" object that registers all the slides. feature_detector_cls : FeatureDD, optional Uninstantiated FeatureDD object that detects and computes @@ -74,7 +74,7 @@ def __init__(self, val_obj, feature_detector_cls=DEFAULT_FD, Parameters ---------- val_obj : Valis - The "parent" object that registers all of the slides. + The "parent" object that registers all the slides. feature_detector_cls : FeatureDD, optional Uninstantiated FeatureDD object that detects and computes diff --git a/examples/acrobat_2023/valis/registration.py b/examples/acrobat_2023/valis/registration.py index 0da8c863..a565be07 100644 --- a/examples/acrobat_2023/valis/registration.py +++ b/examples/acrobat_2023/valis/registration.py @@ -1814,7 +1814,7 @@ def __init__(self, src_dir, dst_dir, series=None, name=None, image_type=None, resolution_xyu: tuple, optional Physical size per pixel and the unit. If None (the default), these values will be determined for each slide using the slides' metadata. - If provided, this physical pixel sizes will be used for all of the slides. + If provided, this physical pixel sizes will be used for all the slides. This option is available in case one cannot easily access to the original slides, but does have the information on pixel's physical units. diff --git a/examples/register_ihc.py b/examples/register_ihc.py index acd3653f..6b111f3a 100644 --- a/examples/register_ihc.py +++ b/examples/register_ihc.py @@ -42,7 +42,7 @@ After registraation is complete, one should view the results to determine if they aare acceptable. If they -are, then one can warp and save all of the slides. +are, then one can warp and save all the slides. """ diff --git a/tests/test_examples.py b/tests/test_examples.py index 227b054f..d992ffb7 100644 --- a/tests/test_examples.py +++ b/tests/test_examples.py @@ -42,7 +42,7 @@ After registraation is complete, one should view the results to determine if they aare acceptable. If they -are, then one can warp and save all of the slides. +are, then one can warp and save all the slides. """ diff --git a/valis/micro_rigid_registrar.py b/valis/micro_rigid_registrar.py index d254a945..7b4f26dd 100644 --- a/valis/micro_rigid_registrar.py +++ b/valis/micro_rigid_registrar.py @@ -44,7 +44,7 @@ class MicroRigidRegistrar(object): Attributes ---------- val_obj : Valis - The "parent" object that registers all of the slides. + The "parent" object that registers all the slides. feature_detector_cls : FeatureDD, optional Uninstantiated FeatureDD object that detects and computes @@ -83,7 +83,7 @@ def __init__(self, val_obj, feature_detector_cls=None, Parameters ---------- val_obj : Valis - The "parent" object that registers all of the slides. + The "parent" object that registers all the slides. feature_detector_cls : FeatureDD, optional Uninstantiated FeatureDD object that detects and computes diff --git a/valis/registration.py b/valis/registration.py index fb98c30b..d6ef4381 100644 --- a/valis/registration.py +++ b/valis/registration.py @@ -1949,7 +1949,7 @@ def __init__(self, src_dir, dst_dir, series=None, name=None, image_type=None, resolution_xyu: tuple, optional Physical size per pixel and the unit. If None (the default), these values will be determined for each slide using the slides' metadata. - If provided, this physical pixel sizes will be used for all of the slides. + If provided, this physical pixel sizes will be used for all the slides. This option is available in case one cannot easily access to the original slides, but does have the information on pixel's physical units. From 13c0c7dcfd56d482e5ba3f342d6e4957fb7f3ebe Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Thu, 5 Mar 2026 17:25:43 +0900 Subject: [PATCH 006/152] Fix typo: reigistration -> registration --- examples/acrobat_2023/valis/micro_rigid_registrar.py | 4 ++-- valis/micro_rigid_registrar.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/acrobat_2023/valis/micro_rigid_registrar.py b/examples/acrobat_2023/valis/micro_rigid_registrar.py index 2b59e834..8abfa484 100644 --- a/examples/acrobat_2023/valis/micro_rigid_registrar.py +++ b/examples/acrobat_2023/valis/micro_rigid_registrar.py @@ -47,7 +47,7 @@ class MicroRigidRegistrar(object): Matcher object that will be used to match image features scale : float - Degree of downsampling to use for the reigistration, based on the + Degree of downsampling to use for the registration, based on the registered WSI shape (i.e. Slide.aligned_slide_shape_rc) tile_wh : int @@ -87,7 +87,7 @@ def __init__(self, val_obj, feature_detector_cls=DEFAULT_FD, Matcher object that will be used to match image features scale : float - Degree of downsampling to use for the reigistration, based on the + Degree of downsampling to use for the registration, based on the registered WSI shape (i.e. Slide.aligned_slide_shape_rc) tile_wh : int diff --git a/valis/micro_rigid_registrar.py b/valis/micro_rigid_registrar.py index 7b4f26dd..90902278 100644 --- a/valis/micro_rigid_registrar.py +++ b/valis/micro_rigid_registrar.py @@ -57,7 +57,7 @@ class MicroRigidRegistrar(object): Matcher object that will be used to match image features scale : float - Degree of downsampling to use for the reigistration, based on the + Degree of downsampling to use for the registration, based on the registered WSI shape (i.e. Slide.aligned_slide_shape_rc) tile_wh : int @@ -102,7 +102,7 @@ def __init__(self, val_obj, feature_detector_cls=None, If `None`, a default processor will be assigned to each image based on its modality. scale : float - Degree of downsampling to use for the reigistration, based on the + Degree of downsampling to use for the registration, based on the registered WSI shape (i.e. Slide.aligned_slide_shape_rc) tile_wh : int From 053b9798b31d2330118c03d189e5ad5f5fdef717 Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Thu, 5 Mar 2026 17:27:44 +0900 Subject: [PATCH 007/152] Fix typo: "all of the slide" -> "all the slides" --- examples/acrobat_2023/valis/registration.py | 4 ++-- valis/registration.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/acrobat_2023/valis/registration.py b/examples/acrobat_2023/valis/registration.py index a565be07..149f0620 100644 --- a/examples/acrobat_2023/valis/registration.py +++ b/examples/acrobat_2023/valis/registration.py @@ -164,7 +164,7 @@ class Slide(object): argument specified when creating a `Valis` object. val_obj : Valis - The "parent" object that registers all of the slide. + The "parent" object that registers all the slides. reader : SlideReader Object that can read slides and collect metadata. @@ -311,7 +311,7 @@ def __init__(self, src_f, image, val_obj, reader, name=None): argument specified when creating a `Valis` object. val_obj : Valis - The "parent" object that registers all of the slide. + The "parent" object that registers all the slides. reader : SlideReader Object that can read slides and collect metadata. diff --git a/valis/registration.py b/valis/registration.py index d6ef4381..16cf71c6 100644 --- a/valis/registration.py +++ b/valis/registration.py @@ -198,7 +198,7 @@ class Slide(object): argument specified when creating a `Valis` object. val_obj : Valis - The "parent" object that registers all of the slide. + The "parent" object that registers all the slides. reader : SlideReader Object that can read slides and collect metadata. @@ -345,7 +345,7 @@ def __init__(self, src_f, image, val_obj, reader, name=None): argument specified when creating a `Valis` object. val_obj : Valis - The "parent" object that registers all of the slide. + The "parent" object that registers all the slides. reader : SlideReader Object that can read slides and collect metadata. From 9ed86bfed820ba27a0db127a0b912bf4c406134b Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Thu, 5 Mar 2026 17:28:21 +0900 Subject: [PATCH 008/152] Fix typo: registeration -> registration --- valis/registration.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/valis/registration.py b/valis/registration.py index 16cf71c6..e284cb81 100644 --- a/valis/registration.py +++ b/valis/registration.py @@ -1934,7 +1934,7 @@ def __init__(self, src_dir, dst_dir, series=None, name=None, image_type=None, crop_for_rigid_reg : bool, optional Whether or not to crop the images used for rigid registration. If `True`, - then higher resolution images may be used for rigid registeration, as valis + then higher resolution images may be used for rigid registration, as valis will "zoom" in to the area around the mask created by `ImageProcesser.create_mask()`, and slice out that region and resize it to have a maximum dimension the same as `max_processed_image_dim_px`. If `False`, the full image will be used, although From 9543285068b524b74d459b0873b7c23b822d4494 Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Thu, 5 Mar 2026 17:28:42 +0900 Subject: [PATCH 009/152] Fix typo: registion -> registration --- valis/registration.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/valis/registration.py b/valis/registration.py index e284cb81..87e02138 100644 --- a/valis/registration.py +++ b/valis/registration.py @@ -1929,7 +1929,7 @@ def __init__(self, src_dir, dst_dir, series=None, name=None, image_type=None, mask too much if there is a lot of variation in the image. denoise_rigid : bool, optional - Whether or not to denoise processed images before rigid registion. + Whether or not to denoise processed images before rigid registration. Note that un-denoised images are used in the non-rigid registration crop_for_rigid_reg : bool, optional From 749f92408f7655f1e80bc949fc5f6de7d636fef6 Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Thu, 5 Mar 2026 17:30:30 +0900 Subject: [PATCH 010/152] Fix typo: "time consuming" -> "time-consuming" --- examples/acrobat_2023/valis/registration.py | 2 +- examples/acrobat_2023/valis/serial_rigid.py | 2 +- valis/registration.py | 2 +- valis/serial_rigid.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/acrobat_2023/valis/registration.py b/examples/acrobat_2023/valis/registration.py index 149f0620..25c92c36 100644 --- a/examples/acrobat_2023/valis/registration.py +++ b/examples/acrobat_2023/valis/registration.py @@ -1808,7 +1808,7 @@ def __init__(self, src_dir, dst_dir, series=None, name=None, image_type=None, check_for_reflections : bool, optional Determine if alignments are improved by relfecting/mirroring/flipping images. Optional because it requires re-detecting features in each version - of the images and then re-matching features, and so can be time consuming and + of the images and then re-matching features, and so can be time-consuming and not always necessary. resolution_xyu: tuple, optional diff --git a/examples/acrobat_2023/valis/serial_rigid.py b/examples/acrobat_2023/valis/serial_rigid.py index 1dae2b00..22b3f372 100644 --- a/examples/acrobat_2023/valis/serial_rigid.py +++ b/examples/acrobat_2023/valis/serial_rigid.py @@ -1469,7 +1469,7 @@ def register_images(img_dir, dst_dir=None, name="registrar", check_for_reflections : bool, optional Determine if alignments are improved by relfecting/mirroring/flipping images. Optional because it requires re-detecting features in each version - of the images and then re-matching features, and so can be time consuming and + of the images and then re-matching features, and so can be time-consuming and not always necessary. similarity_metric : str diff --git a/valis/registration.py b/valis/registration.py index 87e02138..da2595ed 100644 --- a/valis/registration.py +++ b/valis/registration.py @@ -1943,7 +1943,7 @@ def __init__(self, src_dir, dst_dir, series=None, name=None, image_type=None, check_for_reflections : bool, optional Determine if alignments are improved by relfecting/mirroring/flipping images. Optional because it requires re-detecting features in each version - of the images and then re-matching features, and so can be time consuming and + of the images and then re-matching features, and so can be time-consuming and not always necessary. resolution_xyu: tuple, optional diff --git a/valis/serial_rigid.py b/valis/serial_rigid.py index 3ecd4f2d..c8f41640 100644 --- a/valis/serial_rigid.py +++ b/valis/serial_rigid.py @@ -1712,7 +1712,7 @@ def register_images(img_dir, dst_dir=None, name="registrar", check_for_reflections : bool, optional Determine if alignments are improved by relfecting/mirroring/flipping images. Optional because it requires re-detecting features in each version - of the images and then re-matching features, and so can be time consuming and + of the images and then re-matching features, and so can be time-consuming and not always necessary. similarity_metric : str From 0744ed38cd95191898d2a24b0e32c2c794a6e901 Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Thu, 5 Mar 2026 17:30:53 +0900 Subject: [PATCH 011/152] Fix typo: relfecting -> reflecting --- examples/acrobat_2023/valis/registration.py | 2 +- examples/acrobat_2023/valis/serial_rigid.py | 2 +- valis/registration.py | 2 +- valis/serial_rigid.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/acrobat_2023/valis/registration.py b/examples/acrobat_2023/valis/registration.py index 25c92c36..df065905 100644 --- a/examples/acrobat_2023/valis/registration.py +++ b/examples/acrobat_2023/valis/registration.py @@ -1806,7 +1806,7 @@ def __init__(self, src_dir, dst_dir, series=None, name=None, image_type=None, mask too much if there is a lot of variation in the image. check_for_reflections : bool, optional - Determine if alignments are improved by relfecting/mirroring/flipping + Determine if alignments are improved by reflecting/mirroring/flipping images. Optional because it requires re-detecting features in each version of the images and then re-matching features, and so can be time-consuming and not always necessary. diff --git a/examples/acrobat_2023/valis/serial_rigid.py b/examples/acrobat_2023/valis/serial_rigid.py index 22b3f372..4264c215 100644 --- a/examples/acrobat_2023/valis/serial_rigid.py +++ b/examples/acrobat_2023/valis/serial_rigid.py @@ -1467,7 +1467,7 @@ def register_images(img_dir, dst_dir=None, name="registrar", If None, the index of the middle image will be the reference. check_for_reflections : bool, optional - Determine if alignments are improved by relfecting/mirroring/flipping + Determine if alignments are improved by reflecting/mirroring/flipping images. Optional because it requires re-detecting features in each version of the images and then re-matching features, and so can be time-consuming and not always necessary. diff --git a/valis/registration.py b/valis/registration.py index da2595ed..37b704df 100644 --- a/valis/registration.py +++ b/valis/registration.py @@ -1941,7 +1941,7 @@ def __init__(self, src_dir, dst_dir, series=None, name=None, image_type=None, the tissue may be at a lower resolution. check_for_reflections : bool, optional - Determine if alignments are improved by relfecting/mirroring/flipping + Determine if alignments are improved by reflecting/mirroring/flipping images. Optional because it requires re-detecting features in each version of the images and then re-matching features, and so can be time-consuming and not always necessary. diff --git a/valis/serial_rigid.py b/valis/serial_rigid.py index c8f41640..dde0761e 100644 --- a/valis/serial_rigid.py +++ b/valis/serial_rigid.py @@ -1710,7 +1710,7 @@ def register_images(img_dir, dst_dir=None, name="registrar", If None, the index of the middle image will be the reference. check_for_reflections : bool, optional - Determine if alignments are improved by relfecting/mirroring/flipping + Determine if alignments are improved by reflecting/mirroring/flipping images. Optional because it requires re-detecting features in each version of the images and then re-matching features, and so can be time-consuming and not always necessary. From b8aaa33a2b386c20e711d40c4059f76f6a84bbfc Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Thu, 5 Mar 2026 17:31:14 +0900 Subject: [PATCH 012/152] Fix typo: specificed -> specified --- examples/acrobat_2023/valis/registration.py | 2 +- valis/registration.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/acrobat_2023/valis/registration.py b/examples/acrobat_2023/valis/registration.py index df065905..9be2d327 100644 --- a/examples/acrobat_2023/valis/registration.py +++ b/examples/acrobat_2023/valis/registration.py @@ -1775,7 +1775,7 @@ def __init__(self, src_dir, dst_dir, series=None, name=None, image_type=None, registration will be skipped. If `do_rigid` is a dictionary, it should contain inverse transformation - matrices to rigidly align images to the specificed by `reference_img_f`. + matrices to rigidly align images to the specified by `reference_img_f`. M will be estimated for images that are not in the dictionary. Each key is the filename of the image associated with the transformation matrix, and value is a dictionary containing the following values: diff --git a/valis/registration.py b/valis/registration.py index 37b704df..d5a60570 100644 --- a/valis/registration.py +++ b/valis/registration.py @@ -1898,7 +1898,7 @@ def __init__(self, src_dir, dst_dir, series=None, name=None, image_type=None, registration will be skipped. If `do_rigid` is a dictionary, it should contain inverse transformation - matrices to rigidly align images to the specificed by `reference_img_f`. + matrices to rigidly align images to the specified by `reference_img_f`. M will be estimated for images that are not in the dictionary. Each key is the filename of the image associated with the transformation matrix, and value is a dictionary containing the following values: From e79df91d10821596914c19eb4777994d7fc04ad1 Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Thu, 5 Mar 2026 17:31:32 +0900 Subject: [PATCH 013/152] Fix typo: aaligned -> aligned --- examples/acrobat_2023/valis/registration.py | 2 +- valis/registration.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/acrobat_2023/valis/registration.py b/examples/acrobat_2023/valis/registration.py index 9be2d327..10f3a8c6 100644 --- a/examples/acrobat_2023/valis/registration.py +++ b/examples/acrobat_2023/valis/registration.py @@ -1760,7 +1760,7 @@ def __init__(self, src_dir, dst_dir, series=None, name=None, image_type=None, adjacent non-rigidly aligned image. This allows the transformations to accumulate, which may bring distant features together but could also result in un-wanted deformations, particularly around the edges. - If `False`, the image not warped before being aaligned to the adjacent + If `False`, the image not warped before being aligned to the adjacent non-rigidly aligned image. This can reduce unwanted deformations, but may not bring distant features together. diff --git a/valis/registration.py b/valis/registration.py index d5a60570..bdd49be2 100644 --- a/valis/registration.py +++ b/valis/registration.py @@ -1883,7 +1883,7 @@ def __init__(self, src_dir, dst_dir, series=None, name=None, image_type=None, adjacent non-rigidly aligned image. This allows the transformations to accumulate, which may bring distant features together but could also result in un-wanted deformations, particularly around the edges. - If `False`, the image not warped before being aaligned to the adjacent + If `False`, the image not warped before being aligned to the adjacent non-rigidly aligned image. This can reduce unwanted deformations, but may not bring distant features together. From 97969be847049a4f8595cf9e0b2a13d9f85b28c8 Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Thu, 5 Mar 2026 17:32:01 +0900 Subject: [PATCH 014/152] Fix typo: desciption -> description --- examples/acrobat_2023/valis/registration.py | 4 ++-- valis/registration.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/acrobat_2023/valis/registration.py b/examples/acrobat_2023/valis/registration.py index 10f3a8c6..c9bc951d 100644 --- a/examples/acrobat_2023/valis/registration.py +++ b/examples/acrobat_2023/valis/registration.py @@ -1740,7 +1740,7 @@ def __init__(self, src_dir, dst_dir, series=None, name=None, image_type=None, non_rigid_registrar_cls : NonRigidRegistrar, optional Uninstantiated NonRigidRegistrar class that will be used to calculate the deformation fields between images. See - the `non_rigid_registrars` module for a desciption of available + the `non_rigid_registrars` module for a description of available methods. If a desired non-rigid registration method is not available, one can be implemented by subclassing.NonRigidRegistrar. If None, then only rigid registration will be performed @@ -4163,7 +4163,7 @@ def register_micro(self, brightfield_processing_cls=DEFAULT_BRIGHTFIELD_CLASS, non_rigid_registrar_cls : NonRigidRegistrar, optional Uninstantiated NonRigidRegistrar class that will be used to calculate the deformation fields between images. See - the `non_rigid_registrars` module for a desciption of available + the `non_rigid_registrars` module for a description of available methods. If a desired non-rigid registration method is not available, one can be implemented by subclassing.NonRigidRegistrar. diff --git a/valis/registration.py b/valis/registration.py index bdd49be2..748bc9a8 100644 --- a/valis/registration.py +++ b/valis/registration.py @@ -1863,7 +1863,7 @@ def __init__(self, src_dir, dst_dir, series=None, name=None, image_type=None, non_rigid_registrar_cls : NonRigidRegistrar, optional Uninstantiated NonRigidRegistrar class that will be used to calculate the deformation fields between images. See - the `non_rigid_registrars` module for a desciption of available + the `non_rigid_registrars` module for a description of available methods. If a desired non-rigid registration method is not available, one can be implemented by subclassing.NonRigidRegistrar. If None, then only rigid registration will be performed @@ -4844,7 +4844,7 @@ def register_micro(self, brightfield_processing_cls=DEFAULT_BRIGHTFIELD_CLASS, non_rigid_registrar_cls : NonRigidRegistrar, optional Uninstantiated NonRigidRegistrar class that will be used to calculate the deformation fields between images. See - the `non_rigid_registrars` module for a desciption of available + the `non_rigid_registrars` module for a description of available methods. If a desired non-rigid registration method is not available, one can be implemented by subclassing.NonRigidRegistrar. From 7af8b4caac07a70860a3de3cbd60e146d62b2187 Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Thu, 5 Mar 2026 17:33:27 +0900 Subject: [PATCH 015/152] Fix typo: analagous -> analogous --- examples/acrobat_2023/valis/registration.py | 4 ++-- valis/registration.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/acrobat_2023/valis/registration.py b/examples/acrobat_2023/valis/registration.py index c9bc951d..f73c4f74 100644 --- a/examples/acrobat_2023/valis/registration.py +++ b/examples/acrobat_2023/valis/registration.py @@ -3724,7 +3724,7 @@ def measure_error(self): `summary_df` contains various information about the registration. The "from" column is the name of the image, while the "to" column - name of the image it was aligned to. "from" is analagous to "moving" + name of the image it was aligned to. "from" is analogous to "moving" or "current", while "to" is analgous to "fixed" or "previous". Columns begining with "original" refer to error measurements of the @@ -3997,7 +3997,7 @@ def register(self, brightfield_processing_cls=DEFAULT_BRIGHTFIELD_CLASS, `summary_df` contains various information about the registration. The "from" column is the name of the image, while the "to" column - name of the image it was aligned to. "from" is analagous to "moving" + name of the image it was aligned to. "from" is analogous to "moving" or "current", while "to" is analgous to "fixed" or "previous". Columns begining with "original" refer to error measurements of the diff --git a/valis/registration.py b/valis/registration.py index 748bc9a8..fb6b8ff9 100644 --- a/valis/registration.py +++ b/valis/registration.py @@ -4397,7 +4397,7 @@ def measure_error(self): `summary_df` contains various information about the registration. The "from" column is the name of the image, while the "to" column - name of the image it was aligned to. "from" is analagous to "moving" + name of the image it was aligned to. "from" is analogous to "moving" or "current", while "to" is analgous to "fixed" or "previous". Columns begining with "original" refer to error measurements of the @@ -4675,7 +4675,7 @@ def register(self, brightfield_processing_cls=DEFAULT_BRIGHTFIELD_CLASS, `summary_df` contains various information about the registration. The "from" column is the name of the image, while the "to" column - name of the image it was aligned to. "from" is analagous to "moving" + name of the image it was aligned to. "from" is analogous to "moving" or "current", while "to" is analgous to "fixed" or "previous". Columns begining with "original" refer to error measurements of the From 49c601bcf125474767c4f170eebc13d285e0d947 Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Thu, 5 Mar 2026 17:33:43 +0900 Subject: [PATCH 016/152] Fix typo: analgous -> analogous --- examples/acrobat_2023/valis/registration.py | 4 ++-- valis/registration.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/acrobat_2023/valis/registration.py b/examples/acrobat_2023/valis/registration.py index f73c4f74..93e85ddf 100644 --- a/examples/acrobat_2023/valis/registration.py +++ b/examples/acrobat_2023/valis/registration.py @@ -3725,7 +3725,7 @@ def measure_error(self): The "from" column is the name of the image, while the "to" column name of the image it was aligned to. "from" is analogous to "moving" - or "current", while "to" is analgous to "fixed" or "previous". + or "current", while "to" is analogous to "fixed" or "previous". Columns begining with "original" refer to error measurements of the unregistered images. Those beginning with "rigid" or "non_rigid" refer @@ -3998,7 +3998,7 @@ def register(self, brightfield_processing_cls=DEFAULT_BRIGHTFIELD_CLASS, The "from" column is the name of the image, while the "to" column name of the image it was aligned to. "from" is analogous to "moving" - or "current", while "to" is analgous to "fixed" or "previous". + or "current", while "to" is analogous to "fixed" or "previous". Columns begining with "original" refer to error measurements of the unregistered images. Those beginning with "rigid" or "non_rigid" refer diff --git a/valis/registration.py b/valis/registration.py index fb6b8ff9..e95c8b20 100644 --- a/valis/registration.py +++ b/valis/registration.py @@ -4398,7 +4398,7 @@ def measure_error(self): The "from" column is the name of the image, while the "to" column name of the image it was aligned to. "from" is analogous to "moving" - or "current", while "to" is analgous to "fixed" or "previous". + or "current", while "to" is analogous to "fixed" or "previous". Columns begining with "original" refer to error measurements of the unregistered images. Those beginning with "rigid" or "non_rigid" refer @@ -4676,7 +4676,7 @@ def register(self, brightfield_processing_cls=DEFAULT_BRIGHTFIELD_CLASS, The "from" column is the name of the image, while the "to" column name of the image it was aligned to. "from" is analogous to "moving" - or "current", while "to" is analgous to "fixed" or "previous". + or "current", while "to" is analogous to "fixed" or "previous". Columns begining with "original" refer to error measurements of the unregistered images. Those beginning with "rigid" or "non_rigid" refer From 978e350643217175c4b5311ec3a006268d26a4e6 Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Thu, 5 Mar 2026 17:34:13 +0900 Subject: [PATCH 017/152] Fix typo: begining -> beginning --- examples/acrobat_2023/valis/registration.py | 4 ++-- valis/registration.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/acrobat_2023/valis/registration.py b/examples/acrobat_2023/valis/registration.py index 93e85ddf..a93594f2 100644 --- a/examples/acrobat_2023/valis/registration.py +++ b/examples/acrobat_2023/valis/registration.py @@ -3727,7 +3727,7 @@ def measure_error(self): name of the image it was aligned to. "from" is analogous to "moving" or "current", while "to" is analogous to "fixed" or "previous". - Columns begining with "original" refer to error measurements of the + Columns beginning with "original" refer to error measurements of the unregistered images. Those beginning with "rigid" or "non_rigid" refer to measurements related to rigid or non-rigid registration, respectively. @@ -4000,7 +4000,7 @@ def register(self, brightfield_processing_cls=DEFAULT_BRIGHTFIELD_CLASS, name of the image it was aligned to. "from" is analogous to "moving" or "current", while "to" is analogous to "fixed" or "previous". - Columns begining with "original" refer to error measurements of the + Columns beginning with "original" refer to error measurements of the unregistered images. Those beginning with "rigid" or "non_rigid" refer to measurements related to rigid or non-rigid registration, respectively. diff --git a/valis/registration.py b/valis/registration.py index e95c8b20..bae91246 100644 --- a/valis/registration.py +++ b/valis/registration.py @@ -4400,7 +4400,7 @@ def measure_error(self): name of the image it was aligned to. "from" is analogous to "moving" or "current", while "to" is analogous to "fixed" or "previous". - Columns begining with "original" refer to error measurements of the + Columns beginning with "original" refer to error measurements of the unregistered images. Those beginning with "rigid" or "non_rigid" refer to measurements related to rigid or non-rigid registration, respectively. @@ -4678,7 +4678,7 @@ def register(self, brightfield_processing_cls=DEFAULT_BRIGHTFIELD_CLASS, name of the image it was aligned to. "from" is analogous to "moving" or "current", while "to" is analogous to "fixed" or "previous". - Columns begining with "original" refer to error measurements of the + Columns beginning with "original" refer to error measurements of the unregistered images. Those beginning with "rigid" or "non_rigid" refer to measurements related to rigid or non-rigid registration, respectively. From 76957538330e1eafdaa4d3f13f0bc7bc4c2f4b74 Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Thu, 5 Mar 2026 17:34:38 +0900 Subject: [PATCH 018/152] Fix typo: endining -> ending --- examples/acrobat_2023/valis/registration.py | 4 ++-- valis/registration.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/acrobat_2023/valis/registration.py b/examples/acrobat_2023/valis/registration.py index a93594f2..3c46460a 100644 --- a/examples/acrobat_2023/valis/registration.py +++ b/examples/acrobat_2023/valis/registration.py @@ -3735,7 +3735,7 @@ def measure_error(self): the case of errors based on feature distances (i.e. those ending in "D"), the mean is weighted by the number of feature matches between "from" and "to". - Columns endining in "D" indicate the median distance between matched + Columns ending in "D" indicate the median distance between matched features in "from" and "to". Columns ending in "rTRE" indicate the target registration error between @@ -4008,7 +4008,7 @@ def register(self, brightfield_processing_cls=DEFAULT_BRIGHTFIELD_CLASS, the case of errors based on feature distances (i.e. those ending in "D"), the mean is weighted by the number of feature matches between "from" and "to". - Columns endining in "D" indicate the median distance between matched + Columns ending in "D" indicate the median distance between matched features in "from" and "to". Columns ending in "TRE" indicate the target registration error between diff --git a/valis/registration.py b/valis/registration.py index bae91246..05f9b8cb 100644 --- a/valis/registration.py +++ b/valis/registration.py @@ -4408,7 +4408,7 @@ def measure_error(self): the case of errors based on feature distances (i.e. those ending in "D"), the mean is weighted by the number of feature matches between "from" and "to". - Columns endining in "D" indicate the median distance between matched + Columns ending in "D" indicate the median distance between matched features in "from" and "to". Columns ending in "rTRE" indicate the target registration error between @@ -4686,7 +4686,7 @@ def register(self, brightfield_processing_cls=DEFAULT_BRIGHTFIELD_CLASS, the case of errors based on feature distances (i.e. those ending in "D"), the mean is weighted by the number of feature matches between "from" and "to". - Columns endining in "D" indicate the median distance between matched + Columns ending in "D" indicate the median distance between matched features in "from" and "to". Columns ending in "TRE" indicate the target registration error between From e006d7284aa48ad3b16bef254563e990451fc693 Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Thu, 5 Mar 2026 17:35:09 +0900 Subject: [PATCH 019/152] Fix typo: appropritate -> appropriate --- valis/registration.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/valis/registration.py b/valis/registration.py index 05f9b8cb..88a70b0d 100644 --- a/valis/registration.py +++ b/valis/registration.py @@ -2527,7 +2527,7 @@ def convert_imgs(self, series=None, reader_dict=None, reader_cls=None): reader_dict: dict, optional Dictionary specifying which readers to use for individual images. The keys, value pairs are image filename and instantiated `slide_io.SlideReader` - to use to read that file. Valis will try to find an appropritate reader + to use to read that file. Valis will try to find an appropriate reader for any omitted files, or will use `reader_cls` as the default. """ @@ -4658,7 +4658,7 @@ def register(self, brightfield_processing_cls=DEFAULT_BRIGHTFIELD_CLASS, reader_dict: dict, optional Dictionary specifying which readers to use for individual images. The keys should be the image's filename, and the values the instantiated slide_io.SlideReader - to use to read that file. Valis will try to find an appropritate reader + to use to read that file. Valis will try to find an appropriate reader for any omitted files, or will use `reader_cls` as the default. Returns From afd795a50a29a6ad43a3e352502501aa0d16a13d Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Thu, 5 Mar 2026 17:36:24 +0900 Subject: [PATCH 020/152] Fix typo: desination -> destination --- examples/acrobat_2023/valis/registration.py | 2 +- valis/registration.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/acrobat_2023/valis/registration.py b/examples/acrobat_2023/valis/registration.py index 3c46460a..e360949c 100644 --- a/examples/acrobat_2023/valis/registration.py +++ b/examples/acrobat_2023/valis/registration.py @@ -3932,7 +3932,7 @@ def register(self, brightfield_processing_cls=DEFAULT_BRIGHTFIELD_CLASS, then conduct rigid registration. Non-rigid registration will then be performed if the `non_rigid_registrar_cls` argument used to initialize the Valis object was not None. - In addition to the objects returned, the desination directory (i.e. `dst_dir`) + In addition to the objects returned, the destination directory (i.e. `dst_dir`) will contain thumbnails so that one can visualize the results: converted image thumbnails will be in "images/"; processed images in "processed/"; rigidly aligned images in "rigid_registration/"; non-rigidly aligned images in "non_rigid_registration/"; diff --git a/valis/registration.py b/valis/registration.py index 88a70b0d..df5ef576 100644 --- a/valis/registration.py +++ b/valis/registration.py @@ -4604,7 +4604,7 @@ def register(self, brightfield_processing_cls=DEFAULT_BRIGHTFIELD_CLASS, then conduct rigid registration. Non-rigid registration will then be performed if the `non_rigid_registrar_cls` argument used to initialize the Valis object was not None. - In addition to the objects returned, the desination directory (i.e. `dst_dir`) + In addition to the objects returned, the destination directory (i.e. `dst_dir`) will contain thumbnails so that one can visualize the results: converted image thumbnails will be in "images/"; processed images in "processed/"; rigidly aligned images in "rigid_registration/"; non-rigidly aligned images in "non_rigid_registration/"; From 6ea9bfbea59e60d8637124558b51b51b09ca2a39 Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Thu, 5 Mar 2026 17:36:43 +0900 Subject: [PATCH 021/152] Fix typo: magntidue -> magnitude --- examples/acrobat_2023/valis/registration.py | 2 +- valis/registration.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/acrobat_2023/valis/registration.py b/examples/acrobat_2023/valis/registration.py index e360949c..b69fa861 100644 --- a/examples/acrobat_2023/valis/registration.py +++ b/examples/acrobat_2023/valis/registration.py @@ -3936,7 +3936,7 @@ def register(self, brightfield_processing_cls=DEFAULT_BRIGHTFIELD_CLASS, will contain thumbnails so that one can visualize the results: converted image thumbnails will be in "images/"; processed images in "processed/"; rigidly aligned images in "rigid_registration/"; non-rigidly aligned images in "non_rigid_registration/"; - non-rigid deformation field images (i.e. warped grids colored by the direction and magntidue) + non-rigid deformation field images (i.e. warped grids colored by the direction and magnitude) of the deformation) will be in ""deformation_fields/". The size of these thumbnails is determined by the `thumbnail_size` argument used to initialze this object. diff --git a/valis/registration.py b/valis/registration.py index df5ef576..4875eb42 100644 --- a/valis/registration.py +++ b/valis/registration.py @@ -4608,7 +4608,7 @@ def register(self, brightfield_processing_cls=DEFAULT_BRIGHTFIELD_CLASS, will contain thumbnails so that one can visualize the results: converted image thumbnails will be in "images/"; processed images in "processed/"; rigidly aligned images in "rigid_registration/"; non-rigidly aligned images in "non_rigid_registration/"; - non-rigid deformation field images (i.e. warped grids colored by the direction and magntidue) + non-rigid deformation field images (i.e. warped grids colored by the direction and magnitude) of the deformation) will be in ""deformation_fields/". The size of these thumbnails is determined by the `thumbnail_size` argument used to initialze this object. From f9bb67f9f4ab748991319c9f6ab2eaf2cbbd746c Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Thu, 5 Mar 2026 17:37:04 +0900 Subject: [PATCH 022/152] Fix typo: initialze -> initialize --- examples/acrobat_2023/valis/registration.py | 2 +- valis/registration.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/acrobat_2023/valis/registration.py b/examples/acrobat_2023/valis/registration.py index b69fa861..10838649 100644 --- a/examples/acrobat_2023/valis/registration.py +++ b/examples/acrobat_2023/valis/registration.py @@ -3938,7 +3938,7 @@ def register(self, brightfield_processing_cls=DEFAULT_BRIGHTFIELD_CLASS, rigidly aligned images in "rigid_registration/"; non-rigidly aligned images in "non_rigid_registration/"; non-rigid deformation field images (i.e. warped grids colored by the direction and magnitude) of the deformation) will be in ""deformation_fields/". The size of these thumbnails - is determined by the `thumbnail_size` argument used to initialze this object. + is determined by the `thumbnail_size` argument used to initialize this object. One can get a sense of how well the registration worked by looking in the "overlaps/", which shows how the images overlap before diff --git a/valis/registration.py b/valis/registration.py index 4875eb42..821d63dc 100644 --- a/valis/registration.py +++ b/valis/registration.py @@ -4610,7 +4610,7 @@ def register(self, brightfield_processing_cls=DEFAULT_BRIGHTFIELD_CLASS, rigidly aligned images in "rigid_registration/"; non-rigidly aligned images in "non_rigid_registration/"; non-rigid deformation field images (i.e. warped grids colored by the direction and magnitude) of the deformation) will be in ""deformation_fields/". The size of these thumbnails - is determined by the `thumbnail_size` argument used to initialze this object. + is determined by the `thumbnail_size` argument used to initialize this object. One can get a sense of how well the registration worked by looking in the "overlaps/", which shows how the images overlap before From 161438a0d361c7c4961930dfc45d569c6dc2afc2 Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Thu, 5 Mar 2026 17:37:36 +0900 Subject: [PATCH 023/152] Fix typo: Caclulate -> Calculate --- examples/acrobat_2023/valis/affine_optimizer.py | 2 +- valis/affine_optimizer.py | 2 +- valis/registration.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/acrobat_2023/valis/affine_optimizer.py b/examples/acrobat_2023/valis/affine_optimizer.py index ceba4e3b..600e4057 100644 --- a/examples/acrobat_2023/valis/affine_optimizer.py +++ b/examples/acrobat_2023/valis/affine_optimizer.py @@ -348,7 +348,7 @@ def build_P(A, B, r, mask): @nba.njit() def entropy(x): """ - Caclulate Shannon's entropy for array x + Calculate Shannon's entropy for array x Parameters ---------- diff --git a/valis/affine_optimizer.py b/valis/affine_optimizer.py index 41039b25..5b33d6d5 100644 --- a/valis/affine_optimizer.py +++ b/valis/affine_optimizer.py @@ -336,7 +336,7 @@ def build_P(A, B, r, mask): def entropy(x): """ - Caclulate Shannon's entropy for array x + Calculate Shannon's entropy for array x Parameters ---------- diff --git a/valis/registration.py b/valis/registration.py index 821d63dc..39277a10 100644 --- a/valis/registration.py +++ b/valis/registration.py @@ -3679,7 +3679,7 @@ def _create_mask_from_processed(self, slide_list=None): rigid_mask = slide_obj.warp_img(slide_obj.rigid_reg_mask, non_rigid=False, crop=False, interp_method="nearest") combo_mask[rigid_mask > 0] += 1 - # Caclulate running average + # Calculate running average padded_processed = slide_obj.pad_cropped_processed_img() padded_processed[slide_obj.rigid_reg_mask == 0] = 0 padded_processed[slide_obj.rigid_reg_mask > 0] = exposure.rescale_intensity(padded_processed[slide_obj.rigid_reg_mask > 0], out_range=(0, 255)) From cc093272f961178c44494c66d26c1b9f0f515f15 Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Thu, 5 Mar 2026 17:38:57 +0900 Subject: [PATCH 024/152] Fix typo: indiates -> indicates --- examples/acrobat_2023/valis/warp_tools.py | 2 +- valis/warp_tools.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/acrobat_2023/valis/warp_tools.py b/examples/acrobat_2023/valis/warp_tools.py index d37382ab..eceb959b 100644 --- a/examples/acrobat_2023/valis/warp_tools.py +++ b/examples/acrobat_2023/valis/warp_tools.py @@ -669,7 +669,7 @@ def mattes_mi(img1, img2, nbins=50, mask=None): Number of histogram bins mask : ndarray, None - Mask with shape (N, M) that indiates where the metric + Mask with shape (N, M) that indicates where the metric should be calulated. If None, the metric will be calculated for all NxM pixels. diff --git a/valis/warp_tools.py b/valis/warp_tools.py index a5038707..e0944a3f 100644 --- a/valis/warp_tools.py +++ b/valis/warp_tools.py @@ -660,7 +660,7 @@ def mattes_mi(img1, img2, nbins=50, mask=None): Number of histogram bins mask : ndarray, None - Mask with shape (N, M) that indiates where the metric + Mask with shape (N, M) that indicates where the metric should be calulated. If None, the metric will be calculated for all NxM pixels. From 2985b5787d3e552322cd7ea835c4d08ed51bad75 Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Thu, 5 Mar 2026 17:39:17 +0900 Subject: [PATCH 025/152] Fix typo: inormation -> information --- examples/acrobat_2023/valis/registration.py | 2 +- examples/acrobat_2023/valis/warp_tools.py | 2 +- valis/registration.py | 2 +- valis/warp_tools.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/acrobat_2023/valis/registration.py b/examples/acrobat_2023/valis/registration.py index 10838649..f52a3fe8 100644 --- a/examples/acrobat_2023/valis/registration.py +++ b/examples/acrobat_2023/valis/registration.py @@ -2394,7 +2394,7 @@ def create_original_composite_img(self, rigid_registrar): return overlap_img def measure_original_mmi(self, img1, img2): - """Measure Mattes mutation inormation between 2 unregistered images. + """Measure Mattes mutation information between 2 unregistered images. """ dst_rc = np.max([img1.shape, img2.shape], axis=1) diff --git a/examples/acrobat_2023/valis/warp_tools.py b/examples/acrobat_2023/valis/warp_tools.py index eceb959b..b235ce3f 100644 --- a/examples/acrobat_2023/valis/warp_tools.py +++ b/examples/acrobat_2023/valis/warp_tools.py @@ -676,7 +676,7 @@ def mattes_mi(img1, img2, nbins=50, mask=None): Returns ------- mmi : float - Mattes mutation inormation + Mattes mutation information """ diff --git a/valis/registration.py b/valis/registration.py index 39277a10..e5ade7f1 100644 --- a/valis/registration.py +++ b/valis/registration.py @@ -2662,7 +2662,7 @@ def create_original_composite_img(self, rigid_registrar): return overlap_img def measure_original_mmi(self, img1, img2): - """Measure Mattes mutation inormation between 2 unregistered images. + """Measure Mattes mutation information between 2 unregistered images. """ dst_rc = np.max([img1.shape, img2.shape], axis=1) diff --git a/valis/warp_tools.py b/valis/warp_tools.py index e0944a3f..f9042b28 100644 --- a/valis/warp_tools.py +++ b/valis/warp_tools.py @@ -667,7 +667,7 @@ def mattes_mi(img1, img2, nbins=50, mask=None): Returns ------- mmi : float - Mattes mutation inormation + Mattes mutation information """ From 090328ea579d027af3be143fbe20d0f2075085ee Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Thu, 5 Mar 2026 17:39:42 +0900 Subject: [PATCH 026/152] Fix typo: becuase -> because --- examples/acrobat_2023/valis/affine_optimizer.py | 2 +- valis/affine_optimizer.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/acrobat_2023/valis/affine_optimizer.py b/examples/acrobat_2023/valis/affine_optimizer.py index 600e4057..a733ceea 100644 --- a/examples/acrobat_2023/valis/affine_optimizer.py +++ b/examples/acrobat_2023/valis/affine_optimizer.py @@ -995,7 +995,7 @@ def shannon_entropy(self, X, k=1): def mutual_information(self, A, B): if self.HA_list[self.current_level] is None: - # Only need to caluclate once per level, becuase the fixed + # Only need to caluclate once per level, because the fixed # image doesn't change self.HA_list[self.current_level] = self.shannon_entropy(A) diff --git a/valis/affine_optimizer.py b/valis/affine_optimizer.py index 5b33d6d5..2f17b0d6 100644 --- a/valis/affine_optimizer.py +++ b/valis/affine_optimizer.py @@ -981,7 +981,7 @@ def shannon_entropy(self, X, k=1): def mutual_information(self, A, B): if self.HA_list[self.current_level] is None: - # Only need to caluclate once per level, becuase the fixed + # Only need to caluclate once per level, because the fixed # image doesn't change self.HA_list[self.current_level] = self.shannon_entropy(A) From ee6b49641b29e62a69bb48a026fba34b14635131 Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Thu, 5 Mar 2026 17:40:07 +0900 Subject: [PATCH 027/152] Fix typo: calulated -> calculated --- examples/acrobat_2023/valis/warp_tools.py | 2 +- valis/warp_tools.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/acrobat_2023/valis/warp_tools.py b/examples/acrobat_2023/valis/warp_tools.py index b235ce3f..aa5c3f1b 100644 --- a/examples/acrobat_2023/valis/warp_tools.py +++ b/examples/acrobat_2023/valis/warp_tools.py @@ -670,7 +670,7 @@ def mattes_mi(img1, img2, nbins=50, mask=None): mask : ndarray, None Mask with shape (N, M) that indicates where the metric - should be calulated. If None, the metric will be calculated + should be calculated. If None, the metric will be calculated for all NxM pixels. Returns diff --git a/valis/warp_tools.py b/valis/warp_tools.py index f9042b28..2d9aa3e1 100644 --- a/valis/warp_tools.py +++ b/valis/warp_tools.py @@ -661,7 +661,7 @@ def mattes_mi(img1, img2, nbins=50, mask=None): mask : ndarray, None Mask with shape (N, M) that indicates where the metric - should be calulated. If None, the metric will be calculated + should be calculated. If None, the metric will be calculated for all NxM pixels. Returns From bcdb73826a38f88a02996a27776d5ddc18282be5 Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Thu, 5 Mar 2026 17:40:24 +0900 Subject: [PATCH 028/152] Fix typo: caluclate -> calculate --- examples/acrobat_2023/valis/affine_optimizer.py | 2 +- valis/affine_optimizer.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/acrobat_2023/valis/affine_optimizer.py b/examples/acrobat_2023/valis/affine_optimizer.py index a733ceea..9efee1a6 100644 --- a/examples/acrobat_2023/valis/affine_optimizer.py +++ b/examples/acrobat_2023/valis/affine_optimizer.py @@ -995,7 +995,7 @@ def shannon_entropy(self, X, k=1): def mutual_information(self, A, B): if self.HA_list[self.current_level] is None: - # Only need to caluclate once per level, because the fixed + # Only need to calculate once per level, because the fixed # image doesn't change self.HA_list[self.current_level] = self.shannon_entropy(A) diff --git a/valis/affine_optimizer.py b/valis/affine_optimizer.py index 2f17b0d6..803c5a53 100644 --- a/valis/affine_optimizer.py +++ b/valis/affine_optimizer.py @@ -981,7 +981,7 @@ def shannon_entropy(self, X, k=1): def mutual_information(self, A, B): if self.HA_list[self.current_level] is None: - # Only need to caluclate once per level, because the fixed + # Only need to calculate once per level, because the fixed # image doesn't change self.HA_list[self.current_level] = self.shannon_entropy(A) From 013b4549fe34dd34114170cf62fa222ce44ebd6b Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Thu, 5 Mar 2026 17:41:19 +0900 Subject: [PATCH 029/152] Fix typo: Caclculates -> Calculates --- examples/acrobat_2023/valis/registration.py | 2 +- valis/registration.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/acrobat_2023/valis/registration.py b/examples/acrobat_2023/valis/registration.py index f52a3fe8..8cd8321b 100644 --- a/examples/acrobat_2023/valis/registration.py +++ b/examples/acrobat_2023/valis/registration.py @@ -4125,7 +4125,7 @@ def register_micro(self, brightfield_processing_cls=DEFAULT_BRIGHTFIELD_CLASS, reference_img_f=None, align_to_reference=False, mask=None, tile_wh=DEFAULT_NR_TILE_WH): """Improve alingment of microfeatures by performing second non-rigid registration on larger images - Caclculates additional non-rigid deformations using a larger image + Calculates additional non-rigid deformations using a larger image Parameters ---------- diff --git a/valis/registration.py b/valis/registration.py index e5ade7f1..73281439 100644 --- a/valis/registration.py +++ b/valis/registration.py @@ -4806,7 +4806,7 @@ def register_micro(self, brightfield_processing_cls=DEFAULT_BRIGHTFIELD_CLASS, reference_img_f=None, align_to_reference=False, mask=None, tile_wh=DEFAULT_NR_TILE_WH): """Improve alingment of microfeatures by performing second non-rigid registration on larger images - Caclculates additional non-rigid deformations using a larger image + Calculates additional non-rigid deformations using a larger image Parameters ---------- From 8779431fcf4c86d82eca054ee6e3b1750cbd8253 Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Thu, 5 Mar 2026 17:41:39 +0900 Subject: [PATCH 030/152] Fix typo: alingment -> alignment --- examples/acrobat_2023/valis/registration.py | 2 +- valis/registration.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/acrobat_2023/valis/registration.py b/examples/acrobat_2023/valis/registration.py index 8cd8321b..8c99aed6 100644 --- a/examples/acrobat_2023/valis/registration.py +++ b/examples/acrobat_2023/valis/registration.py @@ -4123,7 +4123,7 @@ def register_micro(self, brightfield_processing_cls=DEFAULT_BRIGHTFIELD_CLASS, non_rigid_registrar_cls=DEFAULT_NON_RIGID_CLASS, non_rigid_reg_params=DEFAULT_NON_RIGID_KWARGS, reference_img_f=None, align_to_reference=False, mask=None, tile_wh=DEFAULT_NR_TILE_WH): - """Improve alingment of microfeatures by performing second non-rigid registration on larger images + """Improve alignment of microfeatures by performing second non-rigid registration on larger images Calculates additional non-rigid deformations using a larger image diff --git a/valis/registration.py b/valis/registration.py index 73281439..1616f7a6 100644 --- a/valis/registration.py +++ b/valis/registration.py @@ -4804,7 +4804,7 @@ def register_micro(self, brightfield_processing_cls=DEFAULT_BRIGHTFIELD_CLASS, non_rigid_registrar_cls=DEFAULT_NON_RIGID_CLASS, non_rigid_reg_params=DEFAULT_NON_RIGID_KWARGS, reference_img_f=None, align_to_reference=False, mask=None, tile_wh=DEFAULT_NR_TILE_WH): - """Improve alingment of microfeatures by performing second non-rigid registration on larger images + """Improve alignment of microfeatures by performing second non-rigid registration on larger images Calculates additional non-rigid deformations using a larger image From b1e5eab7b5e8cb62da9ce8d47f37ba0066e8dd87 Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Thu, 5 Mar 2026 17:42:04 +0900 Subject: [PATCH 031/152] Fix typo: cooresponding -> corresponding --- examples/acrobat_2023/valis/registration.py | 2 +- valis/registration.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/acrobat_2023/valis/registration.py b/examples/acrobat_2023/valis/registration.py index 8c99aed6..516cd0f9 100644 --- a/examples/acrobat_2023/valis/registration.py +++ b/examples/acrobat_2023/valis/registration.py @@ -4207,7 +4207,7 @@ def register_micro(self, brightfield_processing_cls=DEFAULT_BRIGHTFIELD_CLASS, if using_tiler: # Have determined that these images will be too big msg = (f"Registration would more than {TILER_THRESH_GB} GB if all images opened in memory. " - f"Will use NonRigidTileRegistrar to register cooresponding tiles to reduce memory consumption, " + f"Will use NonRigidTileRegistrar to register corresponding tiles to reduce memory consumption, " f"but this method is experimental") valtils.print_warning(msg) diff --git a/valis/registration.py b/valis/registration.py index 1616f7a6..2f3931c6 100644 --- a/valis/registration.py +++ b/valis/registration.py @@ -4910,7 +4910,7 @@ def register_micro(self, brightfield_processing_cls=DEFAULT_BRIGHTFIELD_CLASS, if using_tiler: # Have determined that these images will be too big msg = (f"Registration would more than {TILER_THRESH_GB} GB if all images opened in memory. " - f"Will use NonRigidTileRegistrar to register cooresponding tiles to reduce memory consumption, " + f"Will use NonRigidTileRegistrar to register corresponding tiles to reduce memory consumption, " f"but this method is experimental") valtils.print_warning(msg) From 2b2b993b85157895045f102ba037ceb126cb39b9 Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Thu, 5 Mar 2026 17:42:36 +0900 Subject: [PATCH 032/152] Remove blank line --- valis/registration.py | 1 - 1 file changed, 1 deletion(-) diff --git a/valis/registration.py b/valis/registration.py index 2f3931c6..64a7276f 100644 --- a/valis/registration.py +++ b/valis/registration.py @@ -5109,7 +5109,6 @@ def warp_and_save_slides(self, dst_dir, level=0, non_rigid=True, colormap=slide_io.CMAP_AUTO, interp_method="bicubic", tile_wh=None, compression=DEFAULT_COMPRESSION, Q=100, pyramid=True): - f"""Warp and save all slides Each slide will be saved as an ome.tiff. The extension of each file will From ab5fdb0542e9729e6838b1b446d40e7839923e69 Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Thu, 5 Mar 2026 17:43:02 +0900 Subject: [PATCH 033/152] Fix typo: initialzing -> initializing --- examples/acrobat_2023/valis/registration.py | 12 ++++++------ valis/registration.py | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/examples/acrobat_2023/valis/registration.py b/examples/acrobat_2023/valis/registration.py index 516cd0f9..284b9e93 100644 --- a/examples/acrobat_2023/valis/registration.py +++ b/examples/acrobat_2023/valis/registration.py @@ -672,7 +672,7 @@ def warp_img(self, img=None, non_rigid=True, crop=True, interp_method="bicubic") image will not be cropped. If "overlap", the warped slide will be cropped to include only areas where all images overlapped. "reference" crops to the area that overlaps with the reference image, - defined by `reference_img_f` when initialzing the `Valis object`. + defined by `reference_img_f` when initializing the `Valis object`. interp_method : str Interpolation method used when warping slide. Default is "bicubic" @@ -835,7 +835,7 @@ def warp_slide(self, level, non_rigid=True, crop=True, image will not be cropped. If "overlap", the warped slide will be cropped to include only areas where all images overlapped. "reference" crops to the area that overlaps with the reference image, - defined by `reference_img_f` when initialzing the `Valis object`. + defined by `reference_img_f` when initializing the `Valis object`. src_f : str, optional Path of slide to be warped. If None (the default), Slide.src_f @@ -1048,7 +1048,7 @@ def warp_xy(self, xy, M=None, slide_level=0, pt_level=0, image will not be cropped. If "overlap", the warped slide will be cropped to include only areas where all images overlapped. "reference" crops to the area that overlaps with the reference image, - defined by `reference_img_f` when initialzing the `Valis object`. + defined by `reference_img_f` when initializing the `Valis object`. """ if M is None: @@ -1224,7 +1224,7 @@ def warp_geojson(self, geojson_f, M=None, slide_level=0, pt_level=0, image will not be cropped. If "overlap", the warped slide will be cropped to include only areas where all images overlapped. "reference" crops to the area that overlaps with the reference image, - defined by `reference_img_f` when initialzing the `Valis object`. + defined by `reference_img_f` when initializing the `Valis object`. """ if M is None: @@ -4424,7 +4424,7 @@ def warp_and_save_slides(self, dst_dir, level=0, non_rigid=True, image will not be cropped. If "overlap", the warped slide will be cropped to include only areas where all images overlapped. "reference" crops to the area that overlaps with the reference image, - defined by `reference_img_f` when initialzing the `Valis object`. + defined by `reference_img_f` when initializing the `Valis object`. colormap : list List of RGB colors (0-255) to use for channel colors @@ -4491,7 +4491,7 @@ def warp_and_merge_slides(self, dst_f=None, level=0, non_rigid=True, image will not be cropped. If "overlap", the warped slide will be cropped to include only areas where all images overlapped. "reference" crops to the area that overlaps with the reference image, - defined by `reference_img_f` when initialzing the `Valis object`. + defined by `reference_img_f` when initializing the `Valis object`. channel_name_dict : dict of lists, optional. key = slide file name, value = list of channel names for that slide. If None, diff --git a/valis/registration.py b/valis/registration.py index 64a7276f..75120da4 100644 --- a/valis/registration.py +++ b/valis/registration.py @@ -744,7 +744,7 @@ def warp_img(self, img=None, non_rigid=True, crop=True, interp_method="bicubic") image will not be cropped. If "overlap", the warped slide will be cropped to include only areas where all images overlapped. "reference" crops to the area that overlaps with the reference image, - defined by `reference_img_f` when initialzing the `Valis object`. + defined by `reference_img_f` when initializing the `Valis object`. interp_method : str Interpolation method used when warping slide. Default is "bicubic" @@ -911,7 +911,7 @@ def warp_slide(self, level, non_rigid=True, crop=True, image will not be cropped. If "overlap", the warped slide will be cropped to include only areas where all images overlapped. "reference" crops to the area that overlaps with the reference image, - defined by `reference_img_f` when initialzing the `Valis object`. + defined by `reference_img_f` when initializing the `Valis object`. src_f : str, optional Path of slide to be warped. If None (the default), Slide.src_f @@ -1146,7 +1146,7 @@ def warp_xy(self, xy, M=None, slide_level=0, pt_level=0, image will not be cropped. If "overlap", the warped slide will be cropped to include only areas where all images overlapped. "reference" crops to the area that overlaps with the reference image, - defined by `reference_img_f` when initialzing the `Valis object`. + defined by `reference_img_f` when initializing the `Valis object`. """ if M is None: @@ -1322,7 +1322,7 @@ def warp_geojson(self, geojson_f, M=None, slide_level=0, pt_level=0, image will not be cropped. If "overlap", the warped slide will be cropped to include only areas where all images overlapped. "reference" crops to the area that overlaps with the reference image, - defined by `reference_img_f` when initialzing the `Valis object`. + defined by `reference_img_f` when initializing the `Valis object`. """ if M is None: @@ -5133,7 +5133,7 @@ def warp_and_save_slides(self, dst_dir, level=0, non_rigid=True, image will not be cropped. If "overlap", the warped slide will be cropped to include only areas where all images overlapped. "reference" crops to the area that overlaps with the reference image, - defined by `reference_img_f` when initialzing the `Valis object`. + defined by `reference_img_f` when initializing the `Valis object`. colormap : list List of RGB colors (0-255) to use for channel colors. @@ -5230,7 +5230,7 @@ def warp_and_merge_slides(self, dst_f=None, level=0, non_rigid=True, image will not be cropped. If "overlap", the warped slide will be cropped to include only areas where all images overlapped. "reference" crops to the area that overlaps with the reference image, - defined by `reference_img_f` when initialzing the `Valis object`. + defined by `reference_img_f` when initializing the `Valis object`. channel_name_dict : dict of lists, optional. key = slide file name, value = list of channel names for that slide. If None, From 2324de3033237539476ddc7e22f9b19a9611fcda Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Thu, 5 Mar 2026 17:43:26 +0900 Subject: [PATCH 034/152] Fix typo: optionaal -> optional --- examples/acrobat_2023/valis/registration.py | 2 +- examples/acrobat_2023/valis/viz.py | 2 +- valis/registration.py | 2 +- valis/viz.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/acrobat_2023/valis/registration.py b/examples/acrobat_2023/valis/registration.py index 284b9e93..71e4bc2d 100644 --- a/examples/acrobat_2023/valis/registration.py +++ b/examples/acrobat_2023/valis/registration.py @@ -4497,7 +4497,7 @@ def warp_and_merge_slides(self, dst_f=None, level=0, non_rigid=True, key = slide file name, value = list of channel names for that slide. If None, the the channel names found in each slide will be used. - src_f_list : list of str, optionaal + src_f_list : list of str, optional List of paths to slide to be warped. If None (the default), Valis.original_img_list will be used. Otherwise, the paths to which `src_f_list` points to should be an alternative copy of the slides, such as ones that have undergone diff --git a/examples/acrobat_2023/valis/viz.py b/examples/acrobat_2023/valis/viz.py index 143d04a9..bba502af 100644 --- a/examples/acrobat_2023/valis/viz.py +++ b/examples/acrobat_2023/valis/viz.py @@ -552,7 +552,7 @@ def color_multichannel(multichannel_img, marker_colors, rescale_channels=False, in areas where they are expressed in isolation, but can also make it appear more marker is expressed than there really is. - normalize_by : str, optionaal + normalize_by : str, optional "image" will produce an image where all values are scaled between 0 and the highest intensity in the composite image. This will produce an image where one can see the expression of each marker relative to diff --git a/valis/registration.py b/valis/registration.py index 75120da4..f778d730 100644 --- a/valis/registration.py +++ b/valis/registration.py @@ -5236,7 +5236,7 @@ def warp_and_merge_slides(self, dst_f=None, level=0, non_rigid=True, key = slide file name, value = list of channel names for that slide. If None, the the channel names found in each slide will be used. - src_f_list : list of str, optionaal + src_f_list : list of str, optional List of paths to slide to be warped. If None (the default), Valis.original_img_list will be used. Otherwise, the paths to which `src_f_list` points to should be an alternative copy of the slides, such as ones that have undergone diff --git a/valis/viz.py b/valis/viz.py index 1c193ed3..63024463 100644 --- a/valis/viz.py +++ b/valis/viz.py @@ -710,7 +710,7 @@ def color_multichannel(multichannel_img, marker_colors, rescale_channels=False, in areas where they are expressed in isolation, but can also make it appear more marker is expressed than there really is. - normalize_by : str, optionaal + normalize_by : str, optional "image" will produce an image where all values are scaled between 0 and the highest intensity in the composite image. This will produce an image where one can see the expression of each marker relative to From 0922fd86aa15a3ec4631580042f24fd8c5a71441 Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Thu, 5 Mar 2026 17:44:09 +0900 Subject: [PATCH 035/152] Fix typo: pyips -> pyvips --- examples/acrobat_2023/valis/registration.py | 6 +++--- examples/acrobat_2023/valis/slide_io.py | 4 ++-- examples/warp_points.py | 2 +- valis/registration.py | 6 +++--- valis/slide_io.py | 4 ++-- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/examples/acrobat_2023/valis/registration.py b/examples/acrobat_2023/valis/registration.py index 71e4bc2d..f77974ed 100644 --- a/examples/acrobat_2023/valis/registration.py +++ b/examples/acrobat_2023/valis/registration.py @@ -954,7 +954,7 @@ def warp_and_save_slide(self, dst_f, level=0, non_rigid=True, compression : str Compression method used to save ome.tiff . Default is lzw, but can also - be jpeg or jp2k. See pyips for more details. + be jpeg or jp2k. See pyvips for more details. """ @@ -4437,7 +4437,7 @@ def warp_and_save_slides(self, dst_dir, level=0, non_rigid=True, compression : str, optional Compression method used to save ome.tiff . Default is lzw, but can also - be jpeg or jp2k. See pyips for more details. + be jpeg or jp2k. See pyvips for more details. """ pathlib.Path(dst_dir).mkdir(exist_ok=True, parents=True) @@ -4519,7 +4519,7 @@ def warp_and_merge_slides(self, dst_f=None, level=0, non_rigid=True, compression : str Compression method used to save ome.tiff . Default is lzw, but can also - be jpeg or jp2k. See pyips for more details. + be jpeg or jp2k. See pyvips for more details. Returns ------- diff --git a/examples/acrobat_2023/valis/slide_io.py b/examples/acrobat_2023/valis/slide_io.py index 0e5cb02f..95df8def 100644 --- a/examples/acrobat_2023/valis/slide_io.py +++ b/examples/acrobat_2023/valis/slide_io.py @@ -2824,7 +2824,7 @@ def save_ome_tiff(img, dst_f, ome_xml=None, tile_wh=1024, compression="lzw"): compression : str Compression method used to save ome.tiff . Default is lzw, but can also - be jpeg or jp2k. See pyips for more details. + be jpeg or jp2k. See pyvips for more details. """ @@ -2984,7 +2984,7 @@ def convert_to_ome_tiff(src_f, dst_f, level, series=None, xywh=None, compression : str Compression method used to save ome.tiff . Default is lzw, but can also - be jpeg or jp2k. See pyips for more details. + be jpeg or jp2k. See pyvips for more details. """ diff --git a/examples/warp_points.py b/examples/warp_points.py index 7ab84506..c8c48fe2 100644 --- a/examples/warp_points.py +++ b/examples/warp_points.py @@ -70,7 +70,7 @@ dst_dir = "./expected_results/roi" pathlib.Path(dst_dir).mkdir(exist_ok=True, parents=True) -# Warp each slide and slice the ROI from it using each pyips.Image's "extract_area" method. +# Warp each slide and slice the ROI from it using each pyvips.Image's "extract_area" method. fig, axes = plt.subplots(2, 3, figsize=(12, 8), sharex=True, sharey=True) ax = axes.ravel() for i, slide in enumerate(registrar.slide_dict.values()): diff --git a/valis/registration.py b/valis/registration.py index f778d730..28072098 100644 --- a/valis/registration.py +++ b/valis/registration.py @@ -1057,7 +1057,7 @@ def warp_and_save_slide(self, dst_f, level=0, non_rigid=True, Tile width and height used to save image compression : str - Compression method used to save ome.tiff. See pyips for more details. + Compression method used to save ome.tiff. See pyvips for more details. Q : int Q factor for lossy compression @@ -5147,7 +5147,7 @@ def warp_and_save_slides(self, dst_dir, level=0, non_rigid=True, Tile width and height used to save image compression : str, optional - Compression method used to save ome.tiff. See pyips for more details. + Compression method used to save ome.tiff. See pyvips for more details. Q : int Q factor for lossy compression @@ -5258,7 +5258,7 @@ def warp_and_merge_slides(self, dst_f=None, level=0, non_rigid=True, compression : str Compression method used to save ome.tiff . Default is lzw, but can also - be jpeg or jp2k. See pyips for more details. + be jpeg or jp2k. See pyvips for more details. Q : int Q factor for lossy compression diff --git a/valis/slide_io.py b/valis/slide_io.py index a2df2abd..bd9ed10a 100644 --- a/valis/slide_io.py +++ b/valis/slide_io.py @@ -3551,7 +3551,7 @@ def save_ome_tiff(img, dst_f, ome_xml=None, tile_wh=512, compression=DEFAULT_COM is both the width and height. compression : str - Compression method used to save ome.tiff . See pyips for more details. + Compression method used to save ome.tiff . See pyvips for more details. Q : int Q factor for lossy compression @@ -3738,7 +3738,7 @@ def convert_to_ome_tiff(src_f, dst_f, level, series=None, xywh=None, so `tile_wh` is both the width and height. compression : str - Compression method used to save ome.tiff. See pyips for more details. + Compression method used to save ome.tiff. See pyvips for more details. Q : int Q factor for lossy compression From ab2c3876f45baabe3ff46463325b195c662092cb Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Thu, 5 Mar 2026 17:45:28 +0900 Subject: [PATCH 036/152] Fix typo: deterime -> determine --- examples/acrobat_2023/valis/serial_non_rigid.py | 4 ++-- valis/serial_non_rigid.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/acrobat_2023/valis/serial_non_rigid.py b/examples/acrobat_2023/valis/serial_non_rigid.py index 87a036aa..a6185420 100644 --- a/examples/acrobat_2023/valis/serial_non_rigid.py +++ b/examples/acrobat_2023/valis/serial_non_rigid.py @@ -604,7 +604,7 @@ def __init__(self, src, reference_img_f=None, moving_to_fixed_xy=None, #. Rigid registered xy in moving/current/from image #. Rigid registered xy in fixed/next/to image - To deterime which pairs of images will be aligned, use + To determine which pairs of images will be aligned, use `get_alignment_indices`. Can use `get_imgs_from_dir` to see the order inwhich the images will be read, which will correspond to the indices retuned by `get_alignment_indices`. @@ -1090,7 +1090,7 @@ def register_images(src, non_rigid_reg_class=non_rigid_registrars.OpticalFlowWar #. Rigid registered xy in moving/current/from image #. Rigid registered xy in fixed/next/to image - To deterime which pairs of images will be aligned, use + To determine which pairs of images will be aligned, use `warp_tools.get_alignment_indices`. Can use `get_imgs_from_dir` to see the order inwhich the images will be read, which will correspond to the indices retuned by `warp_tools.get_alignment_indices`. diff --git a/valis/serial_non_rigid.py b/valis/serial_non_rigid.py index 71bb4c71..40ed45e1 100644 --- a/valis/serial_non_rigid.py +++ b/valis/serial_non_rigid.py @@ -603,7 +603,7 @@ def __init__(self, src, reference_img_f=None, moving_to_fixed_xy=None, #. Rigid registered xy in moving/current/from image #. Rigid registered xy in fixed/next/to image - To deterime which pairs of images will be aligned, use + To determine which pairs of images will be aligned, use `get_alignment_indices`. Can use `get_imgs_from_dir` to see the order inwhich the images will be read, which will correspond to the indices retuned by `get_alignment_indices`. @@ -1122,7 +1122,7 @@ def register_images(src, non_rigid_reg_class=non_rigid_registrars.OpticalFlowWar #. Rigid registered xy in moving/current/from image #. Rigid registered xy in fixed/next/to image - To deterime which pairs of images will be aligned, use + To determine which pairs of images will be aligned, use `warp_tools.get_alignment_indices`. Can use `get_imgs_from_dir` to see the order inwhich the images will be read, which will correspond to the indices retuned by `warp_tools.get_alignment_indices`. From 8bf483745af1c672d7194a5b4652f3512f54becf Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Thu, 5 Mar 2026 17:45:54 +0900 Subject: [PATCH 037/152] Fix typo: retuned -> returned --- examples/acrobat_2023/valis/serial_non_rigid.py | 4 ++-- valis/serial_non_rigid.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/acrobat_2023/valis/serial_non_rigid.py b/examples/acrobat_2023/valis/serial_non_rigid.py index a6185420..06141b08 100644 --- a/examples/acrobat_2023/valis/serial_non_rigid.py +++ b/examples/acrobat_2023/valis/serial_non_rigid.py @@ -607,7 +607,7 @@ def __init__(self, src, reference_img_f=None, moving_to_fixed_xy=None, To determine which pairs of images will be aligned, use `get_alignment_indices`. Can use `get_imgs_from_dir` to see the order inwhich the images will be read, which will correspond - to the indices retuned by `get_alignment_indices`. + to the indices returned by `get_alignment_indices`. If `src` is a SerialRigidRegistrar and `moving_to_fixed_xy` is True, then the matching features in the SerialRigidRegistrar will @@ -1093,7 +1093,7 @@ def register_images(src, non_rigid_reg_class=non_rigid_registrars.OpticalFlowWar To determine which pairs of images will be aligned, use `warp_tools.get_alignment_indices`. Can use `get_imgs_from_dir` to see the order inwhich the images will be read, which will correspond - to the indices retuned by `warp_tools.get_alignment_indices`. + to the indices returned by `warp_tools.get_alignment_indices`. If `src` is a SerialRigidRegistrar and `moving_to_fixed_xy` is True, then the matching features in the SerialRigidRegistrar will diff --git a/valis/serial_non_rigid.py b/valis/serial_non_rigid.py index 40ed45e1..70a6fb51 100644 --- a/valis/serial_non_rigid.py +++ b/valis/serial_non_rigid.py @@ -606,7 +606,7 @@ def __init__(self, src, reference_img_f=None, moving_to_fixed_xy=None, To determine which pairs of images will be aligned, use `get_alignment_indices`. Can use `get_imgs_from_dir` to see the order inwhich the images will be read, which will correspond - to the indices retuned by `get_alignment_indices`. + to the indices returned by `get_alignment_indices`. If `src` is a SerialRigidRegistrar and `moving_to_fixed_xy` is True, then the matching features in the SerialRigidRegistrar will @@ -1125,7 +1125,7 @@ def register_images(src, non_rigid_reg_class=non_rigid_registrars.OpticalFlowWar To determine which pairs of images will be aligned, use `warp_tools.get_alignment_indices`. Can use `get_imgs_from_dir` to see the order inwhich the images will be read, which will correspond - to the indices retuned by `warp_tools.get_alignment_indices`. + to the indices returned by `warp_tools.get_alignment_indices`. If `src` is a SerialRigidRegistrar and `moving_to_fixed_xy` is True, then the matching features in the SerialRigidRegistrar will From 5bec7abb5365247059ed98b23733a58dabf7fd4f Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Thu, 5 Mar 2026 17:46:35 +0900 Subject: [PATCH 038/152] Fix typo: "should indicating" -> "should indicate" --- examples/acrobat_2023/valis/serial_non_rigid.py | 2 +- valis/serial_non_rigid.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/acrobat_2023/valis/serial_non_rigid.py b/examples/acrobat_2023/valis/serial_non_rigid.py index 06141b08..5dc88ca4 100644 --- a/examples/acrobat_2023/valis/serial_non_rigid.py +++ b/examples/acrobat_2023/valis/serial_non_rigid.py @@ -578,7 +578,7 @@ def __init__(self, src, reference_img_f=None, moving_to_fixed_xy=None, A SerialRigidRegistrar object that was used to optimally align a series of images. - If a string, it should indicating where the images + If a string, it should indicate where the images to be aligned are located. If src is a string, the images should be named such that they are read in the correct order, i.e. each starting with a number. diff --git a/valis/serial_non_rigid.py b/valis/serial_non_rigid.py index 70a6fb51..af7104bd 100644 --- a/valis/serial_non_rigid.py +++ b/valis/serial_non_rigid.py @@ -577,7 +577,7 @@ def __init__(self, src, reference_img_f=None, moving_to_fixed_xy=None, A SerialRigidRegistrar object that was used to optimally align a series of images. - If a string, it should indicating where the images + If a string, it should indicate where the images to be aligned are located. If src is a string, the images should be named such that they are read in the correct order, i.e. each starting with a number. From ecee26889ff405ae4cd088ca68cfe712b2b23336 Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Thu, 5 Mar 2026 17:47:09 +0900 Subject: [PATCH 039/152] Fix typo: assocatiated -> associated --- examples/acrobat_2023/valis/serial_non_rigid.py | 2 +- valis/serial_non_rigid.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/acrobat_2023/valis/serial_non_rigid.py b/examples/acrobat_2023/valis/serial_non_rigid.py index 5dc88ca4..db07325c 100644 --- a/examples/acrobat_2023/valis/serial_non_rigid.py +++ b/examples/acrobat_2023/valis/serial_non_rigid.py @@ -547,7 +547,7 @@ class SerialNonRigidRegistrar(object): non_rigid_obj_dict : dict Dictionary, where each key is the name of a NonRigidZImage, and - the value is the assocatiated NonRigidZImage + the value is the associated NonRigidZImage non_rigid_reg_params: dictionary Dictionary containing parameters {name: value} to be used to initialize diff --git a/valis/serial_non_rigid.py b/valis/serial_non_rigid.py index af7104bd..dca157a0 100644 --- a/valis/serial_non_rigid.py +++ b/valis/serial_non_rigid.py @@ -546,7 +546,7 @@ class SerialNonRigidRegistrar(object): non_rigid_obj_dict : dict Dictionary, where each key is the name of a NonRigidZImage, and - the value is the assocatiated NonRigidZImage + the value is the associated NonRigidZImage non_rigid_reg_params: dictionary Dictionary containing parameters {name: value} to be used to initialize From 338a335f88391da30e41cac6b9403ab3405ed490 Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Thu, 5 Mar 2026 17:47:32 +0900 Subject: [PATCH 040/152] Fix typo: nedd -> need --- examples/acrobat_2023/valis/registration.py | 4 ++-- examples/acrobat_2023/valis/serial_non_rigid.py | 12 ++++++------ valis/registration.py | 2 +- valis/serial_non_rigid.py | 12 ++++++------ 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/examples/acrobat_2023/valis/registration.py b/examples/acrobat_2023/valis/registration.py index f77974ed..f6446364 100644 --- a/examples/acrobat_2023/valis/registration.py +++ b/examples/acrobat_2023/valis/registration.py @@ -1749,7 +1749,7 @@ def __init__(self, src_dir, dst_dir, series=None, name=None, image_type=None, Dictionary containing key, value pairs to be used to initialize `non_rigid_registrar_cls`. In the case where simple ITK is used by the, params should be - a SimpleITK.ParameterMap. Note that numeric values nedd to be + a SimpleITK.ParameterMap. Note that numeric values need to be converted to strings. See the NonRigidRegistrar classes in `non_rigid_registrars` for the available non-rigid registration methods and arguments. @@ -4171,7 +4171,7 @@ def register_micro(self, brightfield_processing_cls=DEFAULT_BRIGHTFIELD_CLASS, Dictionary containing key, value pairs to be used to initialize `non_rigid_registrar_cls`. In the case where simple ITK is used by the, params should be - a SimpleITK.ParameterMap. Note that numeric values nedd to be + a SimpleITK.ParameterMap. Note that numeric values need to be converted to strings. See the NonRigidRegistrar classes in `non_rigid_registrars` for the available non-rigid registration methods and arguments. diff --git a/examples/acrobat_2023/valis/serial_non_rigid.py b/examples/acrobat_2023/valis/serial_non_rigid.py index db07325c..c581edbf 100644 --- a/examples/acrobat_2023/valis/serial_non_rigid.py +++ b/examples/acrobat_2023/valis/serial_non_rigid.py @@ -553,7 +553,7 @@ class SerialNonRigidRegistrar(object): Dictionary containing parameters {name: value} to be used to initialize the NonRigidRegistrar. In the case where simple ITK is used by the, params should be - a SimpleITK.ParameterMap. Note that numeric values nedd to be + a SimpleITK.ParameterMap. Note that numeric values need to be converted to strings. mask : ndarray @@ -832,7 +832,7 @@ def register_serial(self, non_rigid_reg_class, non_rigid_reg_params=None, img_pa Dictionary containing parameters {name: value} to be used to initialize the NonRigidRegistrar. In the case where simple ITK is used by the, params should be - a SimpleITK.ParameterMap. Note that numeric values nedd to be + a SimpleITK.ParameterMap. Note that numeric values need to be converted to strings. """ @@ -882,7 +882,7 @@ def register_to_ref(self, non_rigid_reg_class, non_rigid_reg_params=None, img_pa Dictionary containing parameters {name: value} to be used to initialize the NonRigidRegistrar. In the case where simple ITK is used by the, params should be - a SimpleITK.ParameterMap. Note that numeric values nedd to be + a SimpleITK.ParameterMap. Note that numeric values need to be converted to strings. """ @@ -916,7 +916,7 @@ def register_groupwise(self, non_rigid_reg_class, non_rigid_reg_params=None): Dictionary containing parameters {name: value} to be used to initialize the NonRigidRegistrar. In the case where simple ITK is used by the, params should be - a SimpleITK.ParameterMap. Note that numeric values nedd to be + a SimpleITK.ParameterMap. Note that numeric values need to be converted to strings. """ @@ -950,7 +950,7 @@ def register(self, non_rigid_reg_class, non_rigid_reg_params, img_params=None): Dictionary containing parameters {name: value} to be used to initialize the NonRigidRegistrar. In the case where simple ITK is used by the, params should be - a SimpleITK.ParameterMap. Note that numeric values nedd to be + a SimpleITK.ParameterMap. Note that numeric values need to be converted to strings. img_params : dict, optional Dictionary of parameters to be used for each particular image. @@ -1069,7 +1069,7 @@ def register_images(src, non_rigid_reg_class=non_rigid_registrars.OpticalFlowWar Dictionary containing parameters {name: value} to be used to initialize the NonRigidRegistrar. In the case where simple ITK is used by the, params should be - a SimpleITK.ParameterMap. Note that numeric values nedd to be + a SimpleITK.ParameterMap. Note that numeric values need to be converted to strings. dst_dir : str, optional diff --git a/valis/registration.py b/valis/registration.py index 28072098..da9d0c7b 100644 --- a/valis/registration.py +++ b/valis/registration.py @@ -4852,7 +4852,7 @@ def register_micro(self, brightfield_processing_cls=DEFAULT_BRIGHTFIELD_CLASS, Dictionary containing key, value pairs to be used to initialize `non_rigid_registrar_cls`. In the case where simple ITK is used by the, params should be - a SimpleITK.ParameterMap. Note that numeric values nedd to be + a SimpleITK.ParameterMap. Note that numeric values need to be converted to strings. See the NonRigidRegistrar classes in `non_rigid_registrars` for the available non-rigid registration methods and arguments. diff --git a/valis/serial_non_rigid.py b/valis/serial_non_rigid.py index dca157a0..33a4d4d2 100644 --- a/valis/serial_non_rigid.py +++ b/valis/serial_non_rigid.py @@ -552,7 +552,7 @@ class SerialNonRigidRegistrar(object): Dictionary containing parameters {name: value} to be used to initialize the NonRigidRegistrar. In the case where simple ITK is used by the, params should be - a SimpleITK.ParameterMap. Note that numeric values nedd to be + a SimpleITK.ParameterMap. Note that numeric values need to be converted to strings. mask : ndarray @@ -852,7 +852,7 @@ def register_serial(self, non_rigid_reg_obj, non_rigid_reg_params=None, img_para Dictionary containing parameters {name: value} to be used to initialize `non_rigid_reg_class`. In the case where simple ITK is used by the, params should be - a SimpleITK.ParameterMap. Note that numeric values nedd to be + a SimpleITK.ParameterMap. Note that numeric values need to be converted to strings. """ @@ -903,7 +903,7 @@ def register_to_ref(self, non_rigid_reg_obj, non_rigid_reg_params=None, img_para Dictionary containing parameters {name: value} to be used to initialize the NonRigidRegistrar. In the case where simple ITK is used by the, params should be - a SimpleITK.ParameterMap. Note that numeric values nedd to be + a SimpleITK.ParameterMap. Note that numeric values need to be converted to strings. """ @@ -938,7 +938,7 @@ def register_groupwise(self, non_rigid_reg_class, non_rigid_reg_params=None): Dictionary containing parameters {name: value} to be used to initialize the NonRigidRegistrar. In the case where simple ITK is used by the, params should be - a SimpleITK.ParameterMap. Note that numeric values nedd to be + a SimpleITK.ParameterMap. Note that numeric values need to be converted to strings. """ @@ -973,7 +973,7 @@ def register(self, non_rigid_reg_class, non_rigid_reg_params, img_params=None): Dictionary containing parameters {name: value} to be used to initialize the NonRigidRegistrar. In the case where simple ITK is used by the, params should be - a SimpleITK.ParameterMap. Note that numeric values nedd to be + a SimpleITK.ParameterMap. Note that numeric values need to be converted to strings. img_params : dict, optional Dictionary of parameters to be used for each particular image. @@ -1101,7 +1101,7 @@ def register_images(src, non_rigid_reg_class=non_rigid_registrars.OpticalFlowWar Dictionary containing parameters {name: value} to be used to initialize the NonRigidRegistrar. In the case where simple ITK is used by the, params should be - a SimpleITK.ParameterMap. Note that numeric values nedd to be + a SimpleITK.ParameterMap. Note that numeric values need to be converted to strings. dst_dir : str, optional From 3aa40316d88782e75938dc62e42ced743b6921a9 Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Thu, 5 Mar 2026 17:48:10 +0900 Subject: [PATCH 041/152] Fix typo: conductedd -> conducted --- examples/acrobat_2023/valis/serial_non_rigid.py | 2 +- valis/serial_non_rigid.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/acrobat_2023/valis/serial_non_rigid.py b/examples/acrobat_2023/valis/serial_non_rigid.py index c581edbf..60e35695 100644 --- a/examples/acrobat_2023/valis/serial_non_rigid.py +++ b/examples/acrobat_2023/valis/serial_non_rigid.py @@ -937,7 +937,7 @@ def register(self, non_rigid_reg_class, non_rigid_reg_params, img_params=None): Images will be registered serially if `non_rigid_reg_class` is a subclass of NonRigidRegistrarGroupwise, then groupwise registration - will be conductedd. If `non_rigid_reg_class` is a subclass of + will be conducted. If `non_rigid_reg_class` is a subclass of NonRigidRegistrar then images will be aligned serially. Parameters diff --git a/valis/serial_non_rigid.py b/valis/serial_non_rigid.py index 33a4d4d2..0c9fb74c 100644 --- a/valis/serial_non_rigid.py +++ b/valis/serial_non_rigid.py @@ -960,7 +960,7 @@ def register(self, non_rigid_reg_class, non_rigid_reg_params, img_params=None): Images will be registered serially if `non_rigid_reg_class` is a subclass of NonRigidRegistrarGroupwise, then groupwise registration - will be conductedd. If `non_rigid_reg_class` is a subclass of + will be conducted. If `non_rigid_reg_class` is a subclass of NonRigidRegistrar then images will be aligned serially. Parameters From 5ae37aaff6233128dc7c489e49d6522a467b0354 Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Thu, 5 Mar 2026 17:48:56 +0900 Subject: [PATCH 042/152] Fix typo: aliged -> aligned --- examples/acrobat_2023/valis/serial_non_rigid.py | 2 +- examples/acrobat_2023/valis/serial_rigid.py | 2 +- valis/serial_non_rigid.py | 2 +- valis/serial_rigid.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/acrobat_2023/valis/serial_non_rigid.py b/examples/acrobat_2023/valis/serial_non_rigid.py index 60e35695..7b65c522 100644 --- a/examples/acrobat_2023/valis/serial_non_rigid.py +++ b/examples/acrobat_2023/valis/serial_non_rigid.py @@ -1073,7 +1073,7 @@ def register_images(src, non_rigid_reg_class=non_rigid_registrars.OpticalFlowWar converted to strings. dst_dir : str, optional - Top directory where aliged images should be save. SerialNonRigidRegistrar will + Top directory where aligned images should be save. SerialNonRigidRegistrar will be in this folder, and aligned images in the "registered_images" sub-directory. If None, the images will not be written to file diff --git a/examples/acrobat_2023/valis/serial_rigid.py b/examples/acrobat_2023/valis/serial_rigid.py index 4264c215..4d257c44 100644 --- a/examples/acrobat_2023/valis/serial_rigid.py +++ b/examples/acrobat_2023/valis/serial_rigid.py @@ -1434,7 +1434,7 @@ def register_images(img_dir, dst_dir=None, name="registrar", to be registered. These images need to be single channel, uint8 images dst_dir : str, optional - Top directory where aliged images should be save. SerialRigidRegistrar will + Top directory where aligned images should be save. SerialRigidRegistrar will be in this folder, and aligned images in the "registered_images" sub-directory. If None, the images will not be written to file diff --git a/valis/serial_non_rigid.py b/valis/serial_non_rigid.py index 0c9fb74c..9a7cee30 100644 --- a/valis/serial_non_rigid.py +++ b/valis/serial_non_rigid.py @@ -1105,7 +1105,7 @@ def register_images(src, non_rigid_reg_class=non_rigid_registrars.OpticalFlowWar converted to strings. dst_dir : str, optional - Top directory where aliged images should be save. SerialNonRigidRegistrar will + Top directory where aligned images should be save. SerialNonRigidRegistrar will be in this folder, and aligned images in the "registered_images" sub-directory. If None, the images will not be written to file diff --git a/valis/serial_rigid.py b/valis/serial_rigid.py index dde0761e..389771dd 100644 --- a/valis/serial_rigid.py +++ b/valis/serial_rigid.py @@ -1677,7 +1677,7 @@ def register_images(img_dir, dst_dir=None, name="registrar", to be registered. These images need to be single channel, uint8 images dst_dir : str, optional - Top directory where aliged images should be save. SerialRigidRegistrar will + Top directory where aligned images should be save. SerialRigidRegistrar will be in this folder, and aligned images in the "registered_images" sub-directory. If None, the images will not be written to file From d9d07e6950d133a2f1c4718e48ecddc8fa5530da Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Thu, 5 Mar 2026 17:49:14 +0900 Subject: [PATCH 043/152] Fix typo: inwhich -> in which --- examples/acrobat_2023/valis/serial_non_rigid.py | 4 ++-- valis/serial_non_rigid.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/acrobat_2023/valis/serial_non_rigid.py b/examples/acrobat_2023/valis/serial_non_rigid.py index 7b65c522..0e7a4be6 100644 --- a/examples/acrobat_2023/valis/serial_non_rigid.py +++ b/examples/acrobat_2023/valis/serial_non_rigid.py @@ -606,7 +606,7 @@ def __init__(self, src, reference_img_f=None, moving_to_fixed_xy=None, To determine which pairs of images will be aligned, use `get_alignment_indices`. Can use `get_imgs_from_dir` - to see the order inwhich the images will be read, which will correspond + to see the order in which the images will be read, which will correspond to the indices returned by `get_alignment_indices`. If `src` is a SerialRigidRegistrar and `moving_to_fixed_xy` is @@ -1092,7 +1092,7 @@ def register_images(src, non_rigid_reg_class=non_rigid_registrars.OpticalFlowWar To determine which pairs of images will be aligned, use `warp_tools.get_alignment_indices`. Can use `get_imgs_from_dir` - to see the order inwhich the images will be read, which will correspond + to see the order in which the images will be read, which will correspond to the indices returned by `warp_tools.get_alignment_indices`. If `src` is a SerialRigidRegistrar and `moving_to_fixed_xy` is diff --git a/valis/serial_non_rigid.py b/valis/serial_non_rigid.py index 9a7cee30..57f6ef37 100644 --- a/valis/serial_non_rigid.py +++ b/valis/serial_non_rigid.py @@ -605,7 +605,7 @@ def __init__(self, src, reference_img_f=None, moving_to_fixed_xy=None, To determine which pairs of images will be aligned, use `get_alignment_indices`. Can use `get_imgs_from_dir` - to see the order inwhich the images will be read, which will correspond + to see the order in which the images will be read, which will correspond to the indices returned by `get_alignment_indices`. If `src` is a SerialRigidRegistrar and `moving_to_fixed_xy` is @@ -1124,7 +1124,7 @@ def register_images(src, non_rigid_reg_class=non_rigid_registrars.OpticalFlowWar To determine which pairs of images will be aligned, use `warp_tools.get_alignment_indices`. Can use `get_imgs_from_dir` - to see the order inwhich the images will be read, which will correspond + to see the order in which the images will be read, which will correspond to the indices returned by `warp_tools.get_alignment_indices`. If `src` is a SerialRigidRegistrar and `moving_to_fixed_xy` is From 064c820b988dddbb6352c26dd4026f4df092d2bc Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Thu, 5 Mar 2026 17:49:48 +0900 Subject: [PATCH 044/152] Fix typo: aligne -> aligned --- examples/acrobat_2023/valis/registration.py | 2 +- examples/acrobat_2023/valis/serial_non_rigid.py | 2 +- examples/acrobat_2023/valis/serial_rigid.py | 4 ++-- valis/registration.py | 2 +- valis/serial_non_rigid.py | 2 +- valis/serial_rigid.py | 4 ++-- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/examples/acrobat_2023/valis/registration.py b/examples/acrobat_2023/valis/registration.py index f6446364..0a865382 100644 --- a/examples/acrobat_2023/valis/registration.py +++ b/examples/acrobat_2023/valis/registration.py @@ -1503,7 +1503,7 @@ class Valis(object): the `img_obj_list` has been sorted during rigid registration. align_to_reference : bool - Whether or not images should be aligne to a reference image + Whether or not images should be aligned to a reference image specified by `reference_img_f`. Will be set to True if `reference_img_f` is provided. diff --git a/examples/acrobat_2023/valis/serial_non_rigid.py b/examples/acrobat_2023/valis/serial_non_rigid.py index 0e7a4be6..20ac8025 100644 --- a/examples/acrobat_2023/valis/serial_non_rigid.py +++ b/examples/acrobat_2023/valis/serial_non_rigid.py @@ -1113,7 +1113,7 @@ def register_images(src, non_rigid_reg_class=non_rigid_registrars.OpticalFlowWar Optional name for this SerialNonRigidRegistrar align_to_reference : bool, optional - Whether or not images should be aligne to a reference image + Whether or not images should be aligned to a reference image specified by `reference_img_f`. Will be set to True if `reference_img_f` is provided. diff --git a/examples/acrobat_2023/valis/serial_rigid.py b/examples/acrobat_2023/valis/serial_rigid.py index 4d257c44..f061c5e8 100644 --- a/examples/acrobat_2023/valis/serial_rigid.py +++ b/examples/acrobat_2023/valis/serial_rigid.py @@ -374,7 +374,7 @@ class SerialRigidRegistrar(object): the `img_obj_list` has been sorted. align_to_reference : bool, optional - Whether or not images should be aligne to a reference image + Whether or not images should be aligned to a reference image specified by `reference_img_f`. Will be set to True if `reference_img_f` is provided. @@ -419,7 +419,7 @@ def __init__(self, img_dir, imgs_ordered=False, reference_img_f=None, Descriptive name of registrar, such as the sample's name align_to_reference : bool, optional - Whether or not images should be aligne to a reference image + Whether or not images should be aligned to a reference image specified by `reference_img_f`. Will be set to True if `reference_img_f` is provided. diff --git a/valis/registration.py b/valis/registration.py index da9d0c7b..2ceae4eb 100644 --- a/valis/registration.py +++ b/valis/registration.py @@ -1616,7 +1616,7 @@ class Valis(object): the `img_obj_list` has been sorted during rigid registration. align_to_reference : bool - Whether or not images should be aligne to a reference image + Whether or not images should be aligned to a reference image specified by `reference_img_f`. Will be set to True if `reference_img_f` is provided. diff --git a/valis/serial_non_rigid.py b/valis/serial_non_rigid.py index 57f6ef37..d2fadf04 100644 --- a/valis/serial_non_rigid.py +++ b/valis/serial_non_rigid.py @@ -1145,7 +1145,7 @@ def register_images(src, non_rigid_reg_class=non_rigid_registrars.OpticalFlowWar Optional name for this SerialNonRigidRegistrar align_to_reference : bool, optional - Whether or not images should be aligne to a reference image + Whether or not images should be aligned to a reference image specified by `reference_img_f`. Will be set to True if `reference_img_f` is provided. diff --git a/valis/serial_rigid.py b/valis/serial_rigid.py index 389771dd..83d5de91 100644 --- a/valis/serial_rigid.py +++ b/valis/serial_rigid.py @@ -394,7 +394,7 @@ class SerialRigidRegistrar(object): the `img_obj_list` has been sorted. align_to_reference : bool, optional - Whether or not images should be aligne to a reference image + Whether or not images should be aligned to a reference image specified by `reference_img_f`. Will be set to True if `reference_img_f` is provided. @@ -439,7 +439,7 @@ def __init__(self, img_dir, imgs_ordered=False, reference_img_f=None, Descriptive name of registrar, such as the sample's name align_to_reference : bool, optional - Whether or not images should be aligne to a reference image + Whether or not images should be aligned to a reference image specified by `reference_img_f`. Will be set to True if `reference_img_f` is provided. From 838bfefec07e0d9fec9c4904d9f7f991da19d8fd Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Thu, 5 Mar 2026 17:50:17 +0900 Subject: [PATCH 045/152] Fix typo: registeredt -> registered --- examples/acrobat_2023/valis/serial_non_rigid.py | 2 +- valis/serial_non_rigid.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/acrobat_2023/valis/serial_non_rigid.py b/examples/acrobat_2023/valis/serial_non_rigid.py index 20ac8025..f3c0206e 100644 --- a/examples/acrobat_2023/valis/serial_non_rigid.py +++ b/examples/acrobat_2023/valis/serial_non_rigid.py @@ -1129,7 +1129,7 @@ def register_images(src, non_rigid_reg_class=non_rigid_registrars.OpticalFlowWar Returns ------- nr_reg : SerialNonRigidRegistrar - SerialNonRigidRegistrar that has registeredt the images in `src` + SerialNonRigidRegistrar that has registered the images in `src` """ tic = time() diff --git a/valis/serial_non_rigid.py b/valis/serial_non_rigid.py index d2fadf04..e27d9d1d 100644 --- a/valis/serial_non_rigid.py +++ b/valis/serial_non_rigid.py @@ -1161,7 +1161,7 @@ def register_images(src, non_rigid_reg_class=non_rigid_registrars.OpticalFlowWar Returns ------- nr_reg : SerialNonRigidRegistrar - SerialNonRigidRegistrar that has registeredt the images in `src` + SerialNonRigidRegistrar that has registered the images in `src` """ tic = time() From 31876b0647e85bc2d43aaef4eee8752fdc49b834 Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Thu, 5 Mar 2026 17:50:40 +0900 Subject: [PATCH 046/152] Fix typo: containin -> containing --- examples/acrobat_2023/valis/serial_non_rigid.py | 2 +- examples/acrobat_2023/valis/serial_rigid.py | 4 ++-- valis/serial_non_rigid.py | 2 +- valis/serial_rigid.py | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/acrobat_2023/valis/serial_non_rigid.py b/examples/acrobat_2023/valis/serial_non_rigid.py index f3c0206e..4852fa55 100644 --- a/examples/acrobat_2023/valis/serial_non_rigid.py +++ b/examples/acrobat_2023/valis/serial_non_rigid.py @@ -981,7 +981,7 @@ def summarize(self): Returns ------- summary_df: Dataframe - Pandas dataframe containin the registration error of the + Pandas dataframe containing the registration error of the alignment between each image and the previous one in the stack. """ diff --git a/examples/acrobat_2023/valis/serial_rigid.py b/examples/acrobat_2023/valis/serial_rigid.py index f061c5e8..6a03c8f4 100644 --- a/examples/acrobat_2023/valis/serial_rigid.py +++ b/examples/acrobat_2023/valis/serial_rigid.py @@ -385,7 +385,7 @@ class SerialRigidRegistrar(object): image. summary_df : Dataframe - Pandas dataframe containin the registration error of the + Pandas dataframe containing the registration error of the alignment between each image and the previous one in the stack. """ @@ -1345,7 +1345,7 @@ def summarize(self): Returns ------- summary_df: Dataframe - Pandas dataframe containin the registration error of the + Pandas dataframe containing the registration error of the alignment between each image and the previous one in the stack. """ diff --git a/valis/serial_non_rigid.py b/valis/serial_non_rigid.py index e27d9d1d..d5e8498e 100644 --- a/valis/serial_non_rigid.py +++ b/valis/serial_non_rigid.py @@ -1013,7 +1013,7 @@ def summarize(self): Returns ------- summary_df: Dataframe - Pandas dataframe containin the registration error of the + Pandas dataframe containing the registration error of the alignment between each image and the previous one in the stack. """ diff --git a/valis/serial_rigid.py b/valis/serial_rigid.py index 83d5de91..6f67fdc4 100644 --- a/valis/serial_rigid.py +++ b/valis/serial_rigid.py @@ -405,7 +405,7 @@ class SerialRigidRegistrar(object): image. summary_df : Dataframe - Pandas dataframe containin the registration error of the + Pandas dataframe containing the registration error of the alignment between each image and the previous one in the stack. """ @@ -1588,7 +1588,7 @@ def summarize(self): Returns ------- summary_df: Dataframe - Pandas dataframe containin the registration error of the + Pandas dataframe containing the registration error of the alignment between each image and the previous one in the stack. """ From d69d1d16e7bb150afe958d4f6e1be1be66d3aa21 Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Thu, 5 Mar 2026 17:52:44 +0900 Subject: [PATCH 047/152] Fix typo: metatad -> metadata --- valis/slide_io.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/valis/slide_io.py b/valis/slide_io.py index bd9ed10a..e1dc18aa 100644 --- a/valis/slide_io.py +++ b/valis/slide_io.py @@ -822,7 +822,7 @@ def metadata_from_xml(xml, name, server, series=0, metadata=None): def openslide_desc_2_omexml(vips_img): - """Get basic metatad using openslide and convert to ome-xml + """Get basic metadata using openslide and convert to ome-xml """ assert "openslide.vendor" in vips_img.get_fields(), "image does not appear to be openslide metadata" From 7c6535fab2e40adb08c2a11c82de6e64d928bca8 Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Thu, 5 Mar 2026 17:57:22 +0900 Subject: [PATCH 048/152] Fix typo: contstruct -> construct --- examples/acrobat_2023/valis/slide_io.py | 2 +- valis/slide_io.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/acrobat_2023/valis/slide_io.py b/examples/acrobat_2023/valis/slide_io.py index 95df8def..2fef0c62 100644 --- a/examples/acrobat_2023/valis/slide_io.py +++ b/examples/acrobat_2023/valis/slide_io.py @@ -927,7 +927,7 @@ def slide2vips(self, level, series=None, xywh=None, tile_wh=None, *args, **kwarg the region to be sliced. tile_wh : int, optional - Size of tiles used to contstruct `vips_slide` + Size of tiles used to construct `vips_slide` Returns ------- diff --git a/valis/slide_io.py b/valis/slide_io.py index e1dc18aa..0e205c1d 100644 --- a/valis/slide_io.py +++ b/valis/slide_io.py @@ -1280,7 +1280,7 @@ def slide2vips(self, level, series=None, xywh=None, tile_wh=None, z=0, t=0, *arg the region to be sliced. tile_wh : int, optional - Size of tiles used to contstruct `vips_slide` + Size of tiles used to construct `vips_slide` Returns ------- From ae7dba6eed7330544d84f7ec75fac457fca29b87 Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Thu, 5 Mar 2026 17:58:53 +0900 Subject: [PATCH 049/152] Remove duplicate 'the's --- examples/acrobat_2023/valis/feature_detectors.py | 2 +- examples/acrobat_2023/valis/registration.py | 2 +- examples/acrobat_2023/valis/slide_io.py | 6 +++--- valis/feature_detectors.py | 2 +- valis/registration.py | 2 +- valis/slide_io.py | 6 +++--- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/examples/acrobat_2023/valis/feature_detectors.py b/examples/acrobat_2023/valis/feature_detectors.py index 45ab9c2f..71c66ea1 100644 --- a/examples/acrobat_2023/valis/feature_detectors.py +++ b/examples/acrobat_2023/valis/feature_detectors.py @@ -43,7 +43,7 @@ def filter_features(kp, desc, n_keep=MAX_FEATURES): Returns ------- - Keypoints and and corresponding descriptors that the the n_keep highest + Keypoints and and corresponding descriptors that the n_keep highest responses. """ diff --git a/examples/acrobat_2023/valis/registration.py b/examples/acrobat_2023/valis/registration.py index 0a865382..671d31ae 100644 --- a/examples/acrobat_2023/valis/registration.py +++ b/examples/acrobat_2023/valis/registration.py @@ -4495,7 +4495,7 @@ def warp_and_merge_slides(self, dst_f=None, level=0, non_rigid=True, channel_name_dict : dict of lists, optional. key = slide file name, value = list of channel names for that slide. If None, - the the channel names found in each slide will be used. + the channel names found in each slide will be used. src_f_list : list of str, optional List of paths to slide to be warped. If None (the default), Valis.original_img_list diff --git a/examples/acrobat_2023/valis/slide_io.py b/examples/acrobat_2023/valis/slide_io.py index 2fef0c62..74130fcd 100644 --- a/examples/acrobat_2023/valis/slide_io.py +++ b/examples/acrobat_2023/valis/slide_io.py @@ -835,7 +835,7 @@ def __init__(self, src_f, series=None, *args, **kwargs): Path to slide series : int - The series to be read. If `series` is None, the the `series` + The series to be read. If `series` is None, the `series` will be set to the series associated with the largest image. """ @@ -1899,7 +1899,7 @@ def __init__(self, src_f, series=None, *args, **kwargs): Path to slide series : int - The series to be read. If `series` is None, the the `series` + The series to be read. If `series` is None, the `series` will be set to the series associated with the largest image. """ @@ -2302,7 +2302,7 @@ def get_slide_reader(src_f, series=None): Path to slide series : int, optional - The series to be read. If `series` is None, the the `series` + The series to be read. If `series` is None, the `series` will be set to the series associated with the largest image. In cases where there is only 1 image in the file, `series` will be 0. diff --git a/valis/feature_detectors.py b/valis/feature_detectors.py index c7492694..e4aded4f 100644 --- a/valis/feature_detectors.py +++ b/valis/feature_detectors.py @@ -49,7 +49,7 @@ def filter_features(kp, desc, n_keep=MAX_FEATURES): Returns ------- - Keypoints and and corresponding descriptors that the the n_keep highest + Keypoints and and corresponding descriptors that the n_keep highest responses. """ diff --git a/valis/registration.py b/valis/registration.py index 2ceae4eb..330c954e 100644 --- a/valis/registration.py +++ b/valis/registration.py @@ -5234,7 +5234,7 @@ def warp_and_merge_slides(self, dst_f=None, level=0, non_rigid=True, channel_name_dict : dict of lists, optional. key = slide file name, value = list of channel names for that slide. If None, - the the channel names found in each slide will be used. + the channel names found in each slide will be used. src_f_list : list of str, optional List of paths to slide to be warped. If None (the default), Valis.original_img_list diff --git a/valis/slide_io.py b/valis/slide_io.py index 0e205c1d..d3b993b9 100644 --- a/valis/slide_io.py +++ b/valis/slide_io.py @@ -1187,7 +1187,7 @@ def __init__(self, src_f, series=None, *args, **kwargs): Path to slide series : int - The series to be read. If `series` is None, the the `series` + The series to be read. If `series` is None, the `series` will be set to the series associated with the largest image. """ @@ -2414,7 +2414,7 @@ def __init__(self, src_f, series=None, *args, **kwargs): Path to slide series : int - The series to be read. If `series` is None, the the `series` + The series to be read. If `series` is None, the `series` will be set to the series associated with the largest image. """ @@ -2883,7 +2883,7 @@ def get_slide_reader(src_f, series=None): Path to slide series : int, optional - The series to be read. If `series` is None, the the `series` + The series to be read. If `series` is None, the `series` will be set to the series associated with the largest image. In cases where there is only 1 image in the file, `series` will be 0. From e98d05519527f27a4f72ad3a5643a26abb7a1dd8 Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Thu, 5 Mar 2026 17:59:39 +0900 Subject: [PATCH 050/152] Fill in docstring title --- valis/slide_io.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/valis/slide_io.py b/valis/slide_io.py index d3b993b9..974c5877 100644 --- a/valis/slide_io.py +++ b/valis/slide_io.py @@ -2465,7 +2465,7 @@ def _get_series(self): doc="Slide scene") def _read_whole_img(self, level=0, xywh=None, *args, **kwargs): - """ + """Read whole image Return ------ From 2e9425a63ad39f6bda22eb6c2416bfe64fbfd915 Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Thu, 5 Mar 2026 18:00:02 +0900 Subject: [PATCH 051/152] Remove spaces --- valis/slide_io.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/valis/slide_io.py b/valis/slide_io.py index 974c5877..01b4ec26 100644 --- a/valis/slide_io.py +++ b/valis/slide_io.py @@ -2573,7 +2573,7 @@ def slide2image(self, level, xywh=None, *args, **kwargs): return np_img def create_metadata(self): - """ Create and fill in a MetaData object + """Create and fill in a MetaData object Returns ------- From 4fadcac11bde7adecc59ef2a0e3186049f039910 Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Thu, 5 Mar 2026 18:01:24 +0900 Subject: [PATCH 052/152] Fill empty docstrings --- examples/acrobat_2023/valis/affine_optimizer.py | 2 +- examples/acrobat_2023/valis/slide_io.py | 2 +- valis/affine_optimizer.py | 2 +- valis/slide_io.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/acrobat_2023/valis/affine_optimizer.py b/examples/acrobat_2023/valis/affine_optimizer.py index 9efee1a6..3ad4420c 100644 --- a/examples/acrobat_2023/valis/affine_optimizer.py +++ b/examples/acrobat_2023/valis/affine_optimizer.py @@ -1098,7 +1098,7 @@ def calc_cost(self, p): return self.cost_fxn(fixed_intensities, moving_intensities, self.pyramid_mask[self.current_level]) def cost_fxn(self, fixed_intensities, transformed_intensities, mask): - """ + """Cost function """ results, _, _ = np.histogram2d(fixed_intensities, transformed_intensities, bins=self.nbins) n = np.sum(results) diff --git a/examples/acrobat_2023/valis/slide_io.py b/examples/acrobat_2023/valis/slide_io.py index 74130fcd..2770970b 100644 --- a/examples/acrobat_2023/valis/slide_io.py +++ b/examples/acrobat_2023/valis/slide_io.py @@ -2261,7 +2261,7 @@ def slide2image(self, xywh=None, *args, **kwargs): return img def _get_slide_dimensions(self, pil_img, *args, **kwargs): - """ + """Get slide dimensions """ img_dims = np.array([[pil_img.width, pil_img.height]]) diff --git a/valis/affine_optimizer.py b/valis/affine_optimizer.py index 803c5a53..ccbc0188 100644 --- a/valis/affine_optimizer.py +++ b/valis/affine_optimizer.py @@ -1084,7 +1084,7 @@ def calc_cost(self, p): return self.cost_fxn(fixed_intensities, moving_intensities, self.pyramid_mask[self.current_level]) def cost_fxn(self, fixed_intensities, transformed_intensities, mask): - """ + """Cost function """ results, _, _ = np.histogram2d(fixed_intensities, transformed_intensities, bins=self.nbins) n = np.sum(results) diff --git a/valis/slide_io.py b/valis/slide_io.py index 01b4ec26..563f3c2e 100644 --- a/valis/slide_io.py +++ b/valis/slide_io.py @@ -2844,7 +2844,7 @@ def slide2image(self, xywh=None, *args, **kwargs): return img def _get_slide_dimensions(self, pil_img, *args, **kwargs): - """ + """Get slide dimensions """ img_dims = np.array([[pil_img.width, pil_img.height]]) From 3e3f70a93f11ae7e43247d00870e5b6027c113a5 Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Thu, 5 Mar 2026 18:02:48 +0900 Subject: [PATCH 053/152] Remove duplicate 'and's --- examples/acrobat_2023/valis/preprocessing.py | 2 +- valis/preprocessing.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/acrobat_2023/valis/preprocessing.py b/examples/acrobat_2023/valis/preprocessing.py index e734d5b0..ae2dc184 100644 --- a/examples/acrobat_2023/valis/preprocessing.py +++ b/examples/acrobat_2023/valis/preprocessing.py @@ -30,7 +30,7 @@ class ImageProcesser(object): `ImageProcesser` must also have a `process_image` method, which is called during registration. As `ImageProcesser` has the image and - and its relevant information (filename, level, series) as attributes, + its relevant information (filename, level, series) as attributes, it should be able to access and modify the image as needed. However, one can also pass extra args and kwargs to `process_image`. As such, `process_image` will also need to accept args and kwargs. diff --git a/valis/preprocessing.py b/valis/preprocessing.py index 00ad13c9..dee94f12 100644 --- a/valis/preprocessing.py +++ b/valis/preprocessing.py @@ -43,7 +43,7 @@ class ImageProcesser(object): `ImageProcesser` must also have a `process_image` method, which is called during registration. As `ImageProcesser` has the image and - and its relevant information (filename, level, series) as attributes, + its relevant information (filename, level, series) as attributes, it should be able to access and modify the image as needed. However, one can also pass extra args and kwargs to `process_image`. As such, `process_image` will also need to accept args and kwargs. From 2db26a16a25ec53c3a62b684f0d385c03eb43532 Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Thu, 5 Mar 2026 18:03:21 +0900 Subject: [PATCH 054/152] Fix typo: backroung -> background --- valis/preprocessing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/valis/preprocessing.py b/valis/preprocessing.py index dee94f12..615f4d11 100644 --- a/valis/preprocessing.py +++ b/valis/preprocessing.py @@ -257,7 +257,7 @@ def create_mask(self): def process_image(self, cspace="JzAzBz", method="similarity", adaptive_eq=False, return_unmixed=False, *args, **kwargs): """ - Process image by enhance stained pixels and subtracting backroung pixels + Process image by enhance stained pixels and subtracting background pixels Parameters ---------- From 12ab40cee61d2f28aec3a5d76b6fd2514e7f89db Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Thu, 5 Mar 2026 18:04:27 +0900 Subject: [PATCH 055/152] Fix typo: appearence -> appearance --- examples/acrobat_2023/valis/preprocessing.py | 4 ++-- valis/preprocessing.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/acrobat_2023/valis/preprocessing.py b/examples/acrobat_2023/valis/preprocessing.py index ae2dc184..79f91669 100644 --- a/examples/acrobat_2023/valis/preprocessing.py +++ b/examples/acrobat_2023/valis/preprocessing.py @@ -331,7 +331,7 @@ def process_image(self, *args, **kwaargs): class HEDeconvolution(ImageProcesser): - """Normalize staining appearence of hematoxylin and eosin (H&E) stained image + """Normalize staining appearance of hematoxylin and eosin (H&E) stained image and get the H or E deconvolution image. Reference @@ -493,7 +493,7 @@ def calc_background_color_dist(img, brightness_q=0.99, mask=None): def normalize_he(img: np.array, Io: int = 240, alpha: int = 1, beta: int = 0.15): - """ Normalize staining appearence of H&E stained images. + """ Normalize staining appearance of H&E stained images. Parameters ---------- diff --git a/valis/preprocessing.py b/valis/preprocessing.py index 615f4d11..6344798d 100644 --- a/valis/preprocessing.py +++ b/valis/preprocessing.py @@ -506,7 +506,7 @@ def process_image(self, *args, **kwaargs): class HEDeconvolution(ImageProcesser): - """Normalize staining appearence of hematoxylin and eosin (H&E) stained image + """Normalize staining appearance of hematoxylin and eosin (H&E) stained image and get the H or E deconvolution image. Reference @@ -732,7 +732,7 @@ def calc_background_color_dist(img, brightness_q=0.99, mask=None, cspace="CAM16U def normalize_he(img: np.array, Io: int = 240, alpha: int = 1, beta: int = 0.15): - """ Normalize staining appearence of H&E stained images. + """ Normalize staining appearance of H&E stained images. Parameters ---------- From 81ce3285ec4ccd56fab4c4ec3d360552cbe3aa7c Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Thu, 5 Mar 2026 18:04:54 +0900 Subject: [PATCH 056/152] Fix typo: coverted -> converted --- examples/acrobat_2023/valis/preprocessing.py | 2 +- valis/preprocessing.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/acrobat_2023/valis/preprocessing.py b/examples/acrobat_2023/valis/preprocessing.py index 79f91669..14ed7f67 100644 --- a/examples/acrobat_2023/valis/preprocessing.py +++ b/examples/acrobat_2023/valis/preprocessing.py @@ -389,7 +389,7 @@ def standardize_colorfulness(img, c=DEFAULT_COLOR_STD_C, h=0): """Give image constant colorfulness and hue Image is converted to cylindrical CAM-16UCS assigned a constant - hue and colorfulness, and then coverted back to RGB. + hue and colorfulness, and then converted back to RGB. Parameters ---------- diff --git a/valis/preprocessing.py b/valis/preprocessing.py index 6344798d..68fc38a1 100644 --- a/valis/preprocessing.py +++ b/valis/preprocessing.py @@ -628,7 +628,7 @@ def standardize_colorfulness(img, c=DEFAULT_COLOR_STD_C, h=0): """Give image constant colorfulness and hue Image is converted to cylindrical CAM-16UCS assigned a constant - hue and colorfulness, and then coverted back to RGB. + hue and colorfulness, and then converted back to RGB. Parameters ---------- From 78d44ae1918dafdb5f98d659c1ce816090c24d0e Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Thu, 5 Mar 2026 18:06:43 +0900 Subject: [PATCH 057/152] Fix typo: interesct -> intersect --- examples/acrobat_2023/valis/preprocessing.py | 2 +- valis/preprocessing.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/acrobat_2023/valis/preprocessing.py b/examples/acrobat_2023/valis/preprocessing.py index 14ed7f67..a2f33eb7 100644 --- a/examples/acrobat_2023/valis/preprocessing.py +++ b/examples/acrobat_2023/valis/preprocessing.py @@ -719,7 +719,7 @@ def combine_masks(mask1, mask2, op="or"): def remove_small_obj_and_lines_by_dist(mask): """ Will remove smaller objects and thin lines that - do not interesct with larger objects + do not intersect with larger objects """ dist_transform = cv2.distanceTransform(mask, cv2.DIST_L2, 5) diff --git a/valis/preprocessing.py b/valis/preprocessing.py index 68fc38a1..08567cf7 100644 --- a/valis/preprocessing.py +++ b/valis/preprocessing.py @@ -1340,7 +1340,7 @@ def polygon_tortuosity(img, window_size=3): def remove_small_obj_and_lines_by_dist(mask): """ Will remove smaller objects and thin lines that - do not interesct with larger objects + do not intersect with larger objects """ dist_transform = cv2.distanceTransform(mask, cv2.DIST_L2, 5) From 9db6652c4f1afc18bce14df6a30e2fffd71e1526 Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Thu, 5 Mar 2026 18:07:19 +0900 Subject: [PATCH 058/152] Fix typo: backaground -> background --- examples/acrobat_2023/valis/preprocessing.py | 2 +- valis/preprocessing.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/acrobat_2023/valis/preprocessing.py b/examples/acrobat_2023/valis/preprocessing.py index a2f33eb7..37aa1509 100644 --- a/examples/acrobat_2023/valis/preprocessing.py +++ b/examples/acrobat_2023/valis/preprocessing.py @@ -803,7 +803,7 @@ def create_tissue_mask_from_rgb(img, brightness_q=0.99, kernel_size=3, gray_thre no_h_lines = morphology.opening(cam_d, horiz_knl) cam_d_no_lines = np.dstack([no_v_lines, no_h_lines]).min(axis=2) - # Foreground is where color is different than backaground color + # Foreground is where color is different than background color cam_d_t, _ = filters.threshold_multiotsu(cam_d_no_lines[grey_mask == 0]) tissue_mask = np.zeros(cam_d_no_lines.shape, dtype=np.uint8) tissue_mask[cam_d_no_lines >= cam_d_t] = 255 diff --git a/valis/preprocessing.py b/valis/preprocessing.py index 08567cf7..72c46a34 100644 --- a/valis/preprocessing.py +++ b/valis/preprocessing.py @@ -1424,7 +1424,7 @@ def create_tissue_mask_from_rgb(img, brightness_q=0.99, kernel_size=3, gray_thre no_h_lines = morphology.opening(cam_d, horiz_knl) cam_d_no_lines = np.dstack([no_v_lines, no_h_lines]).min(axis=2) - # Foreground is where color is different than backaground color + # Foreground is where color is different than background color cam_d_t, _ = filters.threshold_multiotsu(cam_d_no_lines[grey_mask == 0]) tissue_mask = np.zeros(cam_d_no_lines.shape, dtype=np.uint8) tissue_mask[cam_d_no_lines >= cam_d_t] = 255 From dffd61bd7cb031268b702ca06d01cc11e0cbc65d Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Thu, 5 Mar 2026 18:08:40 +0900 Subject: [PATCH 059/152] Fix typo: vertial -> vertical --- examples/acrobat_2023/valis/preprocessing.py | 2 +- valis/preprocessing.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/acrobat_2023/valis/preprocessing.py b/examples/acrobat_2023/valis/preprocessing.py index 37aa1509..1de3ee54 100644 --- a/examples/acrobat_2023/valis/preprocessing.py +++ b/examples/acrobat_2023/valis/preprocessing.py @@ -795,7 +795,7 @@ def create_tissue_mask_from_rgb(img, brightness_q=0.99, kernel_size=3, gray_thre cam_d, cam = calc_background_color_dist(img, brightness_q=brightness_q, mask=color_mask) - # Reduce intensity of thick horizontal and vertial lines, usually artifacts like edges, streaks, folds, etc... + # Reduce intensity of thick horizontal and vertical lines, usually artifacts like edges, streaks, folds, etc... vert_knl = np.ones((1, 5)) no_v_lines = morphology.opening(cam_d, vert_knl) diff --git a/valis/preprocessing.py b/valis/preprocessing.py index 72c46a34..5c07aa8f 100644 --- a/valis/preprocessing.py +++ b/valis/preprocessing.py @@ -1416,7 +1416,7 @@ def create_tissue_mask_from_rgb(img, brightness_q=0.99, kernel_size=3, gray_thre cam_d, cam = calc_background_color_dist(img, brightness_q=brightness_q, mask=color_mask) - # Reduce intensity of thick horizontal and vertial lines, usually artifacts like edges, streaks, folds, etc... + # Reduce intensity of thick horizontal and vertical lines, usually artifacts like edges, streaks, folds, etc... vert_knl = np.ones((1, 5)) no_v_lines = morphology.opening(cam_d, vert_knl) From 301bf3fc781c0e77a4cea96c4c8f58e7b65dbfdf Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Thu, 5 Mar 2026 18:09:04 +0900 Subject: [PATCH 060/152] Fix typo: Cacluate -> Calculate --- examples/acrobat_2023/valis/non_rigid_registrars.py | 4 ++-- valis/non_rigid_registrars.py | 4 ++-- valis/preprocessing.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/acrobat_2023/valis/non_rigid_registrars.py b/examples/acrobat_2023/valis/non_rigid_registrars.py index 68ed66ff..34d59259 100644 --- a/examples/acrobat_2023/valis/non_rigid_registrars.py +++ b/examples/acrobat_2023/valis/non_rigid_registrars.py @@ -128,7 +128,7 @@ def apply_mask(self, mask): return masked_moving, masked_fixed def calc(self, moving_img, fixed_img, mask, *args, **kwargs): - """Cacluate displacement fields + """Calculate displacement fields Can record subclass specific atrributes here too @@ -1354,7 +1354,7 @@ def reg_tile(self, tile_idx, lock): self.pbar.update(1) def calc(self, *args, **kwargs): - """Cacluate displacement fields + """Calculate displacement fields Each tile is registered and then stitched together """ diff --git a/valis/non_rigid_registrars.py b/valis/non_rigid_registrars.py index 188bb985..bf2c656e 100644 --- a/valis/non_rigid_registrars.py +++ b/valis/non_rigid_registrars.py @@ -145,7 +145,7 @@ def apply_mask(self, mask): return masked_moving, masked_fixed def calc(self, moving_img, fixed_img, mask, *args, **kwargs): - """Cacluate displacement fields + """Calculate displacement fields Can record subclass specific atrributes here too @@ -1466,7 +1466,7 @@ def reg_tile(self, tile_idx, lock): self.fwd_dxdy_tiles[tile_idx] = vips_tile_fwd_dxdy def calc(self, *args, **kwargs): - """Cacluate displacement fields + """Calculate displacement fields Each tile is registered and then stitched together """ diff --git a/valis/preprocessing.py b/valis/preprocessing.py index 5c07aa8f..663b8663 100644 --- a/valis/preprocessing.py +++ b/valis/preprocessing.py @@ -1437,7 +1437,7 @@ def create_tissue_mask_from_rgb(img, brightness_q=0.99, kernel_size=3, gray_thre def jc_dist(img, cspace="IHLS", p=99, metric="euclidean"): """ - Cacluate distance between backround and each pixel + Calculate distance between backround and each pixel using a luminosity and colofulness/saturation in a polar colorspace Parameters From 0036bf223d31f41155bda13b4ec669d8cf9536f3 Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Thu, 5 Mar 2026 18:09:22 +0900 Subject: [PATCH 061/152] Fix typo: backround -> background --- examples/acrobat_2023/valis/warp_tools.py | 4 ++-- valis/preprocessing.py | 6 +++--- valis/warp_tools.py | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/examples/acrobat_2023/valis/warp_tools.py b/examples/acrobat_2023/valis/warp_tools.py index aa5c3f1b..8006c914 100644 --- a/examples/acrobat_2023/valis/warp_tools.py +++ b/examples/acrobat_2023/valis/warp_tools.py @@ -1076,7 +1076,7 @@ def warp_img(img, M=None, bk_dxdy=None, out_shape_rc=None, warp_index = (index[0] + warp_dxdy[0]).bandjoin(index[1] + warp_dxdy[1]) try: - #Option to set backround color in mapim added in libvips 8.13 + #Option to set background color in mapim added in libvips 8.13 warped = affine_warped.mapim(warp_index, premultiplied=True, background=bg_color, @@ -1206,7 +1206,7 @@ def warp_img_inv(img, M=None, fwd_dxdy=None, transformation_src_shape_rc=None, t warp_index = (index[0] + warp_dxdy[0]).bandjoin(index[1] + warp_dxdy[1]) try: - #Option to set backround color in mapim added in libvips 8.13 + #Option to set background color in mapim added in libvips 8.13 nr_warped = img.mapim(warp_index, premultiplied=True, background=bg_color, diff --git a/valis/preprocessing.py b/valis/preprocessing.py index 663b8663..9e039bd7 100644 --- a/valis/preprocessing.py +++ b/valis/preprocessing.py @@ -1437,7 +1437,7 @@ def create_tissue_mask_from_rgb(img, brightness_q=0.99, kernel_size=3, gray_thre def jc_dist(img, cspace="IHLS", p=99, metric="euclidean"): """ - Calculate distance between backround and each pixel + Calculate distance between background and each pixel using a luminosity and colofulness/saturation in a polar colorspace Parameters @@ -1459,7 +1459,7 @@ def jc_dist(img, cspace="IHLS", p=99, metric="euclidean"): Returns ------- jc_dist : np.ndarray - Color distance between backround and each pixel + Color distance between background and each pixel """ @@ -1666,7 +1666,7 @@ def remove_regular_shapes(mask, irreg_thresh=0.05): def entropy_mask(img, cspace="Hunter LAB", irreg_thresh=0.0, rel_min_size=0.2): - # Detect and mask out backround (brightest and least colorful) + # Detect and mask out background (brightest and least colorful) mean_rgb, color_mask, filtered_label_counts, color_clusterer = find_dominant_colors(img, cspace=cspace, return_xy_clusterer=True) to_cluster_jab = rgb2jab(img, cspace=cspace) xy = to_cluster_jab[..., 1:].reshape((-1, 2)) diff --git a/valis/warp_tools.py b/valis/warp_tools.py index 2d9aa3e1..f444a5fa 100644 --- a/valis/warp_tools.py +++ b/valis/warp_tools.py @@ -1206,7 +1206,7 @@ def warp_img(img, M=None, bk_dxdy=None, out_shape_rc=None, warp_index = (index[0] + warp_dxdy[0]).bandjoin(index[1] + warp_dxdy[1]) try: - #Option to set backround color in mapim added in libvips 8.13 + #Option to set background color in mapim added in libvips 8.13 warped = affine_warped.mapim(warp_index, premultiplied=True, background=bg_color, @@ -1336,7 +1336,7 @@ def warp_img_inv(img, M=None, fwd_dxdy=None, transformation_src_shape_rc=None, t warp_index = (index[0] + warp_dxdy[0]).bandjoin(index[1] + warp_dxdy[1]) try: - # Option to set backround color in mapim added in libvips 8.13 + # Option to set background color in mapim added in libvips 8.13 nr_warped = img.mapim(warp_index, premultiplied=True, background=bg_color, From 3d77ebf12a19335211f806db6ff3508f291c4fbb Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Thu, 5 Mar 2026 18:09:39 +0900 Subject: [PATCH 062/152] Fix typo: greather -> greater --- valis/preprocessing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/valis/preprocessing.py b/valis/preprocessing.py index 9e039bd7..ec83c0e7 100644 --- a/valis/preprocessing.py +++ b/valis/preprocessing.py @@ -1450,7 +1450,7 @@ def jc_dist(img, cspace="IHLS", p=99, metric="euclidean"): p: int Percentile used to determine background values, i.e. - background pixels have a luminosity greather 99% of other + background pixels have a luminosity greater 99% of other pixels. Needs to be between 0-100 metric: str From 763959254558b78941296ea0892aca477fdc43e8 Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Thu, 5 Mar 2026 18:10:04 +0900 Subject: [PATCH 063/152] Fix typo: relativey -> relatively --- valis/preprocessing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/valis/preprocessing.py b/valis/preprocessing.py index ec83c0e7..8515dcdd 100644 --- a/valis/preprocessing.py +++ b/valis/preprocessing.py @@ -1529,7 +1529,7 @@ def create_tissue_mask_with_jc_dist(img): def clean_mask(mask, img=None, rel_min_size=0.001): """ - Remove small objects, regions that are not very colorful (relativey) + Remove small objects, regions that are not very colorful (relatively) """ fg_labeled = measure.label(mask) From d533518480c8d5a2d361a9a6acbd6faf648364cb Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Thu, 5 Mar 2026 18:10:44 +0900 Subject: [PATCH 064/152] Fix typo: Touchng -> Touching --- valis/preprocessing.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/valis/preprocessing.py b/valis/preprocessing.py index 8515dcdd..32833cc6 100644 --- a/valis/preprocessing.py +++ b/valis/preprocessing.py @@ -1559,11 +1559,11 @@ def clean_mask(mask, img=None, rel_min_size=0.001): if c0 == 0: tb = np.where(r.image_filled[:, 0])[0] - # Touchng left border + # Touching left border r_filled_img[min(tb):max(tb), 0] = 255 if c1 == mask.shape[1]: - # Touchng right border + # Touching right border tb = np.where(r.image_filled[:, -1])[0] r_filled_img[min(tb):max(tb), -1] = 255 From 5a16a14fde992964171480575ed133a22c409e38 Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Thu, 5 Mar 2026 18:38:21 +0900 Subject: [PATCH 065/152] Fix typo: exluded -> excluded --- valis/preprocessing.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/valis/preprocessing.py b/valis/preprocessing.py index 32833cc6..7251361c 100644 --- a/valis/preprocessing.py +++ b/valis/preprocessing.py @@ -1712,7 +1712,7 @@ def separate_colors(img, cspace="JzAzBz", min_colorfulness=0.005, px_thresh=0.00 Colorspace to use to detect and separate colors using `separate_colors` min_colorfulness : str - Pixels with colorfulness/saturation less that this will be exluded. + Pixels with colorfulness/saturation less that this will be excluded. Calculated after binning colors. px_thresh: float @@ -1905,7 +1905,7 @@ def find_dominant_colors(img, cspace="JzAzBz", min_colorfulness=0, px_thresh=0.0 Colorspace to use to detect and separate colors using `separate_colors` min_colorfulness : str - Pixels with colorfulness/saturation less that this will be exluded. + Pixels with colorfulness/saturation less that this will be excluded. Calculated after binning colors. px_thresh: float From ff0ebbdd8c332f53836bdc662e05123c1d380172 Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Thu, 5 Mar 2026 23:50:13 +0900 Subject: [PATCH 066/152] Insert 'to' between 'able' and 'warp' --- examples/acrobat_2023/valis/registration.py | 2 +- valis/registration.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/acrobat_2023/valis/registration.py b/examples/acrobat_2023/valis/registration.py index 671d31ae..07fe1045 100644 --- a/examples/acrobat_2023/valis/registration.py +++ b/examples/acrobat_2023/valis/registration.py @@ -149,7 +149,7 @@ class Slide(object): `Slide` is a class that stores registration parameters and other metadata about a slide. Once registration has been - completed, `Slide` is also able warp the slide and/or points + completed, `Slide` is also able to warp the slide and/or points using the same registration parameters. Warped slides can be saved as ome.tiff images with valid ome-xml. diff --git a/valis/registration.py b/valis/registration.py index 330c954e..387b90c1 100644 --- a/valis/registration.py +++ b/valis/registration.py @@ -183,7 +183,7 @@ class Slide(object): `Slide` is a class that stores registration parameters and other metadata about a slide. Once registration has been - completed, `Slide` is also able warp the slide and/or points + completed, `Slide` is also able to warp the slide and/or points using the same registration parameters. Warped slides can be saved as ome.tiff images with valid ome-xml. From 4a3ffbbc2da7f6f55948b07932f4c66aade9632c Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Thu, 5 Mar 2026 23:51:24 +0900 Subject: [PATCH 067/152] Fix typo: keyward -> keyword --- .../acrobat_2023/valis/non_rigid_registrars.py | 2 +- examples/acrobat_2023/valis/registration.py | 16 ++++++++-------- valis/micro_rigid_registrar.py | 4 ++-- valis/non_rigid_registrars.py | 2 +- valis/registration.py | 16 ++++++++-------- 5 files changed, 20 insertions(+), 20 deletions(-) diff --git a/examples/acrobat_2023/valis/non_rigid_registrars.py b/examples/acrobat_2023/valis/non_rigid_registrars.py index 34d59259..9627d9e5 100644 --- a/examples/acrobat_2023/valis/non_rigid_registrars.py +++ b/examples/acrobat_2023/valis/non_rigid_registrars.py @@ -1401,7 +1401,7 @@ def register(self, moving_img, fixed_img, mask=None, non_rigid_registrar_cls=Opt preprocessing.ImageProcesser used to process the images processing_kwargs : dict - Dictionary of keyward arguments to be passed to `processing_cls` + Dictionary of keyword arguments to be passed to `processing_cls` target_stats : ndarray Target stats used to normalize each tile after being processed. diff --git a/examples/acrobat_2023/valis/registration.py b/examples/acrobat_2023/valis/registration.py index 07fe1045..5a09ca24 100644 --- a/examples/acrobat_2023/valis/registration.py +++ b/examples/acrobat_2023/valis/registration.py @@ -1514,7 +1514,7 @@ class Valis(object): SerialRigidRegistrar object that performs the rigid registration. rigid_reg_kwargs : dict - Dictionary of keyward arguments passed to + Dictionary of keyword arguments passed to `serial_rigid.register_images`. feature_descriptor_str : str @@ -1537,7 +1537,7 @@ class Valis(object): non-rigid registration. non_rigid_reg_kwargs : dict - Dictionary of keyward arguments passed to + Dictionary of keyword arguments passed to `serial_non_rigid.register_images`. non_rigid_registrar_cls : NonRigidRegistrar @@ -2425,14 +2425,14 @@ def create_img_processor_dict(self, brightfield_processing_cls=DEFAULT_BRIGHTFIE Should return a single channel uint8 image. brightfield_processing_kwargs : dict - Dictionary of keyward arguments to be passed to `brightfield_processing_cls` + Dictionary of keyword arguments to be passed to `brightfield_processing_cls` if_processing_cls : ImageProcesser ImageProcesser to pre-process immunofluorescent images to make them look as similar as possible. Should return a single channel uint8 image. if_processing_kwargs : dict - Dictionary of keyward arguments to be passed to `if_processing_cls` + Dictionary of keyword arguments to be passed to `if_processing_cls` processor_dict : dict Each key should be the filename of the image, and the value either a subclassed @@ -3959,14 +3959,14 @@ def register(self, brightfield_processing_cls=DEFAULT_BRIGHTFIELD_CLASS, them look as similar as possible. brightfield_processing_kwargs : dict - Dictionary of keyward arguments to be passed to `brightfield_processing_cls` + Dictionary of keyword arguments to be passed to `brightfield_processing_cls` if_processing_cls : preprocessing.ImageProcesser preprocessing.ImageProcesser used to pre-process immunofluorescent images to make them look as similar as possible. if_processing_kwargs : dict - Dictionary of keyward arguments to be passed to `if_processing_cls` + Dictionary of keyword arguments to be passed to `if_processing_cls` processor_dict : dict Each key should be the filename of the image, and the value either a subclassed @@ -4134,14 +4134,14 @@ def register_micro(self, brightfield_processing_cls=DEFAULT_BRIGHTFIELD_CLASS, them look as similar as possible. brightfield_processing_kwargs : dict - Dictionary of keyward arguments to be passed to `brightfield_processing_cls` + Dictionary of keyword arguments to be passed to `brightfield_processing_cls` if_processing_cls : preprocessing.ImageProcesser preprocessing.ImageProcesser used to pre-process immunofluorescent images to make them look as similar as possible. if_processing_kwargs : dict - Dictionary of keyward arguments to be passed to `if_processing_cls` + Dictionary of keyword arguments to be passed to `if_processing_cls` max_non_rigid_registration_dim_px : int, optional Maximum width or height of images used for non-rigid registration. diff --git a/valis/micro_rigid_registrar.py b/valis/micro_rigid_registrar.py index 90902278..04ad735e 100644 --- a/valis/micro_rigid_registrar.py +++ b/valis/micro_rigid_registrar.py @@ -174,14 +174,14 @@ def register(self, Should return a single channel uint8 image. brightfield_processing_kwargs : dict - Dictionary of keyward arguments to be passed to `brightfield_processing_cls` + Dictionary of keyword arguments to be passed to `brightfield_processing_cls` if_processing_cls : ImageProcesser ImageProcesser to pre-process immunofluorescent images to make them look as similar as possible. Should return a single channel uint8 image. if_processing_kwargs : dict - Dictionary of keyward arguments to be passed to `if_processing_cls` + Dictionary of keyword arguments to be passed to `if_processing_cls` """ diff --git a/valis/non_rigid_registrars.py b/valis/non_rigid_registrars.py index bf2c656e..cc1e9f9d 100644 --- a/valis/non_rigid_registrars.py +++ b/valis/non_rigid_registrars.py @@ -1516,7 +1516,7 @@ def register(self, moving_img, fixed_img, mask=None, non_rigid_registrar_cls=Opt preprocessing.ImageProcesser used to process the images processing_kwargs : dict - Dictionary of keyward arguments to be passed to `processing_cls` + Dictionary of keyword arguments to be passed to `processing_cls` target_stats : ndarray Target stats used to normalize each tile after being processed. diff --git a/valis/registration.py b/valis/registration.py index 387b90c1..dc5d230d 100644 --- a/valis/registration.py +++ b/valis/registration.py @@ -1627,7 +1627,7 @@ class Valis(object): SerialRigidRegistrar object that performs the rigid registration. rigid_reg_kwargs : dict - Dictionary of keyward arguments passed to + Dictionary of keyword arguments passed to `serial_rigid.register_images`. feature_descriptor_str : str @@ -1650,7 +1650,7 @@ class Valis(object): non-rigid registration. non_rigid_reg_kwargs : dict - Dictionary of keyward arguments passed to + Dictionary of keyword arguments passed to `serial_non_rigid.register_images`. non_rigid_registrar_cls : NonRigidRegistrar @@ -2693,14 +2693,14 @@ def create_img_processor_dict(self, brightfield_processing_cls=DEFAULT_BRIGHTFIE Should return a single channel uint8 image. brightfield_processing_kwargs : dict - Dictionary of keyward arguments to be passed to `brightfield_processing_cls` + Dictionary of keyword arguments to be passed to `brightfield_processing_cls` if_processing_cls : ImageProcesser ImageProcesser to pre-process immunofluorescent images to make them look as similar as possible. Should return a single channel uint8 image. if_processing_kwargs : dict - Dictionary of keyward arguments to be passed to `if_processing_cls` + Dictionary of keyword arguments to be passed to `if_processing_cls` processor_dict : dict Each key should be the filename of the image, and the value either a subclassed @@ -4631,14 +4631,14 @@ def register(self, brightfield_processing_cls=DEFAULT_BRIGHTFIELD_CLASS, them look as similar as possible. brightfield_processing_kwargs : dict - Dictionary of keyward arguments to be passed to `brightfield_processing_cls` + Dictionary of keyword arguments to be passed to `brightfield_processing_cls` if_processing_cls : preprocessing.ImageProcesser preprocessing.ImageProcesser used to pre-process immunofluorescent images to make them look as similar as possible. if_processing_kwargs : dict - Dictionary of keyward arguments to be passed to `if_processing_cls` + Dictionary of keyword arguments to be passed to `if_processing_cls` processor_dict : dict, optional Each key should be the filename of the image, and the value either a subclassed @@ -4815,14 +4815,14 @@ def register_micro(self, brightfield_processing_cls=DEFAULT_BRIGHTFIELD_CLASS, them look as similar as possible. brightfield_processing_kwargs : dict - Dictionary of keyward arguments to be passed to `brightfield_processing_cls` + Dictionary of keyword arguments to be passed to `brightfield_processing_cls` if_processing_cls : preprocessing.ImageProcesser preprocessing.ImageProcesser used to pre-process immunofluorescent images to make them look as similar as possible. if_processing_kwargs : dict - Dictionary of keyward arguments to be passed to `if_processing_cls` + Dictionary of keyword arguments to be passed to `if_processing_cls` max_non_rigid_registration_dim_px : int, optional Maximum width or height of images used for non-rigid registration. From 68d5ab8ffb1df10c50dbeaefebb6b687773550d6 Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Thu, 5 Mar 2026 23:52:32 +0900 Subject: [PATCH 068/152] Fix typo: immunofluorescent -> immunofluorescence --- examples/acrobat_2023/valis/registration.py | 6 +++--- valis/micro_rigid_registrar.py | 2 +- valis/registration.py | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/examples/acrobat_2023/valis/registration.py b/examples/acrobat_2023/valis/registration.py index 5a09ca24..66ba39b7 100644 --- a/examples/acrobat_2023/valis/registration.py +++ b/examples/acrobat_2023/valis/registration.py @@ -2428,7 +2428,7 @@ def create_img_processor_dict(self, brightfield_processing_cls=DEFAULT_BRIGHTFIE Dictionary of keyword arguments to be passed to `brightfield_processing_cls` if_processing_cls : ImageProcesser - ImageProcesser to pre-process immunofluorescent images to make them look as similar as possible. + ImageProcesser to pre-process immunofluorescence images to make them look as similar as possible. Should return a single channel uint8 image. if_processing_kwargs : dict @@ -3962,7 +3962,7 @@ def register(self, brightfield_processing_cls=DEFAULT_BRIGHTFIELD_CLASS, Dictionary of keyword arguments to be passed to `brightfield_processing_cls` if_processing_cls : preprocessing.ImageProcesser - preprocessing.ImageProcesser used to pre-process immunofluorescent images + preprocessing.ImageProcesser used to pre-process immunofluorescence images to make them look as similar as possible. if_processing_kwargs : dict @@ -4137,7 +4137,7 @@ def register_micro(self, brightfield_processing_cls=DEFAULT_BRIGHTFIELD_CLASS, Dictionary of keyword arguments to be passed to `brightfield_processing_cls` if_processing_cls : preprocessing.ImageProcesser - preprocessing.ImageProcesser used to pre-process immunofluorescent images + preprocessing.ImageProcesser used to pre-process immunofluorescence images to make them look as similar as possible. if_processing_kwargs : dict diff --git a/valis/micro_rigid_registrar.py b/valis/micro_rigid_registrar.py index 04ad735e..eb16bad5 100644 --- a/valis/micro_rigid_registrar.py +++ b/valis/micro_rigid_registrar.py @@ -177,7 +177,7 @@ def register(self, Dictionary of keyword arguments to be passed to `brightfield_processing_cls` if_processing_cls : ImageProcesser - ImageProcesser to pre-process immunofluorescent images to make them look as similar as possible. + ImageProcesser to pre-process immunofluorescence images to make them look as similar as possible. Should return a single channel uint8 image. if_processing_kwargs : dict diff --git a/valis/registration.py b/valis/registration.py index dc5d230d..e6977c21 100644 --- a/valis/registration.py +++ b/valis/registration.py @@ -2696,7 +2696,7 @@ def create_img_processor_dict(self, brightfield_processing_cls=DEFAULT_BRIGHTFIE Dictionary of keyword arguments to be passed to `brightfield_processing_cls` if_processing_cls : ImageProcesser - ImageProcesser to pre-process immunofluorescent images to make them look as similar as possible. + ImageProcesser to pre-process immunofluorescence images to make them look as similar as possible. Should return a single channel uint8 image. if_processing_kwargs : dict @@ -4634,7 +4634,7 @@ def register(self, brightfield_processing_cls=DEFAULT_BRIGHTFIELD_CLASS, Dictionary of keyword arguments to be passed to `brightfield_processing_cls` if_processing_cls : preprocessing.ImageProcesser - preprocessing.ImageProcesser used to pre-process immunofluorescent images + preprocessing.ImageProcesser used to pre-process immunofluorescence images to make them look as similar as possible. if_processing_kwargs : dict @@ -4818,7 +4818,7 @@ def register_micro(self, brightfield_processing_cls=DEFAULT_BRIGHTFIELD_CLASS, Dictionary of keyword arguments to be passed to `brightfield_processing_cls` if_processing_cls : preprocessing.ImageProcesser - preprocessing.ImageProcesser used to pre-process immunofluorescent images + preprocessing.ImageProcesser used to pre-process immunofluorescence images to make them look as similar as possible. if_processing_kwargs : dict From f44297d3d2d488279d5173a331685bedd6e2f9dc Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Thu, 5 Mar 2026 23:53:28 +0900 Subject: [PATCH 069/152] Fix typo: unpickled -> un-pickled --- examples/acrobat_2023/valis/registration.py | 2 +- examples/register_and_merge_cycif.py | 2 +- examples/register_ihc.py | 2 +- tests/test_examples.py | 2 +- valis/registration.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/acrobat_2023/valis/registration.py b/examples/acrobat_2023/valis/registration.py index 66ba39b7..6658db0d 100644 --- a/examples/acrobat_2023/valis/registration.py +++ b/examples/acrobat_2023/valis/registration.py @@ -3947,7 +3947,7 @@ def register(self, brightfield_processing_cls=DEFAULT_BRIGHTFIELD_CLASS, blending those images. The "data/" directory will contain a pickled copy of this registrar, which can be - later be opened (unpickled) and used to warp slides and/or point data. + later be opened (un-pickled) and used to warp slides and/or point data. "data/" will also contain the `summary_df` saved as a csv file. diff --git a/examples/register_and_merge_cycif.py b/examples/register_and_merge_cycif.py index db56f8ce..381a3558 100644 --- a/examples/register_and_merge_cycif.py +++ b/examples/register_and_merge_cycif.py @@ -11,7 +11,7 @@ dimensions, physical units, etc... * a pickled version of the registrar. This can be reloaded - (unpickled) and used later. For example, one could perform + (un-pickled) and used later. For example, one could perform the registration locally, but then use the pickled object to warp and save the slides on an HPC. Or, one could perform the registration and use the registrar later to warp diff --git a/examples/register_ihc.py b/examples/register_ihc.py index 6b111f3a..e3875861 100644 --- a/examples/register_ihc.py +++ b/examples/register_ihc.py @@ -11,7 +11,7 @@ dimensions, physical units, etc... * a pickled version of the registrar. This can be reloaded - (unpickled) and used later. For example, one could perform + (un-pickled) and used later. For example, one could perform the registration locally, but then use the pickled object to warp and save the slides on an HPC. Or, one could perform the registration and use the registrar later to warp diff --git a/tests/test_examples.py b/tests/test_examples.py index d992ffb7..4abc6352 100644 --- a/tests/test_examples.py +++ b/tests/test_examples.py @@ -11,7 +11,7 @@ dimensions, physical units, etc... * a pickled version of the registrar. This can be reloaded - (unpickled) and used later. For example, one could perform + (un-pickled) and used later. For example, one could perform the registration locally, but then use the pickled object to warp and save the slides on an HPC. Or, one could perform the registration and use the registrar later to warp diff --git a/valis/registration.py b/valis/registration.py index e6977c21..c3c678be 100644 --- a/valis/registration.py +++ b/valis/registration.py @@ -4619,7 +4619,7 @@ def register(self, brightfield_processing_cls=DEFAULT_BRIGHTFIELD_CLASS, blending those images. The "data/" directory will contain a pickled copy of this registrar, which can be - later be opened (unpickled) and used to warp slides and/or point data. + later be opened (un-pickled) and used to warp slides and/or point data. "data/" will also contain the `summary_df` saved as a csv file. From c5e87a7d2af7cf8f6f296cdf7ce1a5226f3c771d Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Thu, 5 Mar 2026 23:55:00 +0900 Subject: [PATCH 070/152] Fix typo: physcial -> physical --- examples/acrobat_2023/valis/registration.py | 4 ++-- valis/registration.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/acrobat_2023/valis/registration.py b/examples/acrobat_2023/valis/registration.py index 6658db0d..4020a833 100644 --- a/examples/acrobat_2023/valis/registration.py +++ b/examples/acrobat_2023/valis/registration.py @@ -3751,7 +3751,7 @@ def measure_error(self): "aligned_shape" is the shape of the registered full resolution slide - "physical_units" are the names of the pixels physcial unit, e.g. u'\u00B5m' + "physical_units" are the names of the pixels physical unit, e.g. u'\u00B5m' "resolution" is the physical unit per pixel @@ -4024,7 +4024,7 @@ def register(self, brightfield_processing_cls=DEFAULT_BRIGHTFIELD_CLASS, "aligned_shape" is the shape of the registered full resolution slide - "physical_units" are the names of the pixels physcial unit, e.g. u'\u00B5m' + "physical_units" are the names of the pixels physical unit, e.g. u'\u00B5m' "resolution" is the physical unit per pixel diff --git a/valis/registration.py b/valis/registration.py index c3c678be..393e2afa 100644 --- a/valis/registration.py +++ b/valis/registration.py @@ -4424,7 +4424,7 @@ def measure_error(self): "aligned_shape" is the shape of the registered full resolution slide - "physical_units" are the names of the pixels physcial unit, e.g. u'\u00B5m' + "physical_units" are the names of the pixels physical unit, e.g. u'\u00B5m' "resolution" is the physical unit per pixel @@ -4702,7 +4702,7 @@ def register(self, brightfield_processing_cls=DEFAULT_BRIGHTFIELD_CLASS, "aligned_shape" is the shape of the registered full resolution slide - "physical_units" are the names of the pixels physcial unit, e.g. u'\u00B5m' + "physical_units" are the names of the pixels physical unit, e.g. u'\u00B5m' "resolution" is the physical unit per pixel From 19efe4ecbba7e72f475e98b419c5c328583d34a6 Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Thu, 5 Mar 2026 23:56:36 +0900 Subject: [PATCH 071/152] Fix typo: matix -> matrix --- examples/acrobat_2023/valis/registration.py | 2 +- examples/acrobat_2023/valis/serial_rigid.py | 2 +- valis/registration.py | 2 +- valis/serial_rigid.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/acrobat_2023/valis/registration.py b/examples/acrobat_2023/valis/registration.py index 4020a833..1e1db232 100644 --- a/examples/acrobat_2023/valis/registration.py +++ b/examples/acrobat_2023/valis/registration.py @@ -1725,7 +1725,7 @@ def __init__(self, src_dir, dst_dir, series=None, name=None, image_type=None, are already in the correct order. If True, then each filename should begin with the number that indicates its position in the z-stack. If False, then the images will be sorted by ordering a feature distance - matix. Default is False. + matrix. Default is False. reference_img_f : str, optional Filename of image that will be treated as the center of the stack. diff --git a/examples/acrobat_2023/valis/serial_rigid.py b/examples/acrobat_2023/valis/serial_rigid.py index 6a03c8f4..683e490a 100644 --- a/examples/acrobat_2023/valis/serial_rigid.py +++ b/examples/acrobat_2023/valis/serial_rigid.py @@ -1460,7 +1460,7 @@ def register_images(img_dir, dst_dir=None, name="registrar", are already in the correct order. If True, then each filename should begin with the number that indicates its position in the z-stack. If False, then the images will be sorted by ordering a feature distance - matix. + matrix. reference_img_f : str, optional Filename of image that will be treated as the center of the stack. diff --git a/valis/registration.py b/valis/registration.py index 393e2afa..de2973dc 100644 --- a/valis/registration.py +++ b/valis/registration.py @@ -1848,7 +1848,7 @@ def __init__(self, src_dir, dst_dir, series=None, name=None, image_type=None, are already in the correct order. If True, then each filename should begin with the number that indicates its position in the z-stack. If False, then the images will be sorted by ordering a feature distance - matix. Default is False. + matrix. Default is False. reference_img_f : str, optional Filename of image that will be treated as the center of the stack. diff --git a/valis/serial_rigid.py b/valis/serial_rigid.py index 6f67fdc4..156c6cb9 100644 --- a/valis/serial_rigid.py +++ b/valis/serial_rigid.py @@ -1703,7 +1703,7 @@ def register_images(img_dir, dst_dir=None, name="registrar", are already in the correct order. If True, then each filename should begin with the number that indicates its position in the z-stack. If False, then the images will be sorted by ordering a feature distance - matix. + matrix. reference_img_f : str, optional Filename of image that will be treated as the center of the stack. From 18f45e2bb64d57984e829a4124e1cab0b2b5aedd Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Thu, 5 Mar 2026 23:58:34 +0900 Subject: [PATCH 072/152] Fix typo: registartion -> registration --- examples/acrobat_2023/valis/registration.py | 4 ++-- examples/acrobat_grand_challenge.py | 2 +- valis/registration.py | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/acrobat_2023/valis/registration.py b/examples/acrobat_2023/valis/registration.py index 1e1db232..d82dc8ed 100644 --- a/examples/acrobat_2023/valis/registration.py +++ b/examples/acrobat_2023/valis/registration.py @@ -1643,7 +1643,7 @@ class Valis(object): View ome.tiff, located at merged_slide_dst_f """ - @valtils.deprecated_args(max_non_rigid_registartion_dim_px="max_non_rigid_registration_dim_px", img_type="image_type") + @valtils.deprecated_args(max_non_rigid_registration_dim_px="max_non_rigid_registration_dim_px", img_type="image_type") def __init__(self, src_dir, dst_dir, series=None, name=None, image_type=None, feature_detector_cls=DEFAULT_FD, transformer_cls=DEFAULT_TRANSFORM_CLASS, @@ -4113,7 +4113,7 @@ def cleanup(self): self.non_rigid_registrar = None - @valtils.deprecated_args(max_non_rigid_registartion_dim_px="max_non_rigid_registration_dim_px") + @valtils.deprecated_args(max_non_rigid_registration_dim_px="max_non_rigid_registration_dim_px") def register_micro(self, brightfield_processing_cls=DEFAULT_BRIGHTFIELD_CLASS, brightfield_processing_kwargs=DEFAULT_BRIGHTFIELD_PROCESSING_ARGS, if_processing_cls=DEFAULT_FLOURESCENCE_CLASS, diff --git a/examples/acrobat_grand_challenge.py b/examples/acrobat_grand_challenge.py index 5692d515..9d908e58 100644 --- a/examples/acrobat_grand_challenge.py +++ b/examples/acrobat_grand_challenge.py @@ -252,7 +252,7 @@ def create_reg_mask(reg, j_range=(0.05, 0.9), c_range=(0.05, 1), h_range=(150, 2 # Perform microregistration within the bounding box of the H&E+ tissue micro_reg_mask = create_reg_mask(registrar) - micro_reg, micro_error = registrar.register_micro(max_non_rigid_registartion_dim_px=micro_reg_size, + micro_reg, micro_error = registrar.register_micro(max_non_rigid_registration_dim_px=micro_reg_size, reference_img_f=he_img_f, align_to_reference=True, mask=micro_reg_mask, diff --git a/valis/registration.py b/valis/registration.py index de2973dc..f7d48428 100644 --- a/valis/registration.py +++ b/valis/registration.py @@ -1759,7 +1759,7 @@ class Valis(object): View ome.tiff, located at merged_slide_dst_f """ - @valtils.deprecated_args(max_non_rigid_registartion_dim_px="max_non_rigid_registration_dim_px", img_type="image_type") + @valtils.deprecated_args(max_non_rigid_registration_dim_px="max_non_rigid_registration_dim_px", img_type="image_type") def __init__(self, src_dir, dst_dir, series=None, name=None, image_type=None, feature_detector_cls=None, transformer_cls=DEFAULT_TRANSFORM_CLASS, @@ -4794,7 +4794,7 @@ def cleanup(self): self.micro_rigid_registrar_cls = None self.non_rigid_registrar = None - @valtils.deprecated_args(max_non_rigid_registartion_dim_px="max_non_rigid_registration_dim_px") + @valtils.deprecated_args(max_non_rigid_registration_dim_px="max_non_rigid_registration_dim_px") def register_micro(self, brightfield_processing_cls=DEFAULT_BRIGHTFIELD_CLASS, brightfield_processing_kwargs=DEFAULT_BRIGHTFIELD_PROCESSING_ARGS, if_processing_cls=DEFAULT_FLOURESCENCE_CLASS, From 61046c457c87462a2b404f08a00368bf9884f5a2 Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Thu, 5 Mar 2026 23:58:50 +0900 Subject: [PATCH 073/152] Fix typo: micro_rigid_registar -> micro_rigid_registrar --- examples/acrobat_2023/valis/registration.py | 4 ++-- valis/registration.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/acrobat_2023/valis/registration.py b/examples/acrobat_2023/valis/registration.py index d82dc8ed..eedd375a 100644 --- a/examples/acrobat_2023/valis/registration.py +++ b/examples/acrobat_2023/valis/registration.py @@ -3075,8 +3075,8 @@ def rigid_register(self): def micro_rigid_register(self): - micro_rigid_registar = self.micro_rigid_registrar_cls(val_obj=self, **self.micro_rigid_registrar_params) - micro_rigid_registar.register() + micro_rigid_registrar = self.micro_rigid_registrar_cls(val_obj=self, **self.micro_rigid_registrar_params) + micro_rigid_registrar.register() rigid_img_list = [slide_obj.warp_img(slide_obj.processed_img, non_rigid=False) for slide_obj in self.slide_dict.values()] self.micro_rigid_overlap_img = self.draw_overlap_img(rigid_img_list) diff --git a/valis/registration.py b/valis/registration.py index f7d48428..abbe9d84 100644 --- a/valis/registration.py +++ b/valis/registration.py @@ -3507,8 +3507,8 @@ def rigid_register(self): return rigid_registrar def micro_rigid_register(self): - micro_rigid_registar = self.micro_rigid_registrar_cls(val_obj=self, **self.micro_rigid_registrar_params) - micro_rigid_registar.register() + micro_rigid_registrar = self.micro_rigid_registrar_cls(val_obj=self, **self.micro_rigid_registrar_params) + micro_rigid_registrar.register() # Not all pairs will have keept high resolution M, so re-estimate M based on final matches slide_idx, slide_names = list(zip(*[[slide_obj.stack_idx, slide_obj.name] for slide_obj in self.slide_dict.values()])) From 5a12c8bf3db0e1d8f7c81f280425f32f7ef54105 Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Fri, 6 Mar 2026 00:00:02 +0900 Subject: [PATCH 074/152] Fix typo: slied -> slide --- examples/acrobat_2023/valis/registration.py | 2 +- valis/registration.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/acrobat_2023/valis/registration.py b/examples/acrobat_2023/valis/registration.py index eedd375a..77d7f26d 100644 --- a/examples/acrobat_2023/valis/registration.py +++ b/examples/acrobat_2023/valis/registration.py @@ -492,7 +492,7 @@ def get_overlap_crop_xywh(self, warped_img_shape_rc, scaled_warped_img_shape_rc= shape of registered image warped_scaled_img_shape_rc : tuple of int, optional - shape of scaled registered image (i.e. registered slied) + shape of scaled registered image (i.e. registered slide) Returns ------- diff --git a/valis/registration.py b/valis/registration.py index abbe9d84..bebe4f69 100644 --- a/valis/registration.py +++ b/valis/registration.py @@ -546,7 +546,7 @@ def get_overlap_crop_xywh(self, warped_img_shape_rc, scaled_warped_img_shape_rc= shape of registered image warped_scaled_img_shape_rc : tuple of int, optional - shape of scaled registered image (i.e. registered slied) + shape of scaled registered image (i.e. registered slide) Returns ------- From 1b79d491fd78f247a612ddea9ff9b6a820b6673e Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Fri, 6 Mar 2026 00:00:46 +0900 Subject: [PATCH 075/152] Fix typo: QT_EMMITER_KEY -> QT_EMITTER_KEY --- examples/acrobat_2023/valis/registration.py | 6 +++--- valis/registration.py | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/acrobat_2023/valis/registration.py b/examples/acrobat_2023/valis/registration.py index 77d7f26d..8f9ebd0a 100644 --- a/examples/acrobat_2023/valis/registration.py +++ b/examples/acrobat_2023/valis/registration.py @@ -77,7 +77,7 @@ NAME_KEY = "name" IMAGES_ORDERD_KEY = "imgs_ordered" REF_IMG_KEY = "reference_img_f" -QT_EMMITER_KEY = "qt_emitter" +QT_EMITTER_KEY = "qt_emitter" TFORM_SRC_SHAPE_KEY = "transformation_src_shape_rc" TFORM_DST_SHAPE_KEY = "transformation_dst_shape_rc" TFORM_MAT_KEY = "M" @@ -2007,7 +2007,7 @@ def _set_rigid_reg_kwargs(self, name, feature_detector, similarity_metric, REF_IMG_KEY: reference_img_f, IMAGES_ORDERD_KEY: imgs_ordered, CHECK_REFLECT_KEY: check_for_reflections, - QT_EMMITER_KEY: qt_emitter + QT_EMITTER_KEY: qt_emitter } # Save methods as strings since some objects cannot be pickled # @@ -2029,7 +2029,7 @@ def _set_non_rigid_reg_kwargs(self, name, non_rigid_reg_class, non_rigid_reg_par NON_RIGID_REG_CLASS_KEY: non_rigid_reg_class, NON_RIGID_REG_PARAMS_KEY: non_rigid_reg_params, REF_IMG_KEY: reference_img_f, - QT_EMMITER_KEY: qt_emitter, + QT_EMITTER_KEY: qt_emitter, NON_RIGID_COMPOSE_KEY: compose_non_rigid } diff --git a/valis/registration.py b/valis/registration.py index bebe4f69..576bcc90 100644 --- a/valis/registration.py +++ b/valis/registration.py @@ -93,7 +93,7 @@ NAME_KEY = "name" IMAGES_ORDERD_KEY = "imgs_ordered" REF_IMG_KEY = "reference_img_f" -QT_EMMITER_KEY = "qt_emitter" +QT_EMITTER_KEY = "qt_emitter" TFORM_SRC_SHAPE_KEY = "transformation_src_shape_rc" TFORM_DST_SHAPE_KEY = "transformation_dst_shape_rc" TFORM_MAT_KEY = "M" @@ -2211,7 +2211,7 @@ def _set_rigid_reg_kwargs(self, name, feature_detector, similarity_metric, REF_IMG_KEY: reference_img_f, IMAGES_ORDERD_KEY: imgs_ordered, CHECK_REFLECT_KEY: check_for_reflections, - QT_EMMITER_KEY: qt_emitter + QT_EMITTER_KEY: qt_emitter } # Save methods as strings since some objects cannot be pickled # @@ -2246,7 +2246,7 @@ def _set_non_rigid_reg_kwargs(self, name, non_rigid_reg_class, non_rigid_reg_par NON_RIGID_REG_CLASS_KEY: nr, NON_RIGID_REG_PARAMS_KEY: non_rigid_reg_params, REF_IMG_KEY: reference_img_f, - QT_EMMITER_KEY: qt_emitter, + QT_EMITTER_KEY: qt_emitter, NON_RIGID_COMPOSE_KEY: compose_non_rigid } From f71f81f44f4571b31298e756df8a159567fe56d7 Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Fri, 6 Mar 2026 00:01:44 +0900 Subject: [PATCH 076/152] Fix typo: FLOURESCENCE -> FLUORESCENCE --- examples/acrobat_2023/valis/registration.py | 16 ++++++++-------- valis/micro_rigid_registrar.py | 6 +++--- valis/registration.py | 16 ++++++++-------- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/examples/acrobat_2023/valis/registration.py b/examples/acrobat_2023/valis/registration.py index 8f9ebd0a..52777687 100644 --- a/examples/acrobat_2023/valis/registration.py +++ b/examples/acrobat_2023/valis/registration.py @@ -49,8 +49,8 @@ # Default image processing # DEFAULT_BRIGHTFIELD_CLASS = preprocessing.ColorfulStandardizer DEFAULT_BRIGHTFIELD_PROCESSING_ARGS = {'c': preprocessing.DEFAULT_COLOR_STD_C, "h": 0} -DEFAULT_FLOURESCENCE_CLASS = preprocessing.ChannelGetter -DEFAULT_FLOURESCENCE_PROCESSING_ARGS = {"channel": "dapi", "adaptive_eq": True} +DEFAULT_FLUORESCENCE_CLASS = preprocessing.ChannelGetter +DEFAULT_FLUORESCENCE_PROCESSING_ARGS = {"channel": "dapi", "adaptive_eq": True} DEFAULT_NORM_METHOD = "img_stats" # Default rigid registration parameters # @@ -2410,8 +2410,8 @@ def measure_original_mmi(self, img1, img2): def create_img_processor_dict(self, brightfield_processing_cls=DEFAULT_BRIGHTFIELD_CLASS, brightfield_processing_kwargs=DEFAULT_BRIGHTFIELD_PROCESSING_ARGS, - if_processing_cls=DEFAULT_FLOURESCENCE_CLASS, - if_processing_kwargs=DEFAULT_FLOURESCENCE_PROCESSING_ARGS, + if_processing_cls=DEFAULT_FLUORESCENCE_CLASS, + if_processing_kwargs=DEFAULT_FLUORESCENCE_PROCESSING_ARGS, processor_dict=None): """Create dictionary to get processors for each image @@ -3921,8 +3921,8 @@ def measure_error(self): def register(self, brightfield_processing_cls=DEFAULT_BRIGHTFIELD_CLASS, brightfield_processing_kwargs=DEFAULT_BRIGHTFIELD_PROCESSING_ARGS, - if_processing_cls=DEFAULT_FLOURESCENCE_CLASS, - if_processing_kwargs=DEFAULT_FLOURESCENCE_PROCESSING_ARGS, + if_processing_cls=DEFAULT_FLUORESCENCE_CLASS, + if_processing_kwargs=DEFAULT_FLUORESCENCE_PROCESSING_ARGS, processor_dict=None, reader_cls=None): @@ -4116,8 +4116,8 @@ def cleanup(self): @valtils.deprecated_args(max_non_rigid_registration_dim_px="max_non_rigid_registration_dim_px") def register_micro(self, brightfield_processing_cls=DEFAULT_BRIGHTFIELD_CLASS, brightfield_processing_kwargs=DEFAULT_BRIGHTFIELD_PROCESSING_ARGS, - if_processing_cls=DEFAULT_FLOURESCENCE_CLASS, - if_processing_kwargs=DEFAULT_FLOURESCENCE_PROCESSING_ARGS, + if_processing_cls=DEFAULT_FLUORESCENCE_CLASS, + if_processing_kwargs=DEFAULT_FLUORESCENCE_PROCESSING_ARGS, processor_dict=None, max_non_rigid_registration_dim_px=DEFAULT_MAX_NON_RIGID_REG_SIZE, non_rigid_registrar_cls=DEFAULT_NON_RIGID_CLASS, diff --git a/valis/micro_rigid_registrar.py b/valis/micro_rigid_registrar.py index eb16bad5..9ab5f42e 100644 --- a/valis/micro_rigid_registrar.py +++ b/valis/micro_rigid_registrar.py @@ -27,8 +27,8 @@ DEFAULT_BF_PROCESSOR = preprocessing.OD DEFAULT_BF_PROCESSOR_KWARGS = {} -DEFAULT_FLOURESCENCE_CLASS = preprocessing.ChannelGetter -DEFAULT_FLOURESCENCE_PROCESSING_ARGS = {"channel": "dapi", "adaptive_eq": True} +DEFAULT_FLUORESCENCE_CLASS = preprocessing.ChannelGetter +DEFAULT_FLUORESCENCE_PROCESSING_ARGS = {"channel": "dapi", "adaptive_eq": True} class MicroRigidRegistrar(object): """Refine rigid registration using higher resolution images @@ -164,7 +164,7 @@ def create_mask(self, moving_slide, fixed_slide): def register(self, brightfield_processing_cls=DEFAULT_BF_PROCESSOR, brightfield_processing_kwargs=DEFAULT_BF_PROCESSOR_KWARGS, - if_processing_cls=DEFAULT_FLOURESCENCE_CLASS, if_processing_kwargs=DEFAULT_FLOURESCENCE_PROCESSING_ARGS): + if_processing_cls=DEFAULT_FLUORESCENCE_CLASS, if_processing_kwargs=DEFAULT_FLUORESCENCE_PROCESSING_ARGS): """ Parameters diff --git a/valis/registration.py b/valis/registration.py index 576bcc90..51b28f8f 100644 --- a/valis/registration.py +++ b/valis/registration.py @@ -62,8 +62,8 @@ # Default image processing # DEFAULT_BRIGHTFIELD_CLASS = preprocessing.OD DEFAULT_BRIGHTFIELD_PROCESSING_ARGS = {"adaptive_eq": False} #{'c': preprocessing.DEFAULT_COLOR_STD_C, "h": 0} -DEFAULT_FLOURESCENCE_CLASS = preprocessing.ChannelGetter -DEFAULT_FLOURESCENCE_PROCESSING_ARGS = {"channel": "dapi", "adaptive_eq": True} +DEFAULT_FLUORESCENCE_CLASS = preprocessing.ChannelGetter +DEFAULT_FLUORESCENCE_PROCESSING_ARGS = {"channel": "dapi", "adaptive_eq": True} DEFAULT_NORM_METHOD = "img_stats" # Default rigid registration parameters # @@ -2678,8 +2678,8 @@ def measure_original_mmi(self, img1, img2): def create_img_processor_dict(self, brightfield_processing_cls=DEFAULT_BRIGHTFIELD_CLASS, brightfield_processing_kwargs=DEFAULT_BRIGHTFIELD_PROCESSING_ARGS, - if_processing_cls=DEFAULT_FLOURESCENCE_CLASS, - if_processing_kwargs=DEFAULT_FLOURESCENCE_PROCESSING_ARGS, + if_processing_cls=DEFAULT_FLUORESCENCE_CLASS, + if_processing_kwargs=DEFAULT_FLUORESCENCE_PROCESSING_ARGS, processor_dict=None): """Create dictionary to get processors for each image @@ -4592,8 +4592,8 @@ def measure_error(self): def register(self, brightfield_processing_cls=DEFAULT_BRIGHTFIELD_CLASS, brightfield_processing_kwargs=DEFAULT_BRIGHTFIELD_PROCESSING_ARGS, - if_processing_cls=DEFAULT_FLOURESCENCE_CLASS, - if_processing_kwargs=DEFAULT_FLOURESCENCE_PROCESSING_ARGS, + if_processing_cls=DEFAULT_FLUORESCENCE_CLASS, + if_processing_kwargs=DEFAULT_FLUORESCENCE_PROCESSING_ARGS, processor_dict=None, reader_cls=None, reader_dict=None): @@ -4797,8 +4797,8 @@ def cleanup(self): @valtils.deprecated_args(max_non_rigid_registration_dim_px="max_non_rigid_registration_dim_px") def register_micro(self, brightfield_processing_cls=DEFAULT_BRIGHTFIELD_CLASS, brightfield_processing_kwargs=DEFAULT_BRIGHTFIELD_PROCESSING_ARGS, - if_processing_cls=DEFAULT_FLOURESCENCE_CLASS, - if_processing_kwargs=DEFAULT_FLOURESCENCE_PROCESSING_ARGS, + if_processing_cls=DEFAULT_FLUORESCENCE_CLASS, + if_processing_kwargs=DEFAULT_FLUORESCENCE_PROCESSING_ARGS, processor_dict=None, max_non_rigid_registration_dim_px=DEFAULT_MAX_MICRO_REG_SIZE, non_rigid_registrar_cls=DEFAULT_NON_RIGID_CLASS, From 4d323dbfb712de0601efbd33f62e8d5f74cb1c70 Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Fri, 6 Mar 2026 00:02:28 +0900 Subject: [PATCH 077/152] Fix typo: unwarped -> un-warped --- examples/acrobat_2023/valis/registration.py | 26 +++++++++---------- .../acrobat_2023/valis/serial_non_rigid.py | 4 +-- examples/acrobat_2023/valis/warp_tools.py | 14 +++++----- tests/test_examples.py | 2 +- valis/registration.py | 26 +++++++++---------- valis/serial_non_rigid.py | 4 +-- valis/serial_rigid.py | 2 +- valis/warp_tools.py | 14 +++++----- 8 files changed, 46 insertions(+), 46 deletions(-) diff --git a/examples/acrobat_2023/valis/registration.py b/examples/acrobat_2023/valis/registration.py index 52777687..4f430836 100644 --- a/examples/acrobat_2023/valis/registration.py +++ b/examples/acrobat_2023/valis/registration.py @@ -525,7 +525,7 @@ def get_crop_xywh(self, crop, out_shape_rc=None): out_shape_rc : tuple of int, optional If crop is "reference", this should be the shape of scaled reference image, such - as the unwarped slide that corresponds to the unwarped processed reference image. + as the un-warped slide that corresponds to the un-warped processed reference image. If crop is "overlap", this should be the shape of the registered slides. @@ -756,7 +756,7 @@ def warp_img(self, img=None, non_rigid=True, crop=True, interp_method="bicubic") def warp_img_from_to(self, img, to_slide_obj, dst_slide_level=0, non_rigid=True, interp_method="bicubic", bg_color=None): - """Warp an image from this slide onto another unwarped slide + """Warp an image from this slide onto another un-warped slide Note that if `img` is a labeled image then it is recommended to set `interp_method` to "nearest" @@ -768,7 +768,7 @@ def warp_img_from_to(self, img, to_slide_obj, to_slide_obj : Slide Slide to which the points will be warped. I.e. `xy` will be warped from this Slide to their position in - the unwarped slide associated with `to_slide_obj`. + the un-warped slide associated with `to_slide_obj`. dst_slide_level: int, tuple, optional Pyramid level of the slide/image that `img` will be warped on to @@ -1102,10 +1102,10 @@ def warp_xy(self, xy, M=None, slide_level=0, pt_level=0, def warp_xy_from_to(self, xy, to_slide_obj, src_slide_level=0, src_pt_level=0, dst_slide_level=0, non_rigid=True): - """Warp points from this slide to another unwarped slide + """Warp points from this slide to another un-warped slide - Takes a set of points found in this unwarped slide, and warps them to - their position in the unwarped "to" slide. + Takes a set of points found in this un-warped slide, and warps them to + their position in the un-warped "to" slide. Parameters ---------- @@ -1115,12 +1115,12 @@ def warp_xy_from_to(self, xy, to_slide_obj, src_slide_level=0, src_pt_level=0, to_slide_obj : Slide Slide to which the points will be warped. I.e. `xy` will be warped from this Slide to their position in - the unwarped slide associated with `to_slide_obj`. + the un-warped slide associated with `to_slide_obj`. src_pt_level: int, tuple, optional Pyramid level of the slide/image in which `xy` originated. For example, if `xy` are from the centroids of cell segmentation - performed on the unwarped full resolution image, this should be 0. + performed on the un-warped full resolution image, this should be 0. Alternatively, the value can be a tuple of the image's shape (row, col) from which the points came. For example, if `xy` are bounding box coordinates from an analysis on a lower resolution image, @@ -1291,10 +1291,10 @@ def warp_geojson(self, geojson_f, M=None, slide_level=0, pt_level=0, def warp_geojson_from_to(self, geojson_f, to_slide_obj, src_slide_level=0, src_pt_level=0, dst_slide_level=0, non_rigid=True): - """Warp geoms in geojson file from annotation slide to another unwarped slide + """Warp geoms in geojson file from annotation slide to another un-warped slide Takes a set of geometries found in this annotation slide, and warps them to - their position in the unwarped "to" slide. + their position in the un-warped "to" slide. Parameters ---------- @@ -1305,12 +1305,12 @@ def warp_geojson_from_to(self, geojson_f, to_slide_obj, src_slide_level=0, src_p to_slide_obj : Slide Slide to which the points will be warped. I.e. `xy` will be warped from this Slide to their position in - the unwarped slide associated with `to_slide_obj`. + the un-warped slide associated with `to_slide_obj`. src_pt_level: int, tuple, optional Pyramid level of the slide/image in which `xy` originated. For example, if `xy` are from the centroids of cell segmentation - performed on the unwarped full resolution image, this should be 0. + performed on the un-warped full resolution image, this should be 0. Alternatively, the value can be a tuple of the image's shape (row, col) from which the points came. For example, if `xy` are bounding box coordinates from an analysis on a lower resolution image, @@ -2120,7 +2120,7 @@ def get_slide(self, src_f): * Save the warped slide as an ome.tiff (Slide.warp_and_save_slide) * Warp an image of the slide (Slide.warp_img) * Warp points (Slide.warp_xy) - * Warp points in one slide to their position in another unwarped slide (Slide.warp_xy_from_to) + * Warp points in one slide to their position in another un-warped slide (Slide.warp_xy_from_to) * Access slide ome-xml (Slide.original_xml) See Slide for more details. diff --git a/examples/acrobat_2023/valis/serial_non_rigid.py b/examples/acrobat_2023/valis/serial_non_rigid.py index 4852fa55..07927d56 100644 --- a/examples/acrobat_2023/valis/serial_non_rigid.py +++ b/examples/acrobat_2023/valis/serial_non_rigid.py @@ -222,7 +222,7 @@ class NonRigidZImage(object): ---------- image : ndarray - Original, unwarped image with shape (P, Q) + Original, un-warped image with shape (P, Q) name : str Name of image. @@ -260,7 +260,7 @@ def __init__(self, reg_obj, image, name, stack_idx, moving_xy=None, fixed_xy=Non ---------- image : ndarray - Original, unwarped image with shape (P, Q) + Original, un-warped image with shape (P, Q) name : str Name of image. diff --git a/examples/acrobat_2023/valis/warp_tools.py b/examples/acrobat_2023/valis/warp_tools.py index 8006c914..70156e86 100644 --- a/examples/acrobat_2023/valis/warp_tools.py +++ b/examples/acrobat_2023/valis/warp_tools.py @@ -1288,7 +1288,7 @@ def warp_img_from_to(img, from_M=None, from_transformation_src_shape_rc=None, this shape should be the same for both images. from_src_shape_rc : optional, (int, int) - Shape of the unwarped image from which the points originated. For example, + Shape of the un-warped image from which the points originated. For example, this could be a larger/smaller version of the "from" image that was used for feature detection. @@ -1310,7 +1310,7 @@ def warp_img_from_to(img, from_M=None, from_transformation_src_shape_rc=None, For example, this could be the original image in which features were detected to_src_shape_rc : optional, (int, int) - Shape of the unwarped "to" image to which the points will be warped. For example, + Shape of the un-warped "to" image to which the points will be warped. For example, this could be a larger/smaller version of the "to" image that was used for feature detection. @@ -2313,8 +2313,8 @@ def warp_xy_from_to(xy, from_M=None, from_transformation_src_shape_rc=None, to_dst_shape_rc=None, to_bk_dxdy=None, to_fwd_dxdy=None): """Warp points in one image to their position in another unregistered image - Takes a set of points found in the unwarped "from" image, and warps them to their - position in the unwarped "to" image. + Takes a set of points found in the un-warped "from" image, and warps them to their + position in the un-warped "to" image. Parameters ---------- @@ -2334,7 +2334,7 @@ def warp_xy_from_to(xy, from_M=None, from_transformation_src_shape_rc=None, this shape should be the same for both images. from_src_shape_rc : optional, (int, int) - Shape of the unwarped image from which the points originated. For example, + Shape of the un-warped image from which the points originated. For example, this could be a larger/smaller version of the "from" image that was used for feature detection. @@ -2356,7 +2356,7 @@ def warp_xy_from_to(xy, from_M=None, from_transformation_src_shape_rc=None, For example, this could be the original image in which features were detected to_src_shape_rc : optional, (int, int) - Shape of the unwarped "to" image to which the points will be warped. For example, + Shape of the un-warped "to" image to which the points will be warped. For example, this could be a larger/smaller version of the "to" image that was used for feature detection. @@ -2373,7 +2373,7 @@ def warp_xy_from_to(xy, from_M=None, from_transformation_src_shape_rc=None, Returns ------- xy_in_to : ndarray - position of `xy` in the unwarped "to" image + position of `xy` in the un-warped "to" image """ diff --git a/tests/test_examples.py b/tests/test_examples.py index 4abc6352..69b7dd9c 100644 --- a/tests/test_examples.py +++ b/tests/test_examples.py @@ -211,7 +211,7 @@ def test_register_cycif(max_error=3): * Make sure error is below threshold * Checks channel names of merged image are in the correct order (https://github.com/MathOnco/valis/issues/56#issuecomment-1821050877) * Check jpeg2000 compression - * Check that reference slide is unwarped + * Check that reference slide is un-warped """ diff --git a/valis/registration.py b/valis/registration.py index 51b28f8f..2f347776 100644 --- a/valis/registration.py +++ b/valis/registration.py @@ -579,7 +579,7 @@ def get_crop_xywh(self, crop, out_shape_rc=None): out_shape_rc : tuple of int, optional If crop is "reference", this should be the shape of scaled reference image, such - as the unwarped slide that corresponds to the unwarped processed reference image. + as the un-warped slide that corresponds to the un-warped processed reference image. If crop is "overlap", this should be the shape of the registered slides. @@ -832,7 +832,7 @@ def warp_img(self, img=None, non_rigid=True, crop=True, interp_method="bicubic") def warp_img_from_to(self, img, to_slide_obj, dst_slide_level=0, non_rigid=True, interp_method="bicubic", bg_color=None): - """Warp an image from this slide onto another unwarped slide + """Warp an image from this slide onto another un-warped slide Note that if `img` is a labeled image/mask then it is recommended to set `interp_method` to "nearest" @@ -844,7 +844,7 @@ def warp_img_from_to(self, img, to_slide_obj, to_slide_obj : Slide Slide to which the points will be warped. I.e. `xy` will be warped from this Slide to their position in - the unwarped slide associated with `to_slide_obj`. + the un-warped slide associated with `to_slide_obj`. dst_slide_level: int, tuple, optional Pyramid level of the slide/image that `img` will be warped on to @@ -1200,10 +1200,10 @@ def warp_xy(self, xy, M=None, slide_level=0, pt_level=0, def warp_xy_from_to(self, xy, to_slide_obj, src_slide_level=0, src_pt_level=0, dst_slide_level=0, non_rigid=True): - """Warp points from this slide to another unwarped slide + """Warp points from this slide to another un-warped slide - Takes a set of points found in this unwarped slide, and warps them to - their position in the unwarped "to" slide. + Takes a set of points found in this un-warped slide, and warps them to + their position in the un-warped "to" slide. Parameters ---------- @@ -1213,12 +1213,12 @@ def warp_xy_from_to(self, xy, to_slide_obj, src_slide_level=0, src_pt_level=0, to_slide_obj : Slide Slide to which the points will be warped. I.e. `xy` will be warped from this Slide to their position in - the unwarped slide associated with `to_slide_obj`. + the un-warped slide associated with `to_slide_obj`. src_pt_level: int, tuple, optional Pyramid level of the slide/image in which `xy` originated. For example, if `xy` are from the centroids of cell segmentation - performed on the unwarped full resolution image, this should be 0. + performed on the un-warped full resolution image, this should be 0. Alternatively, the value can be a tuple of the image's shape (row, col) from which the points came. For example, if `xy` are bounding box coordinates from an analysis on a lower resolution image, @@ -1389,10 +1389,10 @@ def warp_geojson(self, geojson_f, M=None, slide_level=0, pt_level=0, def warp_geojson_from_to(self, geojson_f, to_slide_obj, src_slide_level=0, src_pt_level=0, dst_slide_level=0, non_rigid=True): - """Warp geoms in geojson file from annotation slide to another unwarped slide + """Warp geoms in geojson file from annotation slide to another un-warped slide Takes a set of geometries found in this annotation slide, and warps them to - their position in the unwarped "to" slide. + their position in the un-warped "to" slide. Parameters ---------- @@ -1403,12 +1403,12 @@ def warp_geojson_from_to(self, geojson_f, to_slide_obj, src_slide_level=0, src_p to_slide_obj : Slide Slide to which the points will be warped. I.e. `xy` will be warped from this Slide to their position in - the unwarped slide associated with `to_slide_obj`. + the un-warped slide associated with `to_slide_obj`. src_pt_level: int, tuple, optional Pyramid level of the slide/image in which `xy` originated. For example, if `xy` are from the centroids of cell segmentation - performed on the unwarped full resolution image, this should be 0. + performed on the un-warped full resolution image, this should be 0. Alternatively, the value can be a tuple of the image's shape (row, col) from which the points came. For example, if `xy` are bounding box coordinates from an analysis on a lower resolution image, @@ -2343,7 +2343,7 @@ def get_slide(self, src_f): * Save the warped slide as an ome.tiff (Slide.warp_and_save_slide) * Warp an image of the slide (Slide.warp_img) * Warp points (Slide.warp_xy) - * Warp points in one slide to their position in another unwarped slide (Slide.warp_xy_from_to) + * Warp points in one slide to their position in another un-warped slide (Slide.warp_xy_from_to) * Access slide ome-xml (Slide.original_xml) See Slide for more details. diff --git a/valis/serial_non_rigid.py b/valis/serial_non_rigid.py index d5e8498e..e87e8e51 100644 --- a/valis/serial_non_rigid.py +++ b/valis/serial_non_rigid.py @@ -224,7 +224,7 @@ class NonRigidZImage(object): ---------- image : ndarray - Original, unwarped image with shape (P, Q) + Original, un-warped image with shape (P, Q) name : str Name of image. @@ -262,7 +262,7 @@ def __init__(self, reg_obj, image, name, stack_idx, moving_xy=None, fixed_xy=Non ---------- image : ndarray - Original, unwarped image with shape (P, Q) + Original, un-warped image with shape (P, Q) name : str Name of image. diff --git a/valis/serial_rigid.py b/valis/serial_rigid.py index 156c6cb9..511e8c35 100644 --- a/valis/serial_rigid.py +++ b/valis/serial_rigid.py @@ -473,7 +473,7 @@ def __init__(self, img_dir, imgs_ordered=False, reference_img_f=None, msg = (f"The reference was specified as {og_ref_name} ", f"but `align_to_reference` is `False`, and so images will be aligned serially *towards* the reference image. ", f"If you would like all images to be *directly* aligned to {og_ref_name}, " - f"then set `align_to_reference` to `True`. Note that in both cases, {og_ref_name} will remain unwarped.") + f"then set `align_to_reference` to `True`. Note that in both cases, {og_ref_name} will remain un-warped.") valtils.print_warning(msg) def generate_img_obj_list(self, feature_detector, valis_obj=None, qt_emitter=None): diff --git a/valis/warp_tools.py b/valis/warp_tools.py index f444a5fa..aa5c79d4 100644 --- a/valis/warp_tools.py +++ b/valis/warp_tools.py @@ -1418,7 +1418,7 @@ def warp_img_from_to(img, from_M=None, from_transformation_src_shape_rc=None, this shape should be the same for both images. from_src_shape_rc : optional, (int, int) - Shape of the unwarped image from which the points originated. For example, + Shape of the un-warped image from which the points originated. For example, this could be a larger/smaller version of the "from" image that was used for feature detection. @@ -1440,7 +1440,7 @@ def warp_img_from_to(img, from_M=None, from_transformation_src_shape_rc=None, For example, this could be the original image in which features were detected to_src_shape_rc : optional, (int, int) - Shape of the unwarped "to" image to which the points will be warped. For example, + Shape of the un-warped "to" image to which the points will be warped. For example, this could be a larger/smaller version of the "to" image that was used for feature detection. @@ -2457,8 +2457,8 @@ def warp_xy_from_to(xy, from_M=None, from_transformation_src_shape_rc=None, to_dst_shape_rc=None, to_bk_dxdy=None, to_fwd_dxdy=None): """Warp points in one image to their position in another unregistered image - Takes a set of points found in the unwarped "from" image, and warps them to their - position in the unwarped "to" image. + Takes a set of points found in the un-warped "from" image, and warps them to their + position in the un-warped "to" image. Parameters ---------- @@ -2478,7 +2478,7 @@ def warp_xy_from_to(xy, from_M=None, from_transformation_src_shape_rc=None, this shape should be the same for both images. from_src_shape_rc : optional, (int, int) - Shape of the unwarped image from which the points originated. For example, + Shape of the un-warped image from which the points originated. For example, this could be a larger/smaller version of the "from" image that was used for feature detection. @@ -2500,7 +2500,7 @@ def warp_xy_from_to(xy, from_M=None, from_transformation_src_shape_rc=None, For example, this could be the original image in which features were detected to_src_shape_rc : optional, (int, int) - Shape of the unwarped "to" image to which the points will be warped. For example, + Shape of the un-warped "to" image to which the points will be warped. For example, this could be a larger/smaller version of the "to" image that was used for feature detection. @@ -2517,7 +2517,7 @@ def warp_xy_from_to(xy, from_M=None, from_transformation_src_shape_rc=None, Returns ------- xy_in_to : ndarray - position of `xy` in the unwarped "to" image + position of `xy` in the un-warped "to" image """ From af1398f79c833fca42848cb5b445270d49075090 Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Fri, 6 Mar 2026 00:05:07 +0900 Subject: [PATCH 078/152] Fix typo: AffineOptimzer -> un-AffineOptimizer --- examples/acrobat_2023/valis/registration.py | 4 ++-- examples/acrobat_2023/valis/serial_rigid.py | 4 ++-- valis/registration.py | 4 ++-- valis/serial_rigid.py | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/examples/acrobat_2023/valis/registration.py b/examples/acrobat_2023/valis/registration.py index 4f430836..454cec0f 100644 --- a/examples/acrobat_2023/valis/registration.py +++ b/examples/acrobat_2023/valis/registration.py @@ -1703,8 +1703,8 @@ def __init__(self, src_dir, dst_dir, series=None, name=None, image_type=None, transformation matrix that will warp each image to the target image. Default is SimilarityTransform - affine_optimizer_cls : AffineOptimzer class, optional - Uninstantiated AffineOptimzer that will minimize a + affine_optimizer_cls : AffineOptimizer class, optional + Uninstantiated AffineOptimizer that will minimize a cost function to find the optimal affine transformations. If a desired affine optimization is not available, one can be created by subclassing `affine_optimizer.AffineOptimizer`. diff --git a/examples/acrobat_2023/valis/serial_rigid.py b/examples/acrobat_2023/valis/serial_rigid.py index 683e490a..c772fa8b 100644 --- a/examples/acrobat_2023/valis/serial_rigid.py +++ b/examples/acrobat_2023/valis/serial_rigid.py @@ -1106,7 +1106,7 @@ def optimize(self, affine_optimizer, qt_emitter=None): Parameters ----------- - affine_optimizer : AffineOptimzer + affine_optimizer : AffineOptimizer Object that will minimize a cost function to find the optimal affine transformations @@ -1451,7 +1451,7 @@ def register_images(img_dir, dst_dir=None, name="registrar", Transformer used to find transformation matrix that will warp each image to the target image. - affine_optimizer : AffineOptimzer object + affine_optimizer : AffineOptimizer object Object that will minimize a cost function to find the optimal affine transoformations diff --git a/valis/registration.py b/valis/registration.py index 2f347776..8d54e810 100644 --- a/valis/registration.py +++ b/valis/registration.py @@ -1823,8 +1823,8 @@ def __init__(self, src_dir, dst_dir, series=None, name=None, image_type=None, transformation matrix that will warp each image to the target image. Default is SimilarityTransform - affine_optimizer_cls : AffineOptimzer class, optional - Uninstantiated AffineOptimzer that will minimize a + affine_optimizer_cls : AffineOptimizer class, optional + Uninstantiated AffineOptimizer that will minimize a cost function to find the optimal affine transformations. If a desired affine optimization is not available, one can be created by subclassing `affine_optimizer.AffineOptimizer`. diff --git a/valis/serial_rigid.py b/valis/serial_rigid.py index 511e8c35..77e415fe 100644 --- a/valis/serial_rigid.py +++ b/valis/serial_rigid.py @@ -1323,7 +1323,7 @@ def optimize(self, affine_optimizer, qt_emitter=None): Parameters ----------- - affine_optimizer : AffineOptimzer + affine_optimizer : AffineOptimizer Object that will minimize a cost function to find the optimal affine transformations @@ -1694,7 +1694,7 @@ def register_images(img_dir, dst_dir=None, name="registrar", Transformer used to find transformation matrix that will warp each image to the target image. - affine_optimizer : AffineOptimzer object + affine_optimizer : AffineOptimizer object Object that will minimize a cost function to find the optimal affine transoformations From 0d2a4b54c30bf190f08321470191c3ac011cc818 Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Fri, 6 Mar 2026 00:08:42 +0900 Subject: [PATCH 079/152] Remove 'of' --- examples/acrobat_2023/valis/registration.py | 2 +- examples/acrobat_2023/valis/serial_non_rigid.py | 2 +- examples/acrobat_2023/valis/serial_rigid.py | 4 ++-- examples/acrobat_2023/valis/viz.py | 2 +- examples/warp_points.py | 2 +- valis/registration.py | 2 +- valis/serial_non_rigid.py | 2 +- valis/serial_rigid.py | 4 ++-- valis/viz.py | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/examples/acrobat_2023/valis/registration.py b/examples/acrobat_2023/valis/registration.py index 454cec0f..03419f8b 100644 --- a/examples/acrobat_2023/valis/registration.py +++ b/examples/acrobat_2023/valis/registration.py @@ -2729,7 +2729,7 @@ def get_all_overlap_mask(self, rigid_registrar): def get_null_overlap_mask(self, rigid_registrar): - """Create mask that covers all of the image. + """Create mask that covers all the images. Not really a mask diff --git a/examples/acrobat_2023/valis/serial_non_rigid.py b/examples/acrobat_2023/valis/serial_non_rigid.py index 07927d56..588f1d37 100644 --- a/examples/acrobat_2023/valis/serial_non_rigid.py +++ b/examples/acrobat_2023/valis/serial_non_rigid.py @@ -169,7 +169,7 @@ def get_imgs_from_dict(img_dict): "name_list" : list of image names. If not provided, will come from file names "mask_list" list of masks for each image - All of the above are optional, except `img_list`. + All the above are optional, except `img_list`. Returns ------- diff --git a/examples/acrobat_2023/valis/serial_rigid.py b/examples/acrobat_2023/valis/serial_rigid.py index c772fa8b..02e33a79 100644 --- a/examples/acrobat_2023/valis/serial_rigid.py +++ b/examples/acrobat_2023/valis/serial_rigid.py @@ -709,12 +709,12 @@ def neighbor_match_filtering(self, img_obj, prev_img_obj, next_img_obj, updated_prev_match_info12 : MatchInfo If improved is True, then `updated_prev_match_info12` includes only features, descriptors that were found in both neighbors. Otherwise, - all of the original features will be maintained + all the original features will be maintained updated_next_match_info12 : MatchInfo If improved is True, then `updated_next_match_info12` includes only features, descriptors that were found in both neighbors. Otherwise, - all of the original features will be maintained + all the original features will be maintained """ diff --git a/examples/acrobat_2023/valis/viz.py b/examples/acrobat_2023/valis/viz.py index bba502af..bd4b8e15 100644 --- a/examples/acrobat_2023/valis/viz.py +++ b/examples/acrobat_2023/valis/viz.py @@ -559,7 +559,7 @@ def color_multichannel(multichannel_img, marker_colors, rescale_channels=False, the others, making it easier to compare marker expression levels. "channel" will first scale the intensity of each channel, and then - blend all of the channels together. This will allow one to see the + blend all the channels together. This will allow one to see the relative expression of each marker, but won't allow one to directly compare the expression of markers across channels. diff --git a/examples/warp_points.py b/examples/warp_points.py index c8c48fe2..a9c64a19 100644 --- a/examples/warp_points.py +++ b/examples/warp_points.py @@ -15,7 +15,7 @@ converted pixel units. 4. The Slide object can now be used to warp the coordinates. -This yields the ROI coordinates in all of the registered slides. +This yields the ROI coordinates in all the registered slides. 5. Warp and slice the ROI from each slide using the Slide's pyvips.Image extract_area method. diff --git a/valis/registration.py b/valis/registration.py index 8d54e810..ada499ed 100644 --- a/valis/registration.py +++ b/valis/registration.py @@ -3047,7 +3047,7 @@ def get_all_overlap_mask(self): return mask, mask_bbox_xywh def get_null_overlap_mask(self): - """Create mask that covers all of the image. + """Create mask that covers all the images. Not really a mask diff --git a/valis/serial_non_rigid.py b/valis/serial_non_rigid.py index e87e8e51..1f26a9df 100644 --- a/valis/serial_non_rigid.py +++ b/valis/serial_non_rigid.py @@ -171,7 +171,7 @@ def get_imgs_from_dict(img_dict): "name_list" : list of image names. If not provided, will come from file names "mask_list" list of masks for each image - All of the above are optional, except `img_list`. + All the above are optional, except `img_list`. Returns ------- diff --git a/valis/serial_rigid.py b/valis/serial_rigid.py index 77e415fe..285beae7 100644 --- a/valis/serial_rigid.py +++ b/valis/serial_rigid.py @@ -691,12 +691,12 @@ def neighbor_match_filtering(self, img_obj, prev_img_obj, next_img_obj, tform, w updated_prev_match_info12 : MatchInfo If improved is True, then `updated_prev_match_info12` includes only features, descriptors that were found in both neighbors. Otherwise, - all of the original features will be maintained + all the original features will be maintained updated_next_match_info12 : MatchInfo If improved is True, then `updated_next_match_info12` includes only features, descriptors that were found in both neighbors. Otherwise, - all of the original features will be maintained + all the original features will be maintained """ diff --git a/valis/viz.py b/valis/viz.py index 63024463..8c14d3b4 100644 --- a/valis/viz.py +++ b/valis/viz.py @@ -717,7 +717,7 @@ def color_multichannel(multichannel_img, marker_colors, rescale_channels=False, the others, making it easier to compare marker expression levels. "channel" will first scale the intensity of each channel, and then - blend all of the channels together. This will allow one to see the + blend all the channels together. This will allow one to see the relative expression of each marker, but won't allow one to directly compare the expression of markers across channels. From 10d5011a4ffbbb26aec6697f92206b3c2f77a58c Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Fri, 6 Mar 2026 00:09:33 +0900 Subject: [PATCH 080/152] Fix typo: coordinaates -> coordinates --- examples/warp_points.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/warp_points.py b/examples/warp_points.py index a9c64a19..e750e15e 100644 --- a/examples/warp_points.py +++ b/examples/warp_points.py @@ -11,7 +11,7 @@ from which the ROI coordinates originated. 3. Warping of points assumes the coordinates are in pixel units. -However, here the original coordinaates are in microns, and so need to be +However, here the original coordinates are in microns, and so need to be converted pixel units. 4. The Slide object can now be used to warp the coordinates. From 18db7bde50b67399da4c42d7a7dda5daec802034 Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Fri, 6 Mar 2026 00:10:52 +0900 Subject: [PATCH 081/152] Fix typo: colorspaces -> colorspace --- examples/acrobat_2023/valis/viz.py | 2 +- valis/viz.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/acrobat_2023/valis/viz.py b/examples/acrobat_2023/valis/viz.py index bd4b8e15..466b60ae 100644 --- a/examples/acrobat_2023/valis/viz.py +++ b/examples/acrobat_2023/valis/viz.py @@ -566,7 +566,7 @@ def color_multichannel(multichannel_img, marker_colors, rescale_channels=False, cspace : str Colorspace in which `marker_colors` will be blended. JzAzBz, Hunter Lab, and sRGB all work well. But, see - colour.COLOURSPACE_MODELS for other possible colorspaces + colour.COLOURSPACE_MODELS for other possible colorspace Returns ------- diff --git a/valis/viz.py b/valis/viz.py index 8c14d3b4..01028803 100644 --- a/valis/viz.py +++ b/valis/viz.py @@ -724,7 +724,7 @@ def color_multichannel(multichannel_img, marker_colors, rescale_channels=False, cspace : str Colorspace in which `marker_colors` will be blended. JzAzBz, Hunter Lab, and sRGB all work well. But, see - colour.COLOURSPACE_MODELS for other possible colorspaces + colour.COLOURSPACE_MODELS for other possible colorspace Returns ------- From bd5c929ab4ffbcad857826c7bcab11ab8c932542 Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Fri, 6 Mar 2026 00:11:50 +0900 Subject: [PATCH 082/152] Fix typo: optinal -> optional --- examples/acrobat_2023/valis/serial_rigid.py | 2 +- examples/acrobat_2023/valis/slide_io.py | 2 +- valis/serial_rigid.py | 2 +- valis/slide_io.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/acrobat_2023/valis/serial_rigid.py b/examples/acrobat_2023/valis/serial_rigid.py index 02e33a79..69864287 100644 --- a/examples/acrobat_2023/valis/serial_rigid.py +++ b/examples/acrobat_2023/valis/serial_rigid.py @@ -34,7 +34,7 @@ def get_image_files(img_dir, imgs_ordered=False): img_dir : str Path to directory containing the images. - imgs_ordered: bool, optinal + imgs_ordered: bool, optional Whether or not the order of images already known. If True, the file names should start with ascending numbers, with the first image file having the smallest number, and the last image file having the largest diff --git a/examples/acrobat_2023/valis/slide_io.py b/examples/acrobat_2023/valis/slide_io.py index 2770970b..712073ef 100644 --- a/examples/acrobat_2023/valis/slide_io.py +++ b/examples/acrobat_2023/valis/slide_io.py @@ -2486,7 +2486,7 @@ def create_channel(channel_id, name=None, color=None): channel_id : int Channel number - name : str, optinal + name : str, optional Channel name color : tuple of int diff --git a/valis/serial_rigid.py b/valis/serial_rigid.py index 285beae7..5c95f61f 100644 --- a/valis/serial_rigid.py +++ b/valis/serial_rigid.py @@ -54,7 +54,7 @@ def get_image_files(img_dir, imgs_ordered=False): img_dir : str Path to directory containing the images. - imgs_ordered: bool, optinal + imgs_ordered: bool, optional Whether or not the order of images already known. If True, the file names should start with ascending numbers, with the first image file having the smallest number, and the last image file having the largest diff --git a/valis/slide_io.py b/valis/slide_io.py index 563f3c2e..a240a428 100644 --- a/valis/slide_io.py +++ b/valis/slide_io.py @@ -3044,7 +3044,7 @@ def create_channel(channel_id, name=None, color=None, samples_per_pixel=1): channel_id : int Channel number - name : str, optinal + name : str, optional Channel name color : tuple of int From eb2a9e60d69483a0ee1b9242fb9d83261ee1dfe2 Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Fri, 6 Mar 2026 00:12:06 +0900 Subject: [PATCH 083/152] Fix typo: optinally -> optionally --- examples/acrobat_2023/valis/warp_tools.py | 2 +- examples/warp_annotation_image.py | 2 +- valis/warp_tools.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/acrobat_2023/valis/warp_tools.py b/examples/acrobat_2023/valis/warp_tools.py index 70156e86..1f832276 100644 --- a/examples/acrobat_2023/valis/warp_tools.py +++ b/examples/acrobat_2023/valis/warp_tools.py @@ -2798,7 +2798,7 @@ def measure_error(src_xy, dst_xy, shape, feature_similarity=None): Median relative Target Registration Error (rTRE) between images med_d : float - Median Euclidean distance between src_xy and dst_xy, optinally weighted by feature similarity + Median Euclidean distance between src_xy and dst_xy, optionally weighted by feature similarity """ d = np.sqrt((src_xy[:, 0]-dst_xy[:, 0])**2 + (src_xy[:, 1]-dst_xy[:, 1])**2) diff --git a/examples/warp_annotation_image.py b/examples/warp_annotation_image.py index 15cc5000..52eb9ca6 100644 --- a/examples/warp_annotation_image.py +++ b/examples/warp_annotation_image.py @@ -14,7 +14,7 @@ -# Perform registration. Can optinally set the reference image to be the same as the one the annotations are based on (i.e. `reference_img_f`) +# Perform registration. Can optionally set the reference image to be the same as the one the annotations are based on (i.e. `reference_img_f`) registrar = registration.Valis(slide_src_dir, results_dst_dir, reference_img_f=reference_img_f) rigid_registrar, non_rigid_registrar, error_df = registrar.register() diff --git a/valis/warp_tools.py b/valis/warp_tools.py index aa5c79d4..c751007a 100644 --- a/valis/warp_tools.py +++ b/valis/warp_tools.py @@ -2936,7 +2936,7 @@ def measure_error(src_xy, dst_xy, shape, feature_similarity=None): Median relative Target Registration Error (rTRE) between images med_d : float - Median Euclidean distance between src_xy and dst_xy, optinally weighted by feature similarity + Median Euclidean distance between src_xy and dst_xy, optionally weighted by feature similarity """ d = np.sqrt((src_xy[:, 0]-dst_xy[:, 0])**2 + (src_xy[:, 1]-dst_xy[:, 1])**2) From c0cdae327018f3e02e11e424bfbff041394fe629 Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Fri, 6 Mar 2026 00:12:58 +0900 Subject: [PATCH 084/152] Fix typo: Parmaters -> Parameters --- examples/acrobat_2023/valis/serial_rigid.py | 4 ++-- valis/serial_rigid.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/acrobat_2023/valis/serial_rigid.py b/examples/acrobat_2023/valis/serial_rigid.py index 69864287..dee3460f 100644 --- a/examples/acrobat_2023/valis/serial_rigid.py +++ b/examples/acrobat_2023/valis/serial_rigid.py @@ -86,8 +86,8 @@ def order_Dmat(D): Leaf sorting is accomplished using optimal leaf ordering (Bar-Joseph 2001) - Parmaters - --------- + Parameters + ---------- D: ndarray (N, N) Symmetric distance matrix for N samples diff --git a/valis/serial_rigid.py b/valis/serial_rigid.py index 5c95f61f..42416563 100644 --- a/valis/serial_rigid.py +++ b/valis/serial_rigid.py @@ -106,8 +106,8 @@ def order_Dmat(D): Leaf sorting is accomplished using optimal leaf ordering (Bar-Joseph 2001) - Parmaters - --------- + Parameters + ---------- D: ndarray (N, N) Symmetric distance matrix for N samples From 0749119ffb6321fc225ae08d49faf29419b47583 Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Fri, 6 Mar 2026 00:13:34 +0900 Subject: [PATCH 085/152] Fix typo: desciptors -> descriptors --- examples/acrobat_2023/valis/serial_rigid.py | 2 +- valis/serial_rigid.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/acrobat_2023/valis/serial_rigid.py b/examples/acrobat_2023/valis/serial_rigid.py index dee3460f..6c8e05ad 100644 --- a/examples/acrobat_2023/valis/serial_rigid.py +++ b/examples/acrobat_2023/valis/serial_rigid.py @@ -138,7 +138,7 @@ class ZImage(object): Name of the image. Usually `img_f` but with the extension removed. desc : ndarray - (N, M) array of N desciptors for each keypoint, each of which has + (N, M) array of N descriptors for each keypoint, each of which has M features kp_pos_xy : ndarray diff --git a/valis/serial_rigid.py b/valis/serial_rigid.py index 42416563..85b92dc5 100644 --- a/valis/serial_rigid.py +++ b/valis/serial_rigid.py @@ -158,7 +158,7 @@ class ZImage(object): Name of the image. Usually `img_f` but with the extension removed. desc : ndarray - (N, M) array of N desciptors for each keypoint, each of which has + (N, M) array of N descriptors for each keypoint, each of which has M features kp_pos_xy : ndarray From df201c4d9db64f2e48542254a43cd1271fb74f5f Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Fri, 6 Mar 2026 00:13:49 +0900 Subject: [PATCH 086/152] Fix typo: inoformation -> information --- examples/acrobat_2023/valis/serial_rigid.py | 2 +- valis/serial_rigid.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/acrobat_2023/valis/serial_rigid.py b/examples/acrobat_2023/valis/serial_rigid.py index 6c8e05ad..bb919e15 100644 --- a/examples/acrobat_2023/valis/serial_rigid.py +++ b/examples/acrobat_2023/valis/serial_rigid.py @@ -153,7 +153,7 @@ class ZImage(object): unfiltered_match_dict : dict Dictionary of image matches. Key= img_obj this ZImage is being - compared to, value= MatchInfo containing inoformation about the + compared to, value= MatchInfo containing information about the comparison, such as the position of matches, features for each match, number of matches, etc... The MatchInfo objects in this dictionary contain info for all matches that were cross-checked. diff --git a/valis/serial_rigid.py b/valis/serial_rigid.py index 85b92dc5..3216e300 100644 --- a/valis/serial_rigid.py +++ b/valis/serial_rigid.py @@ -173,7 +173,7 @@ class ZImage(object): unfiltered_match_dict : dict Dictionary of image matches. Key= img_obj this ZImage is being - compared to, value= MatchInfo containing inoformation about the + compared to, value= MatchInfo containing information about the comparison, such as the position of matches, features for each match, number of matches, etc... The MatchInfo objects in this dictionary contain info for all matches that were cross-checked. From d6f854e969f67a82a6396eed74442c867981f5cc Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Fri, 6 Mar 2026 00:14:39 +0900 Subject: [PATCH 087/152] Fix typo: curent -> current --- examples/acrobat_2023/valis/serial_rigid.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/acrobat_2023/valis/serial_rigid.py b/examples/acrobat_2023/valis/serial_rigid.py index bb919e15..195d43b1 100644 --- a/examples/acrobat_2023/valis/serial_rigid.py +++ b/examples/acrobat_2023/valis/serial_rigid.py @@ -961,7 +961,7 @@ def align_to_prev_check_reflections(self, transformer, feature_detector, matcher else: filter_kwargs = None - # Estimate curent error without reflections. Don't need to re-detect and match features + # Estimate current error without reflections. Don't need to re-detect and match features to_prev_match_info = img_obj.match_dict[prev_img_obj] transformer.estimate(to_prev_match_info.matched_kp2_xy, to_prev_match_info.matched_kp1_xy) unreflected_warped_src_xy = warp_tools.warp_xy(to_prev_match_info.matched_kp1_xy, transformer.params) From 7bfeaf5cec512e172fd25353950434c97a971cc4 Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Fri, 6 Mar 2026 00:23:08 +0900 Subject: [PATCH 088/152] Fix typo: n_comparisions -> n_comparisons --- examples/acrobat_2023/valis/serial_rigid.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/acrobat_2023/valis/serial_rigid.py b/examples/acrobat_2023/valis/serial_rigid.py index 195d43b1..cd4488ff 100644 --- a/examples/acrobat_2023/valis/serial_rigid.py +++ b/examples/acrobat_2023/valis/serial_rigid.py @@ -586,8 +586,8 @@ def match_imgs(self, matcher_obj, keep_unfiltered=False, qt_emitter=None): """ - n_comparisions = int((self.size*(self.size-1))/2) - pbar = tqdm(total=n_comparisions) + n_comparisons = int((self.size*(self.size-1))/2) + pbar = tqdm(total=n_comparisons) def match_img_obj(i): From 203544c3247b339f9f033989263e03c224787eea Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Fri, 6 Mar 2026 00:23:26 +0900 Subject: [PATCH 089/152] Fix typo: metrric -> metric --- examples/acrobat_2023/valis/serial_rigid.py | 2 +- valis/serial_rigid.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/acrobat_2023/valis/serial_rigid.py b/examples/acrobat_2023/valis/serial_rigid.py index cd4488ff..ac535f92 100644 --- a/examples/acrobat_2023/valis/serial_rigid.py +++ b/examples/acrobat_2023/valis/serial_rigid.py @@ -838,7 +838,7 @@ def build_metric_matrix(self, metric="n_matches"): Parameters ---------- metric: str - Name of metrric to use. If 'distance' that the distances and + Name of metric to use. If 'distance' that the distances and similiarities calculated during feature matching will be used. If 'n_matches', then the number of matches will be used for similariy, and 1/n_matches for distance. diff --git a/valis/serial_rigid.py b/valis/serial_rigid.py index 3216e300..e3c20e23 100644 --- a/valis/serial_rigid.py +++ b/valis/serial_rigid.py @@ -1046,7 +1046,7 @@ def build_metric_matrix(self, metric="n_matches"): Parameters ---------- metric: str - Name of metrric to use. If 'distance' that the distances and + Name of metric to use. If 'distance' that the distances and similiarities calculated during feature matching will be used. If 'n_matches', then the number of matches will be used for similariy, and 1/n_matches for distance. From 93ef29c778b1a1bc477850dc443e730f5718406e Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Fri, 6 Mar 2026 00:23:46 +0900 Subject: [PATCH 090/152] Fix typo: matrics -> metrics --- examples/acrobat_2023/valis/serial_rigid.py | 2 +- valis/serial_rigid.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/acrobat_2023/valis/serial_rigid.py b/examples/acrobat_2023/valis/serial_rigid.py index ac535f92..2c187f62 100644 --- a/examples/acrobat_2023/valis/serial_rigid.py +++ b/examples/acrobat_2023/valis/serial_rigid.py @@ -287,7 +287,7 @@ class SerialRigidRegistrar(object): Registration is conducted by first detecting features in all images. Features are then matched between images, which are then used to construct a distance matrix, D. D is then sorted such that the most similar images - are adjcent to one another. The rigid transformation matrics are then found to + are adjcent to one another. The rigid transformation metrics are then found to align each image with the previous image. Optionally, optimization can be performed to improve the alignments, although the "optimized" matrix will be discarded if it increases the distances between matched features. diff --git a/valis/serial_rigid.py b/valis/serial_rigid.py index e3c20e23..a185b15d 100644 --- a/valis/serial_rigid.py +++ b/valis/serial_rigid.py @@ -307,7 +307,7 @@ class SerialRigidRegistrar(object): Registration is conducted by first detecting features in all images. Features are then matched between images, which are then used to construct a distance matrix, D. D is then sorted such that the most similar images - are adjcent to one another. The rigid transformation matrics are then found to + are adjcent to one another. The rigid transformation metrics are then found to align each image with the previous image. Optionally, optimization can be performed to improve the alignments, although the "optimized" matrix will be discarded if it increases the distances between matched features. From 1b13abe1876f550d3505ba5bac782cfcb0f0e41a Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Fri, 6 Mar 2026 00:24:30 +0900 Subject: [PATCH 091/152] Fix typo: aleady_sorted -> already_sorted --- examples/acrobat_2023/valis/registration.py | 2 +- examples/acrobat_2023/valis/serial_rigid.py | 6 +++--- valis/registration.py | 2 +- valis/serial_rigid.py | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/examples/acrobat_2023/valis/registration.py b/examples/acrobat_2023/valis/registration.py index 03419f8b..e8921af0 100644 --- a/examples/acrobat_2023/valis/registration.py +++ b/examples/acrobat_2023/valis/registration.py @@ -2822,7 +2822,7 @@ def rigid_register_partial(self, tform_dict=None): print("\n======== Matching images\n") - if rigid_registrar.aleady_sorted: + if rigid_registrar.already_sorted: rigid_registrar.match_sorted_imgs(matcher, keep_unfiltered=False) for i, img_obj in enumerate(rigid_registrar.img_obj_list): diff --git a/examples/acrobat_2023/valis/serial_rigid.py b/examples/acrobat_2023/valis/serial_rigid.py index 2c187f62..2c2207c7 100644 --- a/examples/acrobat_2023/valis/serial_rigid.py +++ b/examples/acrobat_2023/valis/serial_rigid.py @@ -306,7 +306,7 @@ class SerialRigidRegistrar(object): contains methods for this, but the user may want/need to use other methods. - aleady_sorted: bool, optional + already_sorted: bool, optional Whether or not the order of images already known. If True, the file names should start with ascending numbers, with the first image file having the smallest number, and the last image file having the largest @@ -425,7 +425,7 @@ def __init__(self, img_dir, imgs_ordered=False, reference_img_f=None, """ self.img_dir = img_dir - self.aleady_sorted = imgs_ordered + self.already_sorted = imgs_ordered self.name = name self.img_file_list = get_image_files(img_dir, imgs_ordered=imgs_ordered) self.size = len(self.img_file_list) @@ -1538,7 +1538,7 @@ def register_images(img_dir, dst_dir=None, name="registrar", img_obj.desc = img_obj.desc[features_in_mask_idx, :] print("\n======== Matching images\n") - if registrar.aleady_sorted: + if registrar.already_sorted: registrar.match_sorted_imgs(matcher, keep_unfiltered=False, qt_emitter=qt_emitter) diff --git a/valis/registration.py b/valis/registration.py index ada499ed..6b34e116 100644 --- a/valis/registration.py +++ b/valis/registration.py @@ -3247,7 +3247,7 @@ def rigid_register_partial(self, tform_dict=None): # print("\n======== Matching images\n") - if rigid_registrar.aleady_sorted: + if rigid_registrar.already_sorted: rigid_registrar.match_sorted_imgs(matcher_for_sorting, keep_unfiltered=False, valis_obj=self) for i, img_obj in enumerate(rigid_registrar.img_obj_list): diff --git a/valis/serial_rigid.py b/valis/serial_rigid.py index a185b15d..0793cade 100644 --- a/valis/serial_rigid.py +++ b/valis/serial_rigid.py @@ -326,7 +326,7 @@ class SerialRigidRegistrar(object): contains methods for this, but the user may want/need to use other methods. - aleady_sorted: bool, optional + already_sorted: bool, optional Whether or not the order of images already known. If True, the file names should start with ascending numbers, with the first image file having the smallest number, and the last image file having the largest @@ -445,7 +445,7 @@ def __init__(self, img_dir, imgs_ordered=False, reference_img_f=None, """ self.img_dir = img_dir - self.aleady_sorted = imgs_ordered + self.already_sorted = imgs_ordered self.name = name self.img_file_list = get_image_files(img_dir, imgs_ordered=imgs_ordered) self.size = len(self.img_file_list) @@ -1792,7 +1792,7 @@ def register_images(img_dir, dst_dir=None, name="registrar", img_obj.desc = img_obj.desc[features_in_mask_idx, :] # print("\n======== Matching images\n") - if registrar.aleady_sorted: + if registrar.already_sorted: registrar.match_sorted_imgs(matcher_for_sorting, keep_unfiltered=False, valis_obj=valis_obj, qt_emitter=qt_emitter) From d3e7fabc8f81af7e16336df1141558dc8546364e Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Fri, 6 Mar 2026 00:25:12 +0900 Subject: [PATCH 092/152] Fix typo: Indicies -> Indices --- examples/acrobat_2023/valis/serial_rigid.py | 2 +- valis/serial_rigid.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/acrobat_2023/valis/serial_rigid.py b/examples/acrobat_2023/valis/serial_rigid.py index 2c2207c7..eb2cc563 100644 --- a/examples/acrobat_2023/valis/serial_rigid.py +++ b/examples/acrobat_2023/valis/serial_rigid.py @@ -668,7 +668,7 @@ def get_common_desc(self, current_img_obj, neighbor_obj, nf_kp_idx): Parameters ---------- nf_kp_idx : ndarray - Indicies of already matched keypoints that were found after + Indices of already matched keypoints that were found after neighbonr filtering """ diff --git a/valis/serial_rigid.py b/valis/serial_rigid.py index 0793cade..b7a979bf 100644 --- a/valis/serial_rigid.py +++ b/valis/serial_rigid.py @@ -627,7 +627,7 @@ def get_common_desc(self, current_img_obj, neighbor_obj, nf_kp_idx): Parameters ---------- nf_kp_idx : ndarray - Indicies of already matched keypoints that were found after + Indices of already matched keypoints that were found after neighbonr filtering """ From cb3eba55e261b1068ad7b7798e088dd2f624b961 Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Fri, 6 Mar 2026 00:25:35 +0900 Subject: [PATCH 093/152] Fix typo: neighbonr -> neighbor --- examples/acrobat_2023/valis/serial_rigid.py | 2 +- valis/serial_rigid.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/acrobat_2023/valis/serial_rigid.py b/examples/acrobat_2023/valis/serial_rigid.py index eb2cc563..a7621be6 100644 --- a/examples/acrobat_2023/valis/serial_rigid.py +++ b/examples/acrobat_2023/valis/serial_rigid.py @@ -669,7 +669,7 @@ def get_common_desc(self, current_img_obj, neighbor_obj, nf_kp_idx): ---------- nf_kp_idx : ndarray Indices of already matched keypoints that were found after - neighbonr filtering + neighbor filtering """ neighbor_match_info12 = current_img_obj.match_dict[neighbor_obj] diff --git a/valis/serial_rigid.py b/valis/serial_rigid.py index b7a979bf..343427b3 100644 --- a/valis/serial_rigid.py +++ b/valis/serial_rigid.py @@ -628,7 +628,7 @@ def get_common_desc(self, current_img_obj, neighbor_obj, nf_kp_idx): ---------- nf_kp_idx : ndarray Indices of already matched keypoints that were found after - neighbonr filtering + neighbor filtering """ neighbor_match_info12 = current_img_obj.match_dict[neighbor_obj] From d0d6243c8dd285034648122041b3e13360c26d7b Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Fri, 6 Mar 2026 00:25:56 +0900 Subject: [PATCH 094/152] Fix typo: betweewn -> between --- examples/acrobat_2023/valis/serial_rigid.py | 2 +- valis/serial_rigid.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/acrobat_2023/valis/serial_rigid.py b/examples/acrobat_2023/valis/serial_rigid.py index a7621be6..d98ca6db 100644 --- a/examples/acrobat_2023/valis/serial_rigid.py +++ b/examples/acrobat_2023/valis/serial_rigid.py @@ -345,7 +345,7 @@ class SerialRigidRegistrar(object): unsorted_distance_mat : ndarray Distance matrix with shape (N, N), where each element is the - disimilariy betweewn each pair of the N images. The order of + disimilariy between each pair of the N images. The order of rows and columns reflects the order in which the images were read. This matrix is used to order the images the Z-stack. diff --git a/valis/serial_rigid.py b/valis/serial_rigid.py index 343427b3..7ec3bf2e 100644 --- a/valis/serial_rigid.py +++ b/valis/serial_rigid.py @@ -365,7 +365,7 @@ class SerialRigidRegistrar(object): unsorted_distance_mat : ndarray Distance matrix with shape (N, N), where each element is the - disimilariy betweewn each pair of the N images. The order of + disimilariy between each pair of the N images. The order of rows and columns reflects the order in which the images were read. This matrix is used to order the images the Z-stack. From d03e14bc9c23f05396f09fd288d70c6a201f5652 Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Fri, 6 Mar 2026 00:26:19 +0900 Subject: [PATCH 095/152] Fix typo: feautres -> features --- examples/acrobat_2023/valis/serial_rigid.py | 2 +- valis/serial_rigid.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/acrobat_2023/valis/serial_rigid.py b/examples/acrobat_2023/valis/serial_rigid.py index d98ca6db..60c34011 100644 --- a/examples/acrobat_2023/valis/serial_rigid.py +++ b/examples/acrobat_2023/valis/serial_rigid.py @@ -329,7 +329,7 @@ class SerialRigidRegistrar(object): distance_metric_type : str Name of the type of metric used to determine the dis/similarity between each pair of images. Despite the name, it could be "similarity" - if the Matcher object compares image feautres using a similarity + if the Matcher object compares image features using a similarity metric. In that case, similarities are converted to distances. img_obj_list : list diff --git a/valis/serial_rigid.py b/valis/serial_rigid.py index 7ec3bf2e..3b4355ed 100644 --- a/valis/serial_rigid.py +++ b/valis/serial_rigid.py @@ -349,7 +349,7 @@ class SerialRigidRegistrar(object): distance_metric_type : str Name of the type of metric used to determine the dis/similarity between each pair of images. Despite the name, it could be "similarity" - if the Matcher object compares image feautres using a similarity + if the Matcher object compares image features using a similarity metric. In that case, similarities are converted to distances. img_obj_list : list From 5d343a3b7266caf6082e4fe3426ecbbb8093334c Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Fri, 6 Mar 2026 00:26:37 +0900 Subject: [PATCH 096/152] Fix typo: adjcent -> adjacent --- examples/acrobat_2023/valis/serial_rigid.py | 2 +- valis/serial_rigid.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/acrobat_2023/valis/serial_rigid.py b/examples/acrobat_2023/valis/serial_rigid.py index 60c34011..1d85b1e1 100644 --- a/examples/acrobat_2023/valis/serial_rigid.py +++ b/examples/acrobat_2023/valis/serial_rigid.py @@ -287,7 +287,7 @@ class SerialRigidRegistrar(object): Registration is conducted by first detecting features in all images. Features are then matched between images, which are then used to construct a distance matrix, D. D is then sorted such that the most similar images - are adjcent to one another. The rigid transformation metrics are then found to + are adjacent to one another. The rigid transformation metrics are then found to align each image with the previous image. Optionally, optimization can be performed to improve the alignments, although the "optimized" matrix will be discarded if it increases the distances between matched features. diff --git a/valis/serial_rigid.py b/valis/serial_rigid.py index 3b4355ed..ddca33ac 100644 --- a/valis/serial_rigid.py +++ b/valis/serial_rigid.py @@ -307,7 +307,7 @@ class SerialRigidRegistrar(object): Registration is conducted by first detecting features in all images. Features are then matched between images, which are then used to construct a distance matrix, D. D is then sorted such that the most similar images - are adjcent to one another. The rigid transformation metrics are then found to + are adjacent to one another. The rigid transformation metrics are then found to align each image with the previous image. Optionally, optimization can be performed to improve the alignments, although the "optimized" matrix will be discarded if it increases the distances between matched features. From edbe8de479d4f34965ec6fb646aa79fb20649e86 Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Fri, 6 Mar 2026 00:27:34 +0900 Subject: [PATCH 097/152] Fix typo: disimilariy -> dissimilarity --- examples/acrobat_2023/valis/serial_rigid.py | 2 +- valis/serial_rigid.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/acrobat_2023/valis/serial_rigid.py b/examples/acrobat_2023/valis/serial_rigid.py index 1d85b1e1..8e05224a 100644 --- a/examples/acrobat_2023/valis/serial_rigid.py +++ b/examples/acrobat_2023/valis/serial_rigid.py @@ -345,7 +345,7 @@ class SerialRigidRegistrar(object): unsorted_distance_mat : ndarray Distance matrix with shape (N, N), where each element is the - disimilariy between each pair of the N images. The order of + dissimilarity between each pair of the N images. The order of rows and columns reflects the order in which the images were read. This matrix is used to order the images the Z-stack. diff --git a/valis/serial_rigid.py b/valis/serial_rigid.py index ddca33ac..181af872 100644 --- a/valis/serial_rigid.py +++ b/valis/serial_rigid.py @@ -365,7 +365,7 @@ class SerialRigidRegistrar(object): unsorted_distance_mat : ndarray Distance matrix with shape (N, N), where each element is the - disimilariy between each pair of the N images. The order of + dissimilarity between each pair of the N images. The order of rows and columns reflects the order in which the images were read. This matrix is used to order the images the Z-stack. From 96084674f699aa7392e13e5a51cc8a636b3c3aed Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Fri, 6 Mar 2026 00:28:18 +0900 Subject: [PATCH 098/152] Fix typo: reorderd -> reordered --- examples/acrobat_2023/valis/serial_rigid.py | 2 +- valis/serial_rigid.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/acrobat_2023/valis/serial_rigid.py b/examples/acrobat_2023/valis/serial_rigid.py index 8e05224a..9fb9720e 100644 --- a/examples/acrobat_2023/valis/serial_rigid.py +++ b/examples/acrobat_2023/valis/serial_rigid.py @@ -350,7 +350,7 @@ class SerialRigidRegistrar(object): This matrix is used to order the images the Z-stack. distance_mat : ndarray - `unsorted_distance_mat` reorderd such that the most similar images + `unsorted_distance_mat` reordered such that the most similar images are adjacent to one another unsorted_similarity_mat : ndarray diff --git a/valis/serial_rigid.py b/valis/serial_rigid.py index 181af872..fbf51522 100644 --- a/valis/serial_rigid.py +++ b/valis/serial_rigid.py @@ -370,7 +370,7 @@ class SerialRigidRegistrar(object): This matrix is used to order the images the Z-stack. distance_mat : ndarray - `unsorted_distance_mat` reorderd such that the most similar images + `unsorted_distance_mat` reordered such that the most similar images are adjacent to one another unsorted_similarity_mat : ndarray From ff2a8d22f4f48794afde66efff38628377c1a205 Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Fri, 6 Mar 2026 00:28:47 +0900 Subject: [PATCH 099/152] Fix typo: similiarities -> similarities --- examples/acrobat_2023/valis/serial_rigid.py | 2 +- valis/serial_rigid.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/acrobat_2023/valis/serial_rigid.py b/examples/acrobat_2023/valis/serial_rigid.py index 9fb9720e..9ad01d7b 100644 --- a/examples/acrobat_2023/valis/serial_rigid.py +++ b/examples/acrobat_2023/valis/serial_rigid.py @@ -839,7 +839,7 @@ def build_metric_matrix(self, metric="n_matches"): ---------- metric: str Name of metric to use. If 'distance' that the distances and - similiarities calculated during feature matching will be used. + similarities calculated during feature matching will be used. If 'n_matches', then the number of matches will be used for similariy, and 1/n_matches for distance. diff --git a/valis/serial_rigid.py b/valis/serial_rigid.py index fbf51522..884c46b5 100644 --- a/valis/serial_rigid.py +++ b/valis/serial_rigid.py @@ -1047,7 +1047,7 @@ def build_metric_matrix(self, metric="n_matches"): ---------- metric: str Name of metric to use. If 'distance' that the distances and - similiarities calculated during feature matching will be used. + similarities calculated during feature matching will be used. If 'n_matches', then the number of matches will be used for similariy, and 1/n_matches for distance. From 7ff4c62c1b784476f4dc019f465de4c31d76b522 Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Fri, 6 Mar 2026 00:29:04 +0900 Subject: [PATCH 100/152] Fix typo: similariy -> similarity --- examples/acrobat_2023/valis/serial_rigid.py | 2 +- valis/serial_rigid.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/acrobat_2023/valis/serial_rigid.py b/examples/acrobat_2023/valis/serial_rigid.py index 9ad01d7b..f2eb14b1 100644 --- a/examples/acrobat_2023/valis/serial_rigid.py +++ b/examples/acrobat_2023/valis/serial_rigid.py @@ -841,7 +841,7 @@ def build_metric_matrix(self, metric="n_matches"): Name of metric to use. If 'distance' that the distances and similarities calculated during feature matching will be used. If 'n_matches', then the number of matches will be used for - similariy, and 1/n_matches for distance. + similarity, and 1/n_matches for distance. """ diff --git a/valis/serial_rigid.py b/valis/serial_rigid.py index 884c46b5..e690535c 100644 --- a/valis/serial_rigid.py +++ b/valis/serial_rigid.py @@ -1049,7 +1049,7 @@ def build_metric_matrix(self, metric="n_matches"): Name of metric to use. If 'distance' that the distances and similarities calculated during feature matching will be used. If 'n_matches', then the number of matches will be used for - similariy, and 1/n_matches for distance. + similarity, and 1/n_matches for distance. """ From 763847fd1074a17059e152eddb9c3d83df0cb95c Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Fri, 6 Mar 2026 00:29:29 +0900 Subject: [PATCH 101/152] Fix typo: neighgbors -> neighbors --- examples/acrobat_2023/valis/serial_rigid.py | 2 +- valis/serial_rigid.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/acrobat_2023/valis/serial_rigid.py b/examples/acrobat_2023/valis/serial_rigid.py index f2eb14b1..a1adb388 100644 --- a/examples/acrobat_2023/valis/serial_rigid.py +++ b/examples/acrobat_2023/valis/serial_rigid.py @@ -253,7 +253,7 @@ def __init__(self, image, img_f, img_id, name): def reduce(self, prev_img_obj, next_img_obj): """Reduce amount of info stored, which can take up a lot of space. - No longer need all descriptors. Only keep match info for neighgbors + No longer need all descriptors. Only keep match info for neighbors Parameters ---------- diff --git a/valis/serial_rigid.py b/valis/serial_rigid.py index e690535c..9ffac6d0 100644 --- a/valis/serial_rigid.py +++ b/valis/serial_rigid.py @@ -273,7 +273,7 @@ def __init__(self, image, img_f, img_id, name): def reduce(self, prev_img_obj, next_img_obj): """Reduce amount of info stored, which can take up a lot of space. - No longer need all descriptors. Only keep match info for neighgbors + No longer need all descriptors. Only keep match info for neighbors Parameters ---------- From 531690c8b9a3ea6af0f13624045cb910ce6f52cb Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Fri, 6 Mar 2026 00:29:56 +0900 Subject: [PATCH 102/152] Fix typo: relfections -> reflections --- examples/acrobat_2023/valis/serial_rigid.py | 2 +- valis/serial_rigid.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/acrobat_2023/valis/serial_rigid.py b/examples/acrobat_2023/valis/serial_rigid.py index a1adb388..514e9fa2 100644 --- a/examples/acrobat_2023/valis/serial_rigid.py +++ b/examples/acrobat_2023/valis/serial_rigid.py @@ -1038,7 +1038,7 @@ def align_to_prev_check_reflections(self, transformer, feature_detector, matcher ref_x, ref_y = best_reflect_M[[0, 1], [0, 1]] < 0 if ref_x or ref_y: - msg = f'detected relfections between {img_obj.name} and {prev_img_obj.name} along the' + msg = f'detected reflections between {img_obj.name} and {prev_img_obj.name} along the' if ref_x and ref_y: msg = f'{msg} x and y axes' elif ref_x: diff --git a/valis/serial_rigid.py b/valis/serial_rigid.py index 9ffac6d0..82501d4c 100644 --- a/valis/serial_rigid.py +++ b/valis/serial_rigid.py @@ -1245,7 +1245,7 @@ def align_to_prev_check_reflections(self, transformer, matcher_obj, valis_obj=No ref_x, ref_y = best_reflect_M[[0, 1], [0, 1]] < 0 if ref_x or ref_y: - msg = f'detected relfections between {img_obj.name} and {prev_img_obj.name} along the' + msg = f'detected reflections between {img_obj.name} and {prev_img_obj.name} along the' if ref_x and ref_y: msg = f'{msg} x and y axes' elif ref_x: From f7334ca6b9936a5177e3f19265c6606a94892f56 Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Fri, 6 Mar 2026 00:30:22 +0900 Subject: [PATCH 103/152] Fix typo: transoformations -> transformations --- examples/acrobat_2023/valis/serial_rigid.py | 2 +- valis/serial_rigid.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/acrobat_2023/valis/serial_rigid.py b/examples/acrobat_2023/valis/serial_rigid.py index 514e9fa2..599156dd 100644 --- a/examples/acrobat_2023/valis/serial_rigid.py +++ b/examples/acrobat_2023/valis/serial_rigid.py @@ -1453,7 +1453,7 @@ def register_images(img_dir, dst_dir=None, name="registrar", affine_optimizer : AffineOptimizer object Object that will minimize a cost function to find the - optimal affine transoformations + optimal affine transformations imgs_ordered : bool Boolean defining whether or not the order of images in img_dir diff --git a/valis/serial_rigid.py b/valis/serial_rigid.py index 82501d4c..76123225 100644 --- a/valis/serial_rigid.py +++ b/valis/serial_rigid.py @@ -1696,7 +1696,7 @@ def register_images(img_dir, dst_dir=None, name="registrar", affine_optimizer : AffineOptimizer object Object that will minimize a cost function to find the - optimal affine transoformations + optimal affine transformations imgs_ordered : bool Boolean defining whether or not the order of images in img_dir From 03dbc1b1af13503ad76e7af7fdd9f6fed7d79847 Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Fri, 6 Mar 2026 00:30:45 +0900 Subject: [PATCH 104/152] Fix typo: alginments -> alignments --- examples/acrobat_2023/valis/serial_rigid.py | 2 +- valis/serial_rigid.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/acrobat_2023/valis/serial_rigid.py b/examples/acrobat_2023/valis/serial_rigid.py index 599156dd..89b84b3f 100644 --- a/examples/acrobat_2023/valis/serial_rigid.py +++ b/examples/acrobat_2023/valis/serial_rigid.py @@ -1490,7 +1490,7 @@ def register_images(img_dir, dst_dir=None, name="registrar", Returns ------- registrar : SerialRigidRegistrar - SerialRigidRegistrar object contains general information about the alginments, + SerialRigidRegistrar object contains general information about the alignments, but also a list of Z-images. Each ZImage contains the warp information for an image in the stack, including the transformation matrices calculated at each step, keypoint poisions, image descriptors, and diff --git a/valis/serial_rigid.py b/valis/serial_rigid.py index 76123225..cb1f5eaa 100644 --- a/valis/serial_rigid.py +++ b/valis/serial_rigid.py @@ -1733,7 +1733,7 @@ def register_images(img_dir, dst_dir=None, name="registrar", Returns ------- registrar : SerialRigidRegistrar - SerialRigidRegistrar object contains general information about the alginments, + SerialRigidRegistrar object contains general information about the alignments, but also a list of Z-images. Each ZImage contains the warp information for an image in the stack, including the transformation matrices calculated at each step, keypoint poisions, image descriptors, and From f6ca7d49021be7113c1009a6dda52a0da4c2af6b Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Fri, 6 Mar 2026 00:31:04 +0900 Subject: [PATCH 105/152] Fix typo: poisions -> positions --- examples/acrobat_2023/valis/serial_rigid.py | 2 +- valis/serial_rigid.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/acrobat_2023/valis/serial_rigid.py b/examples/acrobat_2023/valis/serial_rigid.py index 89b84b3f..5eac3c1f 100644 --- a/examples/acrobat_2023/valis/serial_rigid.py +++ b/examples/acrobat_2023/valis/serial_rigid.py @@ -1493,7 +1493,7 @@ def register_images(img_dir, dst_dir=None, name="registrar", SerialRigidRegistrar object contains general information about the alignments, but also a list of Z-images. Each ZImage contains the warp information for an image in the stack, including the transformation matrices - calculated at each step, keypoint poisions, image descriptors, and + calculated at each step, keypoint positions, image descriptors, and matches with other images. See attributes from Zimage for more information. diff --git a/valis/serial_rigid.py b/valis/serial_rigid.py index cb1f5eaa..84201d43 100644 --- a/valis/serial_rigid.py +++ b/valis/serial_rigid.py @@ -1736,7 +1736,7 @@ def register_images(img_dir, dst_dir=None, name="registrar", SerialRigidRegistrar object contains general information about the alignments, but also a list of Z-images. Each ZImage contains the warp information for an image in the stack, including the transformation matrices - calculated at each step, keypoint poisions, image descriptors, and + calculated at each step, keypoint positions, image descriptors, and matches with other images. See attributes from Zimage for more information. From 2e84f374bc901e34d5d2c8888ab94f46d9a96e1e Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Fri, 6 Mar 2026 00:32:50 +0900 Subject: [PATCH 106/152] Insert determiners --- examples/acrobat_2023/valis/feature_detectors.py | 2 +- examples/acrobat_2023/valis/serial_rigid.py | 2 +- valis/feature_detectors.py | 2 +- valis/registration.py | 2 +- valis/serial_rigid.py | 2 +- valis/superglue_models/superpoint.py | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/acrobat_2023/valis/feature_detectors.py b/examples/acrobat_2023/valis/feature_detectors.py index 71c66ea1..182c4b2a 100644 --- a/examples/acrobat_2023/valis/feature_detectors.py +++ b/examples/acrobat_2023/valis/feature_detectors.py @@ -27,7 +27,7 @@ def filter_features(kp, desc, n_keep=MAX_FEATURES): - """Get keypoints with highest response + """Get keypoints with the highest response Parameters ---------- diff --git a/examples/acrobat_2023/valis/serial_rigid.py b/examples/acrobat_2023/valis/serial_rigid.py index 5eac3c1f..b501c5a4 100644 --- a/examples/acrobat_2023/valis/serial_rigid.py +++ b/examples/acrobat_2023/valis/serial_rigid.py @@ -870,7 +870,7 @@ def build_metric_matrix(self, metric="n_matches"): min_d = distance_mat.min() max_d = distance_mat.max() - # Make sure that image has highest similarity with itself + # Make sure that image has the highest similarity with itself similarity_mat[np.diag_indices_from(similarity_mat)] += max_s*0.01 # Scale metrics between 0 and 1 diff --git a/valis/feature_detectors.py b/valis/feature_detectors.py index e4aded4f..fb38536b 100644 --- a/valis/feature_detectors.py +++ b/valis/feature_detectors.py @@ -33,7 +33,7 @@ def filter_features(kp, desc, n_keep=MAX_FEATURES): - """Get keypoints with highest response + """Get keypoints with the highest response Parameters ---------- diff --git a/valis/registration.py b/valis/registration.py index 6b34e116..d88d53f0 100644 --- a/valis/registration.py +++ b/valis/registration.py @@ -630,7 +630,7 @@ def get_bg_color_px_pos(self, cspace="Hunter LAB"): mean_jab = preprocessing.rgb2jab(mean_rgb, cspace=cspace) mean_jch = colour.models.Jab_to_JCh(mean_jab) - # Find highest luminosity (L) and lowest colorfulness + # Find the highest luminosity (L) and lowest colorfulness bg_idx = np.lexsort([mean_jch[:, 1], -mean_jch[:, 0]])[0] # Last column sorted 1st. Returns ascending order self.bg_color = mean_rgb[bg_idx, :] diff --git a/valis/serial_rigid.py b/valis/serial_rigid.py index 84201d43..37ff989b 100644 --- a/valis/serial_rigid.py +++ b/valis/serial_rigid.py @@ -1078,7 +1078,7 @@ def build_metric_matrix(self, metric="n_matches"): min_d = distance_mat.min() max_d = distance_mat.max() - # Make sure that image has highest similarity with itself + # Make sure that image has the highest similarity with itself similarity_mat[np.diag_indices_from(similarity_mat)] += max_s*0.01 # Scale metrics between 0 and 1 diff --git a/valis/superglue_models/superpoint.py b/valis/superglue_models/superpoint.py index 7d22443d..7cf1c95c 100644 --- a/valis/superglue_models/superpoint.py +++ b/valis/superglue_models/superpoint.py @@ -184,7 +184,7 @@ def forward(self, data): remove_borders(k, s, self.config['remove_borders'], h*8, w*8) for k, s in zip(keypoints, scores)])) - # Keep the k keypoints with highest score + # Keep the k keypoints with the highest score if self.config['max_keypoints'] >= 0: keypoints, scores = list(zip(*[ top_k_keypoints(k, s, self.config['max_keypoints']) From 031cf0d1a84cac4aa46264454ddc504b44534b24 Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Fri, 6 Mar 2026 00:33:21 +0900 Subject: [PATCH 107/152] Remove redundant 'and's --- examples/acrobat_2023/valis/feature_detectors.py | 2 +- examples/acrobat_2023/valis/slide_io.py | 2 +- valis/feature_detectors.py | 2 +- valis/slide_io.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/acrobat_2023/valis/feature_detectors.py b/examples/acrobat_2023/valis/feature_detectors.py index 182c4b2a..0321a911 100644 --- a/examples/acrobat_2023/valis/feature_detectors.py +++ b/examples/acrobat_2023/valis/feature_detectors.py @@ -43,7 +43,7 @@ def filter_features(kp, desc, n_keep=MAX_FEATURES): Returns ------- - Keypoints and and corresponding descriptors that the n_keep highest + Keypoints and corresponding descriptors that the n_keep highest responses. """ diff --git a/examples/acrobat_2023/valis/slide_io.py b/examples/acrobat_2023/valis/slide_io.py index 712073ef..353faf6d 100644 --- a/examples/acrobat_2023/valis/slide_io.py +++ b/examples/acrobat_2023/valis/slide_io.py @@ -2310,7 +2310,7 @@ def get_slide_reader(src_f, series=None): Returns ------- reader: SlideReader - SlideReader class that can read the slide and and convert them to + SlideReader class that can read the slide and convert them to images or pyvips.Images at the specified level and series. They also contain a `MetaData` object that contains information about the slide, like dimensions at each level, physical units, etc... diff --git a/valis/feature_detectors.py b/valis/feature_detectors.py index fb38536b..4514901c 100644 --- a/valis/feature_detectors.py +++ b/valis/feature_detectors.py @@ -49,7 +49,7 @@ def filter_features(kp, desc, n_keep=MAX_FEATURES): Returns ------- - Keypoints and and corresponding descriptors that the n_keep highest + Keypoints and corresponding descriptors that the n_keep highest responses. """ diff --git a/valis/slide_io.py b/valis/slide_io.py index a240a428..c9a00623 100644 --- a/valis/slide_io.py +++ b/valis/slide_io.py @@ -2891,7 +2891,7 @@ def get_slide_reader(src_f, series=None): Returns ------- reader: SlideReader - SlideReader class that can read the slide and and convert them to + SlideReader class that can read the slide and convert them to images or pyvips.Images at the specified level and series. They also contain a `MetaData` object that contains information about the slide, like dimensions at each level, physical units, etc... From e827feed62a914e17fa94d48993d426e4027f86b Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Fri, 6 Mar 2026 00:34:37 +0900 Subject: [PATCH 108/152] Fix typo: corrdinates -> coordinates --- examples/acrobat_2023/valis/feature_detectors.py | 2 +- valis/feature_detectors.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/acrobat_2023/valis/feature_detectors.py b/examples/acrobat_2023/valis/feature_detectors.py index 0321a911..b9b829c6 100644 --- a/examples/acrobat_2023/valis/feature_detectors.py +++ b/examples/acrobat_2023/valis/feature_detectors.py @@ -146,7 +146,7 @@ def detect_and_compute(self, image, mask=None): Returns ------- kp : ndarry - (N, 2) array positions of keypoints in xy corrdinates for N + (N, 2) array positions of keypoints in xy coordinates for N keypoints desc : ndarry diff --git a/valis/feature_detectors.py b/valis/feature_detectors.py index 4514901c..eb71db2e 100644 --- a/valis/feature_detectors.py +++ b/valis/feature_detectors.py @@ -155,7 +155,7 @@ def _detect_and_compute(self, image, mask=None): Returns ------- kp : ndarry - (N, 2) array positions of keypoints in xy corrdinates for N + (N, 2) array positions of keypoints in xy coordinates for N keypoints desc : ndarry @@ -594,7 +594,7 @@ def _detect_and_compute(self, image, *args, **kwargs): Returns ------- kp : ndarry - (N, 2) array positions of keypoints in xy corrdinates for N + (N, 2) array positions of keypoints in xy coordinates for N keypoints desc : ndarry @@ -649,7 +649,7 @@ def _detect_and_compute(self, image, *args, **kwargs): Returns ------- kp : ndarry - (N, 2) array positions of keypoints in xy corrdinates for N + (N, 2) array positions of keypoints in xy coordinates for N keypoints desc : ndarry From da1974dd1be11df820dbb6e8c971cece7d0ab7bb Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Fri, 6 Mar 2026 00:37:43 +0900 Subject: [PATCH 109/152] Fix typo: ignnored -> ignored --- .../acrobat_2023/valis/affine_optimizer.py | 8 ++++---- .../valis/non_rigid_registrars.py | 20 +++++++++---------- .../acrobat_2023/valis/serial_non_rigid.py | 2 +- examples/acrobat_2023/valis/serial_rigid.py | 11 +++++----- valis/affine_optimizer.py | 8 ++++---- valis/non_rigid_registrars.py | 20 +++++++++---------- valis/serial_non_rigid.py | 2 +- 7 files changed, 36 insertions(+), 35 deletions(-) diff --git a/examples/acrobat_2023/valis/affine_optimizer.py b/examples/acrobat_2023/valis/affine_optimizer.py index 3ad4420c..630f6727 100644 --- a/examples/acrobat_2023/valis/affine_optimizer.py +++ b/examples/acrobat_2023/valis/affine_optimizer.py @@ -567,7 +567,7 @@ def setup(self, moving, fixed, mask, initial_M=None): Image moving is warped to align to mask : ndarray - 2D array having non-zero pixel values, where values of 0 are ignnored during registration + 2D array having non-zero pixel values, where values of 0 are ignored during registration initial_M : (3x3) array Initial transformation matrix @@ -628,7 +628,7 @@ def align(self, moving, fixed, mask, initial_M=None, moving_xy=None, fixed_xy=No Image moving is warped to align with mask : ndarray - 2D array having non-zero pixel values, where values of 0 are ignnored during registration + 2D array having non-zero pixel values, where values of 0 are ignored during registration initial_M : (3x3) array Initial transformation matrix @@ -813,7 +813,7 @@ def setup(self, moving, fixed, mask, initial_M=None, moving_xy=None, fixed_xy=No Image moving is warped to align to mask : ndarray - 2D array having non-zero pixel values, where values of 0 are ignnored during registration + 2D array having non-zero pixel values, where values of 0 are ignored during registration initial_M : (3x3) array Initial transformation matrix @@ -880,7 +880,7 @@ def align(self, moving, fixed, mask, initial_M=None, Image moving is warped to align with mask : ndarray - 2D array having non-zero pixel values, where values of 0 are ignnored during registration + 2D array having non-zero pixel values, where values of 0 are ignored during registration initial_M : (3x3) array Initial transformation matrix diff --git a/examples/acrobat_2023/valis/non_rigid_registrars.py b/examples/acrobat_2023/valis/non_rigid_registrars.py index 9627d9e5..dc633d06 100644 --- a/examples/acrobat_2023/valis/non_rigid_registrars.py +++ b/examples/acrobat_2023/valis/non_rigid_registrars.py @@ -46,7 +46,7 @@ class NonRigidRegistrar(object): mask : ndarray 2D array with shape (N,M) where non-zero pixel values are foreground, - and 0 is background, which is ignnored during registration. If None, + and 0 is background, which is ignored during registration. If None, then all non-zero pixels in images will be used to create the mask. shape : tuple @@ -142,7 +142,7 @@ def calc(self, moving_img, fixed_img, mask, *args, **kwargs): mask : ndarray 2D array with shape (N,M) where non-zero pixel values are foreground, - and 0 is background, which is ignnored during registration. If None, + and 0 is background, which is ignored during registration. If None, then all non-zero pixels in images will be used to create the mask. Returns @@ -188,7 +188,7 @@ def register(self, moving_img, fixed_img, mask=None, **kwargs): mask : ndarray 2D array with shape (N,M) where non-zero pixel values are foreground, - and 0 is background, which is ignnored during registration. If None, + and 0 is background, which is ignored during registration. If None, then all non-zero pixels in images will be used to create the mask. **kwargs : dict, optional @@ -337,7 +337,7 @@ class NonRigidRegistrarXY(NonRigidRegistrar): mask : ndarray 2D array with shape (N,M) where non-zero pixel values are foreground, - and 0 is background, which is ignnored during registration. If None, + and 0 is background, which is ignored during registration. If None, then all non-zero pixels in images will be used to create the mask. shape : tuple @@ -427,7 +427,7 @@ def register(self, moving_img, fixed_img, mask=None, moving_xy=None, mask : ndarray 2D array with shape (N,M) where non-zero pixel values are foreground, - and 0 is background, which is ignnored during registration. If None, + and 0 is background, which is ignored during registration. If None, then all non-zero pixels in images will be used to create the mask. moving_xy : ndarray, optional @@ -497,7 +497,7 @@ class NonRigidRegistrarGroupwise(NonRigidRegistrar): mask : ndarray 2D array with shape (N,M) where non-zero pixel values are foreground, - and 0 is background, which is ignnored during registration. If None, + and 0 is background, which is ignored during registration. If None, then all non-zero pixels in images will be used to create the mask. shape : tuple of int @@ -789,7 +789,7 @@ def run_elastix(self, moving_img, fixed_img, moving_xy=None, fixed_xy=None, mask : ndarray, optional 2D array with shape (N,M) where non-zero pixel values are - foreground, and 0 is background, which is ignnored during + foreground, and 0 is background, which is ignored during registration. If None, then all non-zero pixels in images will be used to create the mask. @@ -1032,7 +1032,7 @@ class SimpleElastixGroupwiseWarper(NonRigidRegistrarGroupwise): mask : ndarray 2D array with shape (N,M) where non-zero pixel values are foreground, - and 0 is background, which is ignnored during registration. If None, + and 0 is background, which is ignored during registration. If None, then all non-zero pixels in images will be used to create the mask. shape : tuple of int @@ -1170,7 +1170,7 @@ class NonRigidTileRegistrar(object): mask : pyvips.Image 2D array with shape (N,M) where non-zero pixel values are foreground, - and 0 is background, which is ignnored during registration. If None, + and 0 is background, which is ignored during registration. If None, then all non-zero pixels in images will be used to create the mask. shape : tuple @@ -1390,7 +1390,7 @@ def register(self, moving_img, fixed_img, mask=None, non_rigid_registrar_cls=Opt mask : ndarray, pyvips.Image 2D array with shape (N,M) where non-zero pixel values are foreground, - and 0 is background, which is ignnored during registration. If None, + and 0 is background, which is ignored during registration. If None, then all non-zero pixels in images will be used to create the mask. non_rigid_registrar_cls : NonRigidRegistrar, optional diff --git a/examples/acrobat_2023/valis/serial_non_rigid.py b/examples/acrobat_2023/valis/serial_non_rigid.py index 588f1d37..c5f09a5f 100644 --- a/examples/acrobat_2023/valis/serial_non_rigid.py +++ b/examples/acrobat_2023/valis/serial_non_rigid.py @@ -382,7 +382,7 @@ def calc_deformation(self, registered_fixed_image, non_rigid_reg_class, mask : ndarray, optional 2D array with shape (P,Q) where non-zero pixel values are foreground, - and 0 is background, which is ignnored during registration. If None, + and 0 is background, which is ignored during registration. If None, then all non-zero pixels in images will be used to create the mask. """ diff --git a/examples/acrobat_2023/valis/serial_rigid.py b/examples/acrobat_2023/valis/serial_rigid.py index b501c5a4..62581bfb 100644 --- a/examples/acrobat_2023/valis/serial_rigid.py +++ b/examples/acrobat_2023/valis/serial_rigid.py @@ -665,11 +665,12 @@ def get_neighbor_matches_idx(self, img_obj, prev_img_obj, next_img_obj): def get_common_desc(self, current_img_obj, neighbor_obj, nf_kp_idx): """Get descriptors that correspond to filtered neighbor points - Parameters - ---------- - nf_kp_idx : ndarray - Indices of already matched keypoints that were found after - neighbor filtering + + Parameters + ---------- + nf_kp_idx : ndarray + Indices of already matched keypoints that were found after + neighbor filtering """ neighbor_match_info12 = current_img_obj.match_dict[neighbor_obj] diff --git a/valis/affine_optimizer.py b/valis/affine_optimizer.py index ccbc0188..b2a4fe71 100644 --- a/valis/affine_optimizer.py +++ b/valis/affine_optimizer.py @@ -553,7 +553,7 @@ def setup(self, moving, fixed, mask, initial_M=None): Image moving is warped to align to mask : ndarray - 2D array having non-zero pixel values, where values of 0 are ignnored during registration + 2D array having non-zero pixel values, where values of 0 are ignored during registration initial_M : (3x3) array Initial transformation matrix @@ -614,7 +614,7 @@ def align(self, moving, fixed, mask, initial_M=None, moving_xy=None, fixed_xy=No Image moving is warped to align with mask : ndarray - 2D array having non-zero pixel values, where values of 0 are ignnored during registration + 2D array having non-zero pixel values, where values of 0 are ignored during registration initial_M : (3x3) array Initial transformation matrix @@ -799,7 +799,7 @@ def setup(self, moving, fixed, mask, initial_M=None, moving_xy=None, fixed_xy=No Image moving is warped to align to mask : ndarray - 2D array having non-zero pixel values, where values of 0 are ignnored during registration + 2D array having non-zero pixel values, where values of 0 are ignored during registration initial_M : (3x3) array Initial transformation matrix @@ -866,7 +866,7 @@ def align(self, moving, fixed, mask, initial_M=None, Image moving is warped to align with mask : ndarray - 2D array having non-zero pixel values, where values of 0 are ignnored during registration + 2D array having non-zero pixel values, where values of 0 are ignored during registration initial_M : (3x3) array Initial transformation matrix diff --git a/valis/non_rigid_registrars.py b/valis/non_rigid_registrars.py index cc1e9f9d..15076726 100644 --- a/valis/non_rigid_registrars.py +++ b/valis/non_rigid_registrars.py @@ -62,7 +62,7 @@ class NonRigidRegistrar(object): mask : ndarray 2D array with shape (N,M) where non-zero pixel values are foreground, - and 0 is background, which is ignnored during registration. If None, + and 0 is background, which is ignored during registration. If None, then all non-zero pixels in images will be used to create the mask. shape : tuple @@ -159,7 +159,7 @@ def calc(self, moving_img, fixed_img, mask, *args, **kwargs): mask : ndarray 2D array with shape (N,M) where non-zero pixel values are foreground, - and 0 is background, which is ignnored during registration. If None, + and 0 is background, which is ignored during registration. If None, then all non-zero pixels in images will be used to create the mask. Returns @@ -205,7 +205,7 @@ def register(self, moving_img, fixed_img, mask=None, **kwargs): mask : ndarray 2D array with shape (N,M) where non-zero pixel values are foreground, - and 0 is background, which is ignnored during registration. If None, + and 0 is background, which is ignored during registration. If None, then all non-zero pixels in images will be used to create the mask. **kwargs : dict, optional @@ -352,7 +352,7 @@ class NonRigidRegistrarXY(NonRigidRegistrar): mask : ndarray 2D array with shape (N,M) where non-zero pixel values are foreground, - and 0 is background, which is ignnored during registration. If None, + and 0 is background, which is ignored during registration. If None, then all non-zero pixels in images will be used to create the mask. shape : tuple @@ -442,7 +442,7 @@ def register(self, moving_img, fixed_img, mask=None, moving_xy=None, mask : ndarray 2D array with shape (N,M) where non-zero pixel values are foreground, - and 0 is background, which is ignnored during registration. If None, + and 0 is background, which is ignored during registration. If None, then all non-zero pixels in images will be used to create the mask. moving_xy : ndarray, optional @@ -512,7 +512,7 @@ class NonRigidRegistrarGroupwise(NonRigidRegistrar): mask : ndarray 2D array with shape (N,M) where non-zero pixel values are foreground, - and 0 is background, which is ignnored during registration. If None, + and 0 is background, which is ignored during registration. If None, then all non-zero pixels in images will be used to create the mask. shape : tuple of int @@ -804,7 +804,7 @@ def run_elastix(self, moving_img, fixed_img, moving_xy=None, fixed_xy=None, mask : ndarray, optional 2D array with shape (N,M) where non-zero pixel values are - foreground, and 0 is background, which is ignnored during + foreground, and 0 is background, which is ignored during registration. If None, then all non-zero pixels in images will be used to create the mask. @@ -1145,7 +1145,7 @@ class SimpleElastixGroupwiseWarper(NonRigidRegistrarGroupwise): mask : ndarray 2D array with shape (N,M) where non-zero pixel values are foreground, - and 0 is background, which is ignnored during registration. If None, + and 0 is background, which is ignored during registration. If None, then all non-zero pixels in images will be used to create the mask. shape : tuple of int @@ -1283,7 +1283,7 @@ class NonRigidTileRegistrar(object): mask : pyvips.Image 2D array with shape (N,M) where non-zero pixel values are foreground, - and 0 is background, which is ignnored during registration. If None, + and 0 is background, which is ignored during registration. If None, then all non-zero pixels in images will be used to create the mask. shape : tuple @@ -1505,7 +1505,7 @@ def register(self, moving_img, fixed_img, mask=None, non_rigid_registrar_cls=Opt mask : ndarray, pyvips.Image 2D array with shape (N,M) where non-zero pixel values are foreground, - and 0 is background, which is ignnored during registration. If None, + and 0 is background, which is ignored during registration. If None, then all non-zero pixels in images will be used to create the mask. non_rigid_registrar_cls : NonRigidRegistrar, optional diff --git a/valis/serial_non_rigid.py b/valis/serial_non_rigid.py index 1f26a9df..89cbf881 100644 --- a/valis/serial_non_rigid.py +++ b/valis/serial_non_rigid.py @@ -384,7 +384,7 @@ def calc_deformation(self, registered_fixed_image, non_rigid_reg_obj, mask : ndarray, optional 2D array with shape (P,Q) where non-zero pixel values are foreground, - and 0 is background, which is ignnored during registration. If None, + and 0 is background, which is ignored during registration. If None, then all non-zero pixels in images will be used to create the mask. """ From 9a797d48aee31941670e28d9ce5afacc3622230e Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Fri, 6 Mar 2026 00:38:12 +0900 Subject: [PATCH 110/152] Fix typo: atrributes -> attributes --- examples/acrobat_2023/valis/non_rigid_registrars.py | 2 +- valis/non_rigid_registrars.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/acrobat_2023/valis/non_rigid_registrars.py b/examples/acrobat_2023/valis/non_rigid_registrars.py index dc633d06..2363ba78 100644 --- a/examples/acrobat_2023/valis/non_rigid_registrars.py +++ b/examples/acrobat_2023/valis/non_rigid_registrars.py @@ -130,7 +130,7 @@ def apply_mask(self, mask): def calc(self, moving_img, fixed_img, mask, *args, **kwargs): """Calculate displacement fields - Can record subclass specific atrributes here too + Can record subclass specific attributes here too Parameters ---------- diff --git a/valis/non_rigid_registrars.py b/valis/non_rigid_registrars.py index 15076726..c2f69ea3 100644 --- a/valis/non_rigid_registrars.py +++ b/valis/non_rigid_registrars.py @@ -147,7 +147,7 @@ def apply_mask(self, mask): def calc(self, moving_img, fixed_img, mask, *args, **kwargs): """Calculate displacement fields - Can record subclass specific atrributes here too + Can record subclass specific attributes here too Parameters ---------- From 4ec2754cac8130d634177916f035dcfeed9a772b Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Fri, 6 Mar 2026 00:39:14 +0900 Subject: [PATCH 111/152] Fix typo: fescribed -> described --- examples/acrobat_2023/valis/non_rigid_registrars.py | 2 +- valis/non_rigid_registrars.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/acrobat_2023/valis/non_rigid_registrars.py b/examples/acrobat_2023/valis/non_rigid_registrars.py index 2363ba78..1a1822ba 100644 --- a/examples/acrobat_2023/valis/non_rigid_registrars.py +++ b/examples/acrobat_2023/valis/non_rigid_registrars.py @@ -964,7 +964,7 @@ def __init__(self, params=None, optical_flow_obj=None, Folded regions will then be removed using inpainting. If "regularize", folded regions will be detected and - regularized using the method fescribed in + regularized using the method described in "Foldover-free maps in 50 lines of code" Garanzha et al. 2021. If "None" then no smoothing will be applied. diff --git a/valis/non_rigid_registrars.py b/valis/non_rigid_registrars.py index c2f69ea3..493c4876 100644 --- a/valis/non_rigid_registrars.py +++ b/valis/non_rigid_registrars.py @@ -979,7 +979,7 @@ def __init__(self, params=None, optical_flow_obj=cv2.optflow.createOptFlow_DeepF Folded regions will then be removed using inpainting. If "regularize", folded regions will be detected and - regularized using the method fescribed in + regularized using the method described in "Foldover-free maps in 50 lines of code" Garanzha et al. 2021. If "None" then no smoothing will be applied. From cee1934a9c2d3a6ceab9b825e70a5a9ad86e0c2b Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Fri, 6 Mar 2026 00:41:04 +0900 Subject: [PATCH 112/152] Fix typo: Renmaing -> Renaming --- examples/acrobat_2023/valis/registration.py | 2 +- valis/registration.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/acrobat_2023/valis/registration.py b/examples/acrobat_2023/valis/registration.py index e8921af0..7f8943c0 100644 --- a/examples/acrobat_2023/valis/registration.py +++ b/examples/acrobat_2023/valis/registration.py @@ -2220,7 +2220,7 @@ def get_img_names(self, img_list): for j, p in enumerate(dup_paths): new_name = f"{names_dict[p]}_{str(j).zfill(z)}" - msg = f"Renmaing {p} to {new_name} in Valis.slide_dict)" + msg = f"Renaming {p} to {new_name} in Valis.slide_dict)" valtils.print_warning(msg) names_dict[p] = new_name diff --git a/valis/registration.py b/valis/registration.py index d88d53f0..8254e8f7 100644 --- a/valis/registration.py +++ b/valis/registration.py @@ -2443,7 +2443,7 @@ def get_img_names(self, img_list): for j, p in enumerate(dup_paths): new_name = f"{names_dict[p]}_{str(j).zfill(z)}" - msg = f"Renmaing {p} to {new_name} in Valis.slide_dict)" + msg = f"Renaming {p} to {new_name} in Valis.slide_dict)" valtils.print_warning(msg) names_dict[p] = new_name From ba3d5b8bcfc365774d2d697d15f4e4cdfe28690b Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Fri, 6 Mar 2026 00:42:05 +0900 Subject: [PATCH 113/152] Insert determiners --- examples/acrobat_2023/valis/registration.py | 2 +- examples/acrobat_2023/valis/slide_io.py | 4 ++-- valis/registration.py | 2 +- valis/slide_io.py | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/acrobat_2023/valis/registration.py b/examples/acrobat_2023/valis/registration.py index 7f8943c0..e8b3c756 100644 --- a/examples/acrobat_2023/valis/registration.py +++ b/examples/acrobat_2023/valis/registration.py @@ -2246,7 +2246,7 @@ def convert_imgs(self, series=None, reader_cls=None): """Convert slides to images and create dictionary of Slides. series : int, optional - Slide series to be read. If None, the series with largest image will be read + Slide series to be read. If None, the series with the largest image will be read reader_cls : SlideReader, optional Uninstantiated SlideReader class that will convert diff --git a/examples/acrobat_2023/valis/slide_io.py b/examples/acrobat_2023/valis/slide_io.py index 353faf6d..0b0c1e5f 100644 --- a/examples/acrobat_2023/valis/slide_io.py +++ b/examples/acrobat_2023/valis/slide_io.py @@ -856,7 +856,7 @@ def __init__(self, src_f, series=None, *args, **kwargs): img_areas = [np.multiply(*meta.slide_dimensions[0]) for meta in self.meta_list] series = np.argmax(img_areas) msg = (f"No series provided. " - f"Selecting series with largest image, " + f"Selecting series with the largest image, " f"which is series {series}") valtils.print_warning(msg, warning_type=None, rgb=valtils.Fore.GREEN) @@ -1927,7 +1927,7 @@ def __init__(self, src_f, series=None, *args, **kwargs): img_areas = [np.multiply(*meta.slide_dimensions[0]) for meta in self.meta_list] series = np.argmax(img_areas) msg = (f"No series provided. " - f"Selecting series with largest image, " + f"Selecting series with the largest image, " f"which is series {series}") valtils.print_warning(msg, warning_type=None, rgb=valtils.Fore.GREEN) diff --git a/valis/registration.py b/valis/registration.py index 8254e8f7..8445f7c1 100644 --- a/valis/registration.py +++ b/valis/registration.py @@ -2518,7 +2518,7 @@ def convert_imgs(self, series=None, reader_dict=None, reader_cls=None): """Convert slides to images and create dictionary of Slides. series : int, optional - Slide series to be read. If None, the series with largest image will be read + Slide series to be read. If None, the series with the largest image will be read reader_cls : SlideReader, optional Uninstantiated SlideReader class that will convert diff --git a/valis/slide_io.py b/valis/slide_io.py index c9a00623..5c946982 100644 --- a/valis/slide_io.py +++ b/valis/slide_io.py @@ -1210,7 +1210,7 @@ def __init__(self, src_f, series=None, *args, **kwargs): series = np.argmax(img_areas) if len(img_areas) > 1: msg = (f"No series provided. " - f"Selecting series with largest image, " + f"Selecting series with the largest image, " f"which is series {series}") valtils.print_warning(msg, warning_type=None, rgb=valtils.Fore.GREEN) @@ -2445,7 +2445,7 @@ def __init__(self, src_f, series=None, *args, **kwargs): series = np.argmax(img_areas) if len(img_areas) > 1: msg = (f"No series provided. " - f"Selecting series with largest image, " + f"Selecting series with the largest image, " f"which is series {series}") valtils.print_warning(msg, warning_type=None, rgb=valtils.Fore.GREEN) From 2d5f83e22667afc2ec8f975b768173a365934b70 Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Fri, 6 Mar 2026 00:42:41 +0900 Subject: [PATCH 114/152] Fix typo: yeild -> yield --- examples/acrobat_2023/valis/registration.py | 2 +- valis/registration.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/acrobat_2023/valis/registration.py b/examples/acrobat_2023/valis/registration.py index e8b3c756..fc81e01e 100644 --- a/examples/acrobat_2023/valis/registration.py +++ b/examples/acrobat_2023/valis/registration.py @@ -1837,7 +1837,7 @@ def __init__(self, src_dir, dst_dir, series=None, name=None, image_type=None, max_non_rigid_registration_dim_px : int, optional Maximum width or height of images used for non-rigid registration. - Larger values may yeild more accurate results, at the expense of + Larger values may yield more accurate results, at the expense of speed and memory. There is also a practical limit, as the specified size may be too large to fit in memory. diff --git a/valis/registration.py b/valis/registration.py index 8445f7c1..3ef14eca 100644 --- a/valis/registration.py +++ b/valis/registration.py @@ -1972,7 +1972,7 @@ def __init__(self, src_dir, dst_dir, series=None, name=None, image_type=None, max_non_rigid_registration_dim_px : int, optional Maximum width or height of images used for non-rigid registration. - Larger values may yeild more accurate results, at the expense of + Larger values may yield more accurate results, at the expense of speed and memory. There is also a practical limit, as the specified size may be too large to fit in memory. From 7a3c4dfa6dc68d6f080433999a05b996db1daeb8 Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Fri, 6 Mar 2026 00:43:49 +0900 Subject: [PATCH 115/152] Fix typo: ImageProcesser -> ImageProcessor --- .../valis/non_rigid_registrars.py | 4 +-- examples/acrobat_2023/valis/preprocessing.py | 24 +++++++-------- examples/acrobat_2023/valis/registration.py | 24 +++++++-------- valis/micro_rigid_registrar.py | 8 ++--- valis/non_rigid_registrars.py | 4 +-- valis/preprocessing.py | 30 +++++++++---------- valis/registration.py | 30 +++++++++---------- 7 files changed, 62 insertions(+), 62 deletions(-) diff --git a/examples/acrobat_2023/valis/non_rigid_registrars.py b/examples/acrobat_2023/valis/non_rigid_registrars.py index 1a1822ba..7708d823 100644 --- a/examples/acrobat_2023/valis/non_rigid_registrars.py +++ b/examples/acrobat_2023/valis/non_rigid_registrars.py @@ -1397,8 +1397,8 @@ def register(self, moving_img, fixed_img, mask=None, non_rigid_registrar_cls=Opt Uninstantiated NonRigidRegistrar class that will be used to calculate the deformation fields between images. - processing_cls : preprocessing.ImageProcesser, optional - preprocessing.ImageProcesser used to process the images + processing_cls : preprocessing.ImageProcessor, optional + preprocessing.ImageProcessor used to process the images processing_kwargs : dict Dictionary of keyword arguments to be passed to `processing_cls` diff --git a/examples/acrobat_2023/valis/preprocessing.py b/examples/acrobat_2023/valis/preprocessing.py index 1de3ee54..ba282c07 100644 --- a/examples/acrobat_2023/valis/preprocessing.py +++ b/examples/acrobat_2023/valis/preprocessing.py @@ -18,18 +18,18 @@ DEFAULT_COLOR_STD_C = 0.2 # cam16-ucs -class ImageProcesser(object): +class ImageProcessor(object): """Process images for registration - `ImageProcesser` sub-classes processes images to single channel + `ImageProcessor` sub-classes processes images to single channel images which are then used in image registration. - Each `ImageProcesser` is initialized with an image, the path to the + Each `ImageProcessor` is initialized with an image, the path to the image, the pyramid level, and the series number. These values will be set during the registration process. - `ImageProcesser` must also have a `process_image` method, which is - called during registration. As `ImageProcesser` has the image and + `ImageProcessor` must also have a `process_image` method, which is + called during registration. As `ImageProcessor` has the image and its relevant information (filename, level, series) as attributes, it should be able to access and modify the image as needed. However, one can also pass extra args and kwargs to `process_image`. As such, @@ -91,7 +91,7 @@ def process_image(self, *args, **kwargs): """ -class ChannelGetter(ImageProcesser): +class ChannelGetter(ImageProcessor): """Select channel from image """ @@ -127,7 +127,7 @@ def process_image(self, channel="dapi", adaptive_eq=True, *args, **kwaargs): return chnl -class ColorfulStandardizer(ImageProcesser): +class ColorfulStandardizer(ImageProcessor): """Standardize the colorfulness of the image """ @@ -156,7 +156,7 @@ def process_image(self, c=DEFAULT_COLOR_STD_C, invert=True, adaptive_eq=False, * return processed_img -class Luminosity(ImageProcesser): +class Luminosity(ImageProcessor): """Get luminosity of an RGB image """ @@ -179,7 +179,7 @@ def process_image(self, *args, **kwaargs): return processed_img -class BgColorDistance(ImageProcesser): +class BgColorDistance(ImageProcessor): """Calculate distance between each pixel and the background color """ @@ -202,7 +202,7 @@ def process_image(self, brightness_q=0.99, *args, **kwargs): return processed_img -class StainFlattener(ImageProcesser): +class StainFlattener(ImageProcessor): def __init__(self, image, src_f, level, series, *args, **kwargs): super().__init__(image=image, src_f=src_f, level=level, series=series, *args, **kwargs) @@ -308,7 +308,7 @@ def process_image(self, n_stains=100, q=95, with_mask=True, adaptive_eq=True): return processed_img -class Gray(ImageProcesser): +class Gray(ImageProcessor): """Get luminosity of an RGB image """ @@ -330,7 +330,7 @@ def process_image(self, *args, **kwaargs): return processed_img -class HEDeconvolution(ImageProcesser): +class HEDeconvolution(ImageProcessor): """Normalize staining appearance of hematoxylin and eosin (H&E) stained image and get the H or E deconvolution image. diff --git a/examples/acrobat_2023/valis/registration.py b/examples/acrobat_2023/valis/registration.py index fc81e01e..029e0977 100644 --- a/examples/acrobat_2023/valis/registration.py +++ b/examples/acrobat_2023/valis/registration.py @@ -2420,15 +2420,15 @@ def create_img_processor_dict(self, brightfield_processing_cls=DEFAULT_BRIGHTFIE Parameters ---------- - brightfield_processing_cls : ImageProcesser - ImageProcesser to pre-process brightfield images to make them look as similar as possible. + brightfield_processing_cls : ImageProcessor + ImageProcessor to pre-process brightfield images to make them look as similar as possible. Should return a single channel uint8 image. brightfield_processing_kwargs : dict Dictionary of keyword arguments to be passed to `brightfield_processing_cls` - if_processing_cls : ImageProcesser - ImageProcesser to pre-process immunofluorescence images to make them look as similar as possible. + if_processing_cls : ImageProcessor + ImageProcessor to pre-process immunofluorescence images to make them look as similar as possible. Should return a single channel uint8 image. if_processing_kwargs : dict @@ -3954,15 +3954,15 @@ def register(self, brightfield_processing_cls=DEFAULT_BRIGHTFIELD_CLASS, Parameters ---------- - brightfield_processing_cls : preprocessing.ImageProcesser - preprocessing.ImageProcesser used to pre-process brightfield images to make + brightfield_processing_cls : preprocessing.ImageProcessor + preprocessing.ImageProcessor used to pre-process brightfield images to make them look as similar as possible. brightfield_processing_kwargs : dict Dictionary of keyword arguments to be passed to `brightfield_processing_cls` - if_processing_cls : preprocessing.ImageProcesser - preprocessing.ImageProcesser used to pre-process immunofluorescence images + if_processing_cls : preprocessing.ImageProcessor + preprocessing.ImageProcessor used to pre-process immunofluorescence images to make them look as similar as possible. if_processing_kwargs : dict @@ -4129,15 +4129,15 @@ def register_micro(self, brightfield_processing_cls=DEFAULT_BRIGHTFIELD_CLASS, Parameters ---------- - brightfield_processing_cls : preprocessing.ImageProcesser - preprocessing.ImageProcesser used to pre-process brightfield images to make + brightfield_processing_cls : preprocessing.ImageProcessor + preprocessing.ImageProcessor used to pre-process brightfield images to make them look as similar as possible. brightfield_processing_kwargs : dict Dictionary of keyword arguments to be passed to `brightfield_processing_cls` - if_processing_cls : preprocessing.ImageProcesser - preprocessing.ImageProcesser used to pre-process immunofluorescence images + if_processing_cls : preprocessing.ImageProcessor + preprocessing.ImageProcessor used to pre-process immunofluorescence images to make them look as similar as possible. if_processing_kwargs : dict diff --git a/valis/micro_rigid_registrar.py b/valis/micro_rigid_registrar.py index 9ab5f42e..b918c9cb 100644 --- a/valis/micro_rigid_registrar.py +++ b/valis/micro_rigid_registrar.py @@ -169,15 +169,15 @@ def register(self, Parameters ---------- - brightfield_processing_cls : ImageProcesser - ImageProcesser to pre-process brightfield images to make them look as similar as possible. + brightfield_processing_cls : ImageProcessor + ImageProcessor to pre-process brightfield images to make them look as similar as possible. Should return a single channel uint8 image. brightfield_processing_kwargs : dict Dictionary of keyword arguments to be passed to `brightfield_processing_cls` - if_processing_cls : ImageProcesser - ImageProcesser to pre-process immunofluorescence images to make them look as similar as possible. + if_processing_cls : ImageProcessor + ImageProcessor to pre-process immunofluorescence images to make them look as similar as possible. Should return a single channel uint8 image. if_processing_kwargs : dict diff --git a/valis/non_rigid_registrars.py b/valis/non_rigid_registrars.py index 493c4876..6a0abaee 100644 --- a/valis/non_rigid_registrars.py +++ b/valis/non_rigid_registrars.py @@ -1512,8 +1512,8 @@ def register(self, moving_img, fixed_img, mask=None, non_rigid_registrar_cls=Opt Uninstantiated NonRigidRegistrar class that will be used to calculate the deformation fields between images. - processing_cls : preprocessing.ImageProcesser, optional - preprocessing.ImageProcesser used to process the images + processing_cls : preprocessing.ImageProcessor, optional + preprocessing.ImageProcessor used to process the images processing_kwargs : dict Dictionary of keyword arguments to be passed to `processing_cls` diff --git a/valis/preprocessing.py b/valis/preprocessing.py index 7251361c..89c365dd 100644 --- a/valis/preprocessing.py +++ b/valis/preprocessing.py @@ -31,18 +31,18 @@ DEFAULT_COLOR_STD_C = 0.2 # cam16-ucs -class ImageProcesser(object): +class ImageProcessor(object): """Process images for registration - `ImageProcesser` sub-classes processes images to single channel + `ImageProcessor` sub-classes processes images to single channel images which are then used in image registration. - Each `ImageProcesser` is initialized with an image, the path to the + Each `ImageProcessor` is initialized with an image, the path to the image, the pyramid level, and the series number. These values will be set during the registration process. - `ImageProcesser` must also have a `process_image` method, which is - called during registration. As `ImageProcesser` has the image and + `ImageProcessor` must also have a `process_image` method, which is + called during registration. As `ImageProcessor` has the image and its relevant information (filename, level, series) as attributes, it should be able to access and modify the image as needed. However, one can also pass extra args and kwargs to `process_image`. As such, @@ -117,7 +117,7 @@ def process_image(self, *args, **kwargs): """ -class ChannelGetter(ImageProcesser): +class ChannelGetter(ImageProcessor): """Select channel from image """ @@ -153,7 +153,7 @@ def process_image(self, channel="dapi", adaptive_eq=True, invert=False, *args, * return chnl -class ColorfulStandardizer(ImageProcesser): +class ColorfulStandardizer(ImageProcessor): """Standardize the colorfulness of the image """ @@ -182,7 +182,7 @@ def process_image(self, c=DEFAULT_COLOR_STD_C, invert=True, adaptive_eq=False, * return processed_img -class JCDist(ImageProcesser): +class JCDist(ImageProcessor): def __init__(self, image, src_f, level, series, *args, **kwargs): super().__init__(image=image, src_f=src_f, level=level, series=series, *args, **kwargs) @@ -207,7 +207,7 @@ def process_image(self, p=99, metric="euclidean", adaptive_eq=True, *args, **kwa return processed -class OD(ImageProcesser): +class OD(ImageProcessor): """Convert the image from RGB to optical density (OD) and calculate pixel norms. """ @@ -244,7 +244,7 @@ def process_image(self, adaptive_eq=False, p=95, *args, **kwargs): return processed -class ColorDeconvolver(ImageProcesser): +class ColorDeconvolver(ImageProcessor): def __init__(self, image, src_f, level, series, *args, **kwargs): super().__init__(image=image, src_f=src_f, level=level, series=series, *args, **kwargs) @@ -312,7 +312,7 @@ def process_image(self, cspace="JzAzBz", method="similarity", adaptive_eq=False, return processed -class Luminosity(ImageProcesser): +class Luminosity(ImageProcessor): """Get luminosity of an RGB image """ @@ -334,7 +334,7 @@ def process_image(self, *args, **kwaargs): return processed_img -class BgColorDistance(ImageProcesser): +class BgColorDistance(ImageProcessor): """Calculate distance between each pixel and the background color """ @@ -358,7 +358,7 @@ def process_image(self, brightness_q=0.99, *args, **kwargs): return processed_img -class StainFlattener(ImageProcesser): +class StainFlattener(ImageProcessor): def __init__(self, image, src_f, level, series, *args, **kwargs): super().__init__(image=image, src_f=src_f, level=level, series=series, *args, **kwargs) @@ -483,7 +483,7 @@ def process_image(self, n_colors=100, q=95, with_mask=True, adaptive_eq=True, ma return processed_img -class Gray(ImageProcesser): +class Gray(ImageProcessor): """Get luminosity of an RGB image """ @@ -505,7 +505,7 @@ def process_image(self, *args, **kwaargs): return processed_img -class HEDeconvolution(ImageProcesser): +class HEDeconvolution(ImageProcessor): """Normalize staining appearance of hematoxylin and eosin (H&E) stained image and get the H or E deconvolution image. diff --git a/valis/registration.py b/valis/registration.py index 3ef14eca..fb0f2a1b 100644 --- a/valis/registration.py +++ b/valis/registration.py @@ -1935,7 +1935,7 @@ def __init__(self, src_dir, dst_dir, series=None, name=None, image_type=None, crop_for_rigid_reg : bool, optional Whether or not to crop the images used for rigid registration. If `True`, then higher resolution images may be used for rigid registration, as valis - will "zoom" in to the area around the mask created by `ImageProcesser.create_mask()`, + will "zoom" in to the area around the mask created by `ImageProcessor.create_mask()`, and slice out that region and resize it to have a maximum dimension the same as `max_processed_image_dim_px`. If `False`, the full image will be used, although the tissue may be at a lower resolution. @@ -2688,15 +2688,15 @@ def create_img_processor_dict(self, brightfield_processing_cls=DEFAULT_BRIGHTFIE Parameters ---------- - brightfield_processing_cls : ImageProcesser - ImageProcesser to pre-process brightfield images to make them look as similar as possible. + brightfield_processing_cls : ImageProcessor + ImageProcessor to pre-process brightfield images to make them look as similar as possible. Should return a single channel uint8 image. brightfield_processing_kwargs : dict Dictionary of keyword arguments to be passed to `brightfield_processing_cls` - if_processing_cls : ImageProcesser - ImageProcesser to pre-process immunofluorescence images to make them look as similar as possible. + if_processing_cls : ImageProcessor + ImageProcessor to pre-process immunofluorescence images to make them look as similar as possible. Should return a single channel uint8 image. if_processing_kwargs : dict @@ -2705,7 +2705,7 @@ def create_img_processor_dict(self, brightfield_processing_cls=DEFAULT_BRIGHTFIE processor_dict : dict Each key should be the filename of the image, and the value either a subclassed preprocessing.ImageProcessor, or a list, where the 1st element is the processor, - and the second element a dictionary of keyword arguments passed to ImageProcesser.process_img. + and the second element a dictionary of keyword arguments passed to ImageProcessor.process_img. If `None`, then this function will assign a processor to each image. Returns @@ -2713,7 +2713,7 @@ def create_img_processor_dict(self, brightfield_processing_cls=DEFAULT_BRIGHTFIE named_processing_dict : Dict Each key is the name of the slide, and the value is a list, where the 1st element is the processor, and the second element a dictionary - of keyword arguments passed to ImageProcesser.process_img + of keyword arguments passed to ImageProcessor.process_img """ @@ -4626,15 +4626,15 @@ def register(self, brightfield_processing_cls=DEFAULT_BRIGHTFIELD_CLASS, Parameters ---------- - brightfield_processing_cls : preprocessing.ImageProcesser - preprocessing.ImageProcesser used to pre-process brightfield images to make + brightfield_processing_cls : preprocessing.ImageProcessor + preprocessing.ImageProcessor used to pre-process brightfield images to make them look as similar as possible. brightfield_processing_kwargs : dict Dictionary of keyword arguments to be passed to `brightfield_processing_cls` - if_processing_cls : preprocessing.ImageProcesser - preprocessing.ImageProcesser used to pre-process immunofluorescence images + if_processing_cls : preprocessing.ImageProcessor + preprocessing.ImageProcessor used to pre-process immunofluorescence images to make them look as similar as possible. if_processing_kwargs : dict @@ -4810,15 +4810,15 @@ def register_micro(self, brightfield_processing_cls=DEFAULT_BRIGHTFIELD_CLASS, Parameters ---------- - brightfield_processing_cls : preprocessing.ImageProcesser - preprocessing.ImageProcesser used to pre-process brightfield images to make + brightfield_processing_cls : preprocessing.ImageProcessor + preprocessing.ImageProcessor used to pre-process brightfield images to make them look as similar as possible. brightfield_processing_kwargs : dict Dictionary of keyword arguments to be passed to `brightfield_processing_cls` - if_processing_cls : preprocessing.ImageProcesser - preprocessing.ImageProcesser used to pre-process immunofluorescence images + if_processing_cls : preprocessing.ImageProcessor + preprocessing.ImageProcessor used to pre-process immunofluorescence images to make them look as similar as possible. if_processing_kwargs : dict From a7e437007bdf487c8f92db5728a046d6553593c7 Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Fri, 6 Mar 2026 00:44:17 +0900 Subject: [PATCH 116/152] Fix typo: IMAGES_ORDERD_KEY -> IMAGES_ORDERED_KEY --- examples/acrobat_2023/valis/registration.py | 4 ++-- valis/registration.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/acrobat_2023/valis/registration.py b/examples/acrobat_2023/valis/registration.py index 029e0977..09bfcd9d 100644 --- a/examples/acrobat_2023/valis/registration.py +++ b/examples/acrobat_2023/valis/registration.py @@ -75,7 +75,7 @@ FD_KEY = "feature_detector" MATCHER_KEY = "matcher" NAME_KEY = "name" -IMAGES_ORDERD_KEY = "imgs_ordered" +IMAGES_ORDERED_KEY = "imgs_ordered" REF_IMG_KEY = "reference_img_f" QT_EMITTER_KEY = "qt_emitter" TFORM_SRC_SHAPE_KEY = "transformation_src_shape_rc" @@ -2005,7 +2005,7 @@ def _set_rigid_reg_kwargs(self, name, feature_detector, similarity_metric, MATCHER_KEY: matcher, AFFINE_OPTIMIZER_KEY: afo, REF_IMG_KEY: reference_img_f, - IMAGES_ORDERD_KEY: imgs_ordered, + IMAGES_ORDERED_KEY: imgs_ordered, CHECK_REFLECT_KEY: check_for_reflections, QT_EMITTER_KEY: qt_emitter } diff --git a/valis/registration.py b/valis/registration.py index fb0f2a1b..aea6e4de 100644 --- a/valis/registration.py +++ b/valis/registration.py @@ -91,7 +91,7 @@ MATCHER_KEY = "matcher" MATCHER_FOR_SORTING_KEY = "matcher_for_sorting" NAME_KEY = "name" -IMAGES_ORDERD_KEY = "imgs_ordered" +IMAGES_ORDERED_KEY = "imgs_ordered" REF_IMG_KEY = "reference_img_f" QT_EMITTER_KEY = "qt_emitter" TFORM_SRC_SHAPE_KEY = "transformation_src_shape_rc" @@ -2209,7 +2209,7 @@ def _set_rigid_reg_kwargs(self, name, feature_detector, similarity_metric, MATCHER_FOR_SORTING_KEY: matcher_for_sorting, AFFINE_OPTIMIZER_KEY: afo, REF_IMG_KEY: reference_img_f, - IMAGES_ORDERD_KEY: imgs_ordered, + IMAGES_ORDERED_KEY: imgs_ordered, CHECK_REFLECT_KEY: check_for_reflections, QT_EMITTER_KEY: qt_emitter } From 6c09946cc56f549f0e1ab023cb6d4dddb1abbcc7 Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Fri, 6 Mar 2026 00:44:44 +0900 Subject: [PATCH 117/152] Fix typo: presesnt -> present --- examples/acrobat_2023/valis/registration.py | 2 +- valis/registration.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/acrobat_2023/valis/registration.py b/examples/acrobat_2023/valis/registration.py index 09bfcd9d..157bc1aa 100644 --- a/examples/acrobat_2023/valis/registration.py +++ b/examples/acrobat_2023/valis/registration.py @@ -2787,7 +2787,7 @@ def rigid_register_partial(self, tform_dict=None): transformation_src_shape_rc: shape (row, col) of image used to find the rigid transformation. If not provided, then it is assumed to be the shape of the level 0 slide - transformation_dst_shape_rc: shape of registered image. If not presesnt, but a reference was provided + transformation_dst_shape_rc: shape of registered image. If not present, but a reference was provided and `transformation_src_shape_rc` was not provided, this is assumed to be the shape of the reference slide If None, then all rigid M will be the identity matrix diff --git a/valis/registration.py b/valis/registration.py index aea6e4de..e8bba201 100644 --- a/valis/registration.py +++ b/valis/registration.py @@ -3213,7 +3213,7 @@ def rigid_register_partial(self, tform_dict=None): transformation_src_shape_rc: shape (row, col) of image used to find the rigid transformation. If not provided, then it is assumed to be the shape of the level 0 slide - transformation_dst_shape_rc: shape of registered image. If not presesnt, but a reference was provided + transformation_dst_shape_rc: shape of registered image. If not present, but a reference was provided and `transformation_src_shape_rc` was not provided, this is assumed to be the shape of the reference slide If None, then all rigid M will be the identity matrix From 2138ab8df4830f4794e9b3264891fd0888d0318e Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Fri, 6 Mar 2026 00:45:43 +0900 Subject: [PATCH 118/152] Fix typo: procsseing -> processing --- examples/acrobat_2023/valis/registration.py | 10 +++++----- valis/registration.py | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/examples/acrobat_2023/valis/registration.py b/examples/acrobat_2023/valis/registration.py index 157bc1aa..0d1b5f8e 100644 --- a/examples/acrobat_2023/valis/registration.py +++ b/examples/acrobat_2023/valis/registration.py @@ -1479,10 +1479,10 @@ class Valis(object): Dictionary of Slide objects, each of which contains information about a slide, and methods to warp it. - brightfield_procsseing_fxn_str: str + brightfield_processing_fxn_str: str Name of function used to process brightfield images. - if_procsseing_fxn_str : str + if_processing_fxn_str : str Name of function used to process fluorescence images. max_image_dim_px : int @@ -1905,8 +1905,8 @@ def __init__(self, src_dir, dst_dir, series=None, name=None, image_type=None, self.slide_dict = {} # Fields related to image pre-processing # - self.brightfield_procsseing_fxn_str = None - self.if_procsseing_fxn_str = None + self.brightfield_processing_fxn_str = None + self.if_processing_fxn_str = None if max_image_dim_px < max_processed_image_dim_px: msg = f"max_image_dim_px is {max_image_dim_px} but needs to be less or equal to {max_processed_image_dim_px}. Setting max_image_dim_px to {max_processed_image_dim_px}" @@ -4050,7 +4050,7 @@ def register(self, brightfield_processing_cls=DEFAULT_BRIGHTFIELD_CLASS, if_processing_kwargs=if_processing_kwargs, processor_dict=processor_dict) - self.brightfield_procsseing_fxn_str = brightfield_processing_cls.__name__ + self.brightfield_processing_fxn_str = brightfield_processing_cls.__name__ self.if_processing_fxn_str = if_processing_cls.__name__ self.process_imgs(processor_dict=slide_processors) diff --git a/valis/registration.py b/valis/registration.py index e8bba201..23ad219d 100644 --- a/valis/registration.py +++ b/valis/registration.py @@ -1592,10 +1592,10 @@ class Valis(object): Dictionary of Slide objects, each of which contains information about a slide, and methods to warp it. - brightfield_procsseing_fxn_str: str + brightfield_processing_fxn_str: str Name of function used to process brightfield images. - if_procsseing_fxn_str : str + if_processing_fxn_str : str Name of function used to process fluorescence images. max_image_dim_px : int @@ -2080,8 +2080,8 @@ def __init__(self, src_dir, dst_dir, series=None, name=None, image_type=None, self.slide_dict = {} # Fields related to image pre-processing # - self.brightfield_procsseing_fxn_str = None - self.if_procsseing_fxn_str = None + self.brightfield_processing_fxn_str = None + self.if_processing_fxn_str = None if max_image_dim_px < max_processed_image_dim_px: msg = f"max_image_dim_px is {max_image_dim_px} but needs to be less or equal to {max_processed_image_dim_px}. Setting max_image_dim_px to {max_processed_image_dim_px}" @@ -4728,7 +4728,7 @@ def register(self, brightfield_processing_cls=DEFAULT_BRIGHTFIELD_CLASS, if_processing_kwargs=if_processing_kwargs, processor_dict=processor_dict) - self.brightfield_procsseing_fxn_str = brightfield_processing_cls.__name__ + self.brightfield_processing_fxn_str = brightfield_processing_cls.__name__ self.if_processing_fxn_str = if_processing_cls.__name__ self.process_imgs(processor_dict=slide_processors) From 6b940e7f7e33f1c1d6207cfffba848d821a064d0 Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Fri, 6 Mar 2026 00:46:07 +0900 Subject: [PATCH 119/152] Fix typo: realted -> related --- examples/acrobat_2023/valis/registration.py | 2 +- valis/registration.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/acrobat_2023/valis/registration.py b/examples/acrobat_2023/valis/registration.py index 0d1b5f8e..aa6cdd8d 100644 --- a/examples/acrobat_2023/valis/registration.py +++ b/examples/acrobat_2023/valis/registration.py @@ -1960,7 +1960,7 @@ def __init__(self, src_dir, dst_dir, series=None, name=None, image_type=None, compose_non_rigid=compose_non_rigid, qt_emitter=qt_emitter) - # Info realted to saving images to view results # + # Info related to saving images to view results # self.mask_dict = None self.create_masks = create_masks diff --git a/valis/registration.py b/valis/registration.py index 23ad219d..9ce393b1 100644 --- a/valis/registration.py +++ b/valis/registration.py @@ -2156,7 +2156,7 @@ def __init__(self, src_dir, dst_dir, series=None, name=None, image_type=None, compose_non_rigid=compose_non_rigid, qt_emitter=qt_emitter) - # Info realted to saving images to view results # + # Info related to saving images to view results # self.mask_dict = None self.create_masks = create_masks From 38a14992eed8f203c83eff528b7e07d6d439cf3d Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Fri, 6 Mar 2026 00:46:28 +0900 Subject: [PATCH 120/152] Fix typo: maxmimum -> maximum --- examples/acrobat_2023/valis/registration.py | 2 +- valis/registration.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/acrobat_2023/valis/registration.py b/examples/acrobat_2023/valis/registration.py index aa6cdd8d..429b36c5 100644 --- a/examples/acrobat_2023/valis/registration.py +++ b/examples/acrobat_2023/valis/registration.py @@ -3349,7 +3349,7 @@ def prep_images_for_large_non_rigid_registration(self, max_img_dim, else: s = np.min(max_img_dim/np.array(ref_slide.processed_img_shape_rc)) else: - # Determine how big image would have to be to get mask with maxmimum dimension = max_img_dim + # Determine how big image would have to be to get mask with maximum dimension = max_img_dim if isinstance(mask, pyvips.Image): mask_shape_rc = np.array((mask.height, mask.width)) else: diff --git a/valis/registration.py b/valis/registration.py index 9ce393b1..d4a95e84 100644 --- a/valis/registration.py +++ b/valis/registration.py @@ -3868,7 +3868,7 @@ def prep_images_for_large_non_rigid_registration(self, max_img_dim, else: s = np.min(max_img_dim/np.array(ref_slide.processed_img_shape_rc)) else: - # Determine how big image would have to be to get mask with maxmimum dimension = max_img_dim + # Determine how big image would have to be to get mask with maximum dimension = max_img_dim if isinstance(mask, pyvips.Image): mask_shape_rc = np.array((mask.height, mask.width)) else: From 357b432308cc3d85c5f7f298f142480bb95c8615 Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Fri, 6 Mar 2026 00:47:17 +0900 Subject: [PATCH 121/152] Fix typo: 'have keept' -> 'have kept' --- valis/registration.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/valis/registration.py b/valis/registration.py index d4a95e84..188773eb 100644 --- a/valis/registration.py +++ b/valis/registration.py @@ -3510,7 +3510,7 @@ def micro_rigid_register(self): micro_rigid_registrar = self.micro_rigid_registrar_cls(val_obj=self, **self.micro_rigid_registrar_params) micro_rigid_registrar.register() - # Not all pairs will have keept high resolution M, so re-estimate M based on final matches + # Not all pairs will have kept high resolution M, so re-estimate M based on final matches slide_idx, slide_names = list(zip(*[[slide_obj.stack_idx, slide_obj.name] for slide_obj in self.slide_dict.values()])) slide_order = np.argsort(slide_idx) # sorts ascending slide_list = [self.slide_dict[slide_names[i]] for i in slide_order] From 8b4648d5bb4bf73ad2f5efa0d44187771bbd7ea5 Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Fri, 6 Mar 2026 00:47:44 +0900 Subject: [PATCH 122/152] Fix typo: origingated -> originated --- examples/acrobat_2023/valis/registration.py | 4 ++-- valis/registration.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/acrobat_2023/valis/registration.py b/examples/acrobat_2023/valis/registration.py index 429b36c5..61ae27f0 100644 --- a/examples/acrobat_2023/valis/registration.py +++ b/examples/acrobat_2023/valis/registration.py @@ -1025,7 +1025,7 @@ def warp_xy(self, xy, M=None, slide_level=0, pt_level=0, the points should be warped. Default is 0. pt_level: int, tuple, optional - Pyramid level from which the points origingated. For example, if + Pyramid level from which the points originated. For example, if `xy` are from the centroids of cell segmentation performed on the full resolution image, this should be 0. Alternatively, the value can be a tuple of the image's shape (row, col) from which the points came. @@ -1201,7 +1201,7 @@ def warp_geojson(self, geojson_f, M=None, slide_level=0, pt_level=0, the points should be warped. Default is 0. pt_level: int, tuple, optional - Pyramid level from which the points origingated. For example, if + Pyramid level from which the points originated. For example, if `xy` are from the centroids of cell segmentation performed on the full resolution image, this should be 0. Alternatively, the value can be a tuple of the image's shape (row, col) from which the points came. diff --git a/valis/registration.py b/valis/registration.py index 188773eb..95f0c3fa 100644 --- a/valis/registration.py +++ b/valis/registration.py @@ -1123,7 +1123,7 @@ def warp_xy(self, xy, M=None, slide_level=0, pt_level=0, the points should be warped. Default is 0. pt_level: int, tuple, optional - Pyramid level from which the points origingated. For example, if + Pyramid level from which the points originated. For example, if `xy` are from the centroids of cell segmentation performed on the full resolution image, this should be 0. Alternatively, the value can be a tuple of the image's shape (row, col) from which the points came. @@ -1299,7 +1299,7 @@ def warp_geojson(self, geojson_f, M=None, slide_level=0, pt_level=0, the points should be warped. Default is 0. pt_level: int, tuple, optional - Pyramid level from which the points origingated. For example, if + Pyramid level from which the points originated. For example, if `xy` are from the centroids of cell segmentation performed on the full resolution image, this should be 0. Alternatively, the value can be a tuple of the image's shape (row, col) from which the points came. From 25a87b087b708d727158faf1e00f9341fe3105e6 Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Fri, 6 Mar 2026 00:48:27 +0900 Subject: [PATCH 123/152] Fix typo: registerd -> registered --- valis/registration.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/valis/registration.py b/valis/registration.py index 95f0c3fa..e5a93ce9 100644 --- a/valis/registration.py +++ b/valis/registration.py @@ -3177,15 +3177,15 @@ def extract_rigid_transforms_from_serial_rigid(self, rigid_registrar): w = int(np.ceil(max_x - min_x)) h = int(np.ceil(max_y - min_y)) - registerd_out_shape_rc = np.array([h, w]) + registered_out_shape_rc = np.array([h, w]) for slide_obj in self.slide_dict.values(): M = slide_M_dict[slide_obj.name] @ pad_T slide_M_dict[slide_obj.name] = M - cropped_registerd_out_shape_rc = rigid_registrar.img_obj_list[0].registered_shape_rc + cropped_registered_out_shape_rc = rigid_registrar.img_obj_list[0].registered_shape_rc - return slide_M_dict, registerd_out_shape_rc, cropped_M_dict, cropped_registerd_out_shape_rc, matches_dict + return slide_M_dict, registered_out_shape_rc, cropped_M_dict, cropped_registered_out_shape_rc, matches_dict def get_cropped_img_for_rigid_warp(self, slide_obj): @@ -3426,7 +3426,7 @@ def rigid_register(self): ref_slide = self.slide_dict[valtils.get_name(rigid_registrar.reference_img_f)] self.reference_img_f = ref_slide.src_f - rigid_transform_dict, rigid_reg_shape, cropped_M_dict, cropped_registerd_out_shape_rc, rigid_matches_dict = \ + rigid_transform_dict, rigid_reg_shape, cropped_M_dict, cropped_registered_out_shape_rc, rigid_matches_dict = \ self.extract_rigid_transforms_from_serial_rigid(rigid_registrar) self.aligned_img_shape_rc = rigid_reg_shape @@ -3434,7 +3434,7 @@ def rigid_register(self): for slide_reg_obj in rigid_registrar.img_obj_list: slide_obj = self.slide_dict[slide_reg_obj.name] slide_obj.M_for_cropped = cropped_M_dict[slide_obj.name] - slide_obj.rigid_reg_cropped_shape_rc = cropped_registerd_out_shape_rc + slide_obj.rigid_reg_cropped_shape_rc = cropped_registered_out_shape_rc slide_obj.M = rigid_transform_dict[slide_obj.name] slide_obj.reg_img_shape_rc = rigid_reg_shape slide_obj.stack_idx = slide_reg_obj.stack_idx From 0181b09030da73ee3888e29aa664e7280c47e4c8 Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Fri, 6 Mar 2026 00:48:56 +0900 Subject: [PATCH 124/152] Fix typo: thumbanil -> thumbnail --- examples/acrobat_2023/valis/registration.py | 4 ++-- valis/registration.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/acrobat_2023/valis/registration.py b/examples/acrobat_2023/valis/registration.py index 61ae27f0..387f52f3 100644 --- a/examples/acrobat_2023/valis/registration.py +++ b/examples/acrobat_2023/valis/registration.py @@ -3702,13 +3702,13 @@ def non_rigid_register(self, rigid_registrar, processor_dict): if draw_img.ndim == 2: draw_img = np.dstack([draw_img] * 3) - thumbanil_deform_grid = viz.color_displacement_tri_grid(bk_dx=thumbnail_bk_dxdy[..., 0], + thumbnail_deform_grid = viz.color_displacement_tri_grid(bk_dx=thumbnail_bk_dxdy[..., 0], bk_dy=thumbnail_bk_dxdy[..., 1], img=draw_img, n_grid_pts=25) deform_img_f = os.path.join(self.deformation_field_dir, img_save_id + "_" + slide_obj.name + ".png") - warp_tools.save_img(deform_img_f, thumbanil_deform_grid, thumbnail_size=self.thumbnail_size) + warp_tools.save_img(deform_img_f, thumbnail_deform_grid, thumbnail_size=self.thumbnail_size) return non_rigid_registrar diff --git a/valis/registration.py b/valis/registration.py index e5a93ce9..4432c091 100644 --- a/valis/registration.py +++ b/valis/registration.py @@ -4376,12 +4376,12 @@ def non_rigid_register(self, rigid_registrar, processor_dict): if draw_img.ndim == 2: draw_img = np.dstack([draw_img] * 3) - thumbanil_deform_grid = viz.draw_displacement_vector_field(dxdy=[-thumbnail_bk_dxdy[..., 0], -thumbnail_bk_dxdy[..., 1]], + thumbnail_deform_grid = viz.draw_displacement_vector_field(dxdy=[-thumbnail_bk_dxdy[..., 0], -thumbnail_bk_dxdy[..., 1]], img=draw_img, spacing=10) deform_img_f = os.path.join(self.deformation_field_dir, img_save_id + "_" + slide_obj.name + ".png") - warp_tools.save_img(deform_img_f, thumbanil_deform_grid, thumbnail_size=self.thumbnail_size) + warp_tools.save_img(deform_img_f, thumbnail_deform_grid, thumbnail_size=self.thumbnail_size) return non_rigid_registrar From 3777dc9399faf5bfb1951051abbe83d996fcdfff Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Fri, 6 Mar 2026 00:49:25 +0900 Subject: [PATCH 125/152] Fix typo: intialize -> initialize --- examples/acrobat_2023/valis/registration.py | 2 +- valis/registration.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/acrobat_2023/valis/registration.py b/examples/acrobat_2023/valis/registration.py index 387f52f3..5aa9f8df 100644 --- a/examples/acrobat_2023/valis/registration.py +++ b/examples/acrobat_2023/valis/registration.py @@ -1860,7 +1860,7 @@ def __init__(self, src_dir, dst_dir, series=None, name=None, image_type=None, this step is skipped. micro_rigid_registrar_params : dictionary - Dictionary of keyword arguments used intialize the `MicroRigidRegistrar` + Dictionary of keyword arguments used initialize the `MicroRigidRegistrar` qt_emitter : PySide2.QtCore.Signal, optional Used to emit signals that update the GUI's progress bars diff --git a/valis/registration.py b/valis/registration.py index 4432c091..de5b060e 100644 --- a/valis/registration.py +++ b/valis/registration.py @@ -2001,7 +2001,7 @@ def __init__(self, src_dir, dst_dir, series=None, name=None, image_type=None, this step is skipped. micro_rigid_registrar_params : dictionary - Dictionary of keyword arguments used intialize the `MicroRigidRegistrar` + Dictionary of keyword arguments used initialize the `MicroRigidRegistrar` qt_emitter : PySide2.QtCore.Signal, optional Used to emit signals that update the GUI's progress bars From 188036eb33d8002ffe4b280e70acfaa74113decb Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Fri, 6 Mar 2026 00:53:32 +0900 Subject: [PATCH 126/152] Fix typo: flattended -> flattened --- examples/acrobat_2023/valis/slide_io.py | 14 +++++++------- valis/slide_io.py | 16 ++++++++-------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/examples/acrobat_2023/valis/slide_io.py b/examples/acrobat_2023/valis/slide_io.py index 0b0c1e5f..beb2ee0d 100644 --- a/examples/acrobat_2023/valis/slide_io.py +++ b/examples/acrobat_2023/valis/slide_io.py @@ -421,7 +421,7 @@ def check_flattened_pyramid_tiff(src_f): Returns ------- - is_flattended_pyramid : bool + is_flattened_pyramid : bool Whether or not the slide is a flattened pyramid can_use_bf : bool @@ -442,7 +442,7 @@ def check_flattened_pyramid_tiff(src_f): vips_img = pyvips.Image.new_from_file(src_f) vips_fields = vips_img.get_fields() - is_flattended_pyramid = False + is_flattened_pyramid = False if 'n-pages' in vips_fields: n_pages = vips_img.get("n-pages") @@ -487,9 +487,9 @@ def check_flattened_pyramid_tiff(src_f): unique_areas, _ = np.unique(all_areas, return_index=True) n_zero_diff = len(np.where(area_diff == 0)[0]) if most_common_channel_count == 1 and n_zero_diff >= len(unique_areas): - is_flattended_pyramid = True + is_flattened_pyramid = True - if is_flattended_pyramid: + if is_flattened_pyramid: nchannels_per_each_level = np.diff(level_starts) last_level_channel_count = np.sum(all_n_channels[level_starts[-1]:]) nchannels_per_each_level = np.hstack([nchannels_per_each_level, @@ -516,7 +516,7 @@ def check_flattened_pyramid_tiff(src_f): bf_channels = bf_reader.metadata.n_channels can_use_bf = bf_levels >= len(slide_dimensions) and bf_channels == n_channels - return is_flattended_pyramid, can_use_bf, slide_dimensions, levels_start_idx, n_channels + return is_flattened_pyramid, can_use_bf, slide_dimensions, levels_start_idx, n_channels # Read slides # @@ -1668,11 +1668,11 @@ def __init__(self, src_f, *args, **kwargs): def create_metadata(self): - is_flattended_pyramid, bf_reads_flat, slide_dimensions,\ + is_flattened_pyramid, bf_reads_flat, slide_dimensions,\ levels_start_idx, n_channels = \ check_flattened_pyramid_tiff(self.src_f) - assert is_flattended_pyramid and not bf_reads_flat, "Trying to use FlattenedPyramidReader but slide is not a flattened pyramid" + assert is_flattened_pyramid and not bf_reads_flat, "Trying to use FlattenedPyramidReader but slide is not a flattened pyramid" meta_name = f"{os.path.split(self.src_f)[1]}_Series(0)".strip("_") server = VIPS_RDR diff --git a/valis/slide_io.py b/valis/slide_io.py index 5c946982..bdb67941 100644 --- a/valis/slide_io.py +++ b/valis/slide_io.py @@ -597,7 +597,7 @@ def check_flattened_pyramid_tiff(src_f, check_with_bf=False): Returns ------- - is_flattended_pyramid : bool + is_flattened_pyramid : bool Whether or not the slide is a flattened pyramid can_use_bf : bool @@ -618,7 +618,7 @@ def check_flattened_pyramid_tiff(src_f, check_with_bf=False): vips_img = pyvips.Image.new_from_file(src_f) vips_fields = vips_img.get_fields() - is_flattended_pyramid = False + is_flattened_pyramid = False can_use_bf = False if 'n-pages' in vips_fields: @@ -661,9 +661,9 @@ def check_flattened_pyramid_tiff(src_f, check_with_bf=False): unique_areas, _ = np.unique(all_areas, return_index=True) n_zero_diff = len(np.where(area_diff == 0)[0]) if most_common_channel_count == 1 and n_zero_diff >= len(unique_areas): - is_flattended_pyramid = True + is_flattened_pyramid = True - if is_flattended_pyramid: + if is_flattened_pyramid: nchannels_per_each_level = np.diff(level_starts) last_level_channel_count = np.sum(all_n_channels[level_starts[-1]:]) nchannels_per_each_level = np.hstack([nchannels_per_each_level, @@ -682,7 +682,7 @@ def check_flattened_pyramid_tiff(src_f, check_with_bf=False): n_channels = most_common_channel_count else: - return is_flattended_pyramid, can_use_bf, None, None, None + return is_flattened_pyramid, can_use_bf, None, None, None # Now check if Bioformats reads it similarly # if check_with_bf: with valtils.HiddenPrints(): @@ -691,7 +691,7 @@ def check_flattened_pyramid_tiff(src_f, check_with_bf=False): bf_channels = bf_reader.metadata.n_channels can_use_bf = bf_levels >= len(slide_dimensions) and bf_channels == n_channels - return is_flattended_pyramid, can_use_bf, slide_dimensions, levels_start_idx, n_channels + return is_flattened_pyramid, can_use_bf, slide_dimensions, levels_start_idx, n_channels def check_xml_img_match(xml, vips_img, metadata, series=0): @@ -2123,11 +2123,11 @@ def __init__(self, src_f, *args, **kwargs): def create_metadata(self): - is_flattended_pyramid, bf_reads_flat, slide_dimensions,\ + is_flattened_pyramid, bf_reads_flat, slide_dimensions,\ levels_start_idx, n_channels = \ check_flattened_pyramid_tiff(self.src_f) - assert is_flattended_pyramid and not bf_reads_flat, "Trying to use FlattenedPyramidReader but slide is not a flattened pyramid" + assert is_flattened_pyramid and not bf_reads_flat, "Trying to use FlattenedPyramidReader but slide is not a flattened pyramid" meta_name = f"{os.path.split(self.src_f)[1]}_Series(0)".strip("_") server = VIPS_RDR From 57695aeebf68e36e5616c920e33f7c4089553675 Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Fri, 6 Mar 2026 00:54:42 +0900 Subject: [PATCH 127/152] Insert spaces --- examples/acrobat_2023/valis/slide_io.py | 2 +- valis/slide_io.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/acrobat_2023/valis/slide_io.py b/examples/acrobat_2023/valis/slide_io.py index beb2ee0d..3c9cf3ae 100644 --- a/examples/acrobat_2023/valis/slide_io.py +++ b/examples/acrobat_2023/valis/slide_io.py @@ -2611,7 +2611,7 @@ def create_ome_xml(shape_xyzct, bf_dtype, is_rgb, pixel_physical_size_xyu=None, def update_xml_for_new_img(current_ome_xml_str, new_xyzct, bf_dtype, is_rgb, series, pixel_physical_size_xyu=None, channel_names=None, colormap=None): """Update dimensions ome-xml metadata - Used to create a new ome-xmlthat reflects changes in an image, such as its shape + Used to create a new ome-xml that reflects changes in an image, such as its shape If `current_ome_xml_str` is invalid or None, a new ome-xml will be created diff --git a/valis/slide_io.py b/valis/slide_io.py index bdb67941..e6c30e2e 100644 --- a/valis/slide_io.py +++ b/valis/slide_io.py @@ -3333,7 +3333,7 @@ def get_tile_wh(reader, level, out_shape_wh, default_wh=512): def update_xml_for_new_img(img, reader, level=0, channel_names=None, colormap=CMAP_AUTO, pixel_physical_size_xyu=None): """Update dimensions ome-xml metadata - Used to create a new ome-xmlthat reflects changes in an image, such as its shape + Used to create a new ome-xml that reflects changes in an image, such as its shape If `current_ome_xml_str` is invalid or None, a new ome-xml will be created From e0dfaa6308d204f2c27550829c5b8dacee8a8ac3 Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Fri, 6 Mar 2026 00:55:57 +0900 Subject: [PATCH 128/152] Fix typo: ndarry -> np.ndarray --- examples/acrobat_2023/valis/feature_detectors.py | 4 ++-- examples/acrobat_2023/valis/warp_tools.py | 2 +- valis/feature_detectors.py | 12 ++++++------ valis/slide_io.py | 2 +- valis/warp_tools.py | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/examples/acrobat_2023/valis/feature_detectors.py b/examples/acrobat_2023/valis/feature_detectors.py index b9b829c6..45efa3a6 100644 --- a/examples/acrobat_2023/valis/feature_detectors.py +++ b/examples/acrobat_2023/valis/feature_detectors.py @@ -145,11 +145,11 @@ def detect_and_compute(self, image, mask=None): Returns ------- - kp : ndarry + kp : np.ndarray (N, 2) array positions of keypoints in xy coordinates for N keypoints - desc : ndarry + desc : np.ndarray (N, M) array containing M features for each of the N keypoints """ diff --git a/examples/acrobat_2023/valis/warp_tools.py b/examples/acrobat_2023/valis/warp_tools.py index 1f832276..8ef7c5fe 100644 --- a/examples/acrobat_2023/valis/warp_tools.py +++ b/examples/acrobat_2023/valis/warp_tools.py @@ -1407,7 +1407,7 @@ def get_warp_map(M=None, dxdy=None, transformation_dst_shape_rc=None, Returns ------- - coord_map : ndarry + coord_map : np.ndarray A 2band numpy array that has location of each pixel in `src_shape_rc` the warped image (with shape `dst_shape_rc`) diff --git a/valis/feature_detectors.py b/valis/feature_detectors.py index eb71db2e..6fe3f0bb 100644 --- a/valis/feature_detectors.py +++ b/valis/feature_detectors.py @@ -154,11 +154,11 @@ def _detect_and_compute(self, image, mask=None): Returns ------- - kp : ndarry + kp : np.ndarray (N, 2) array positions of keypoints in xy coordinates for N keypoints - desc : ndarry + desc : np.ndarray (N, M) array containing M features for each of the N keypoints """ @@ -593,11 +593,11 @@ def _detect_and_compute(self, image, *args, **kwargs): Returns ------- - kp : ndarry + kp : np.ndarray (N, 2) array positions of keypoints in xy coordinates for N keypoints - desc : ndarry + desc : np.ndarray (N, M) array containing M features for each of the N keypoints """ @@ -648,11 +648,11 @@ def _detect_and_compute(self, image, *args, **kwargs): Returns ------- - kp : ndarry + kp : np.ndarray (N, 2) array positions of keypoints in xy coordinates for N keypoints - desc : ndarry + desc : np.ndarray (N, M) array containing M features for each of the N keypoints """ diff --git a/valis/slide_io.py b/valis/slide_io.py index e6c30e2e..4ddfd424 100644 --- a/valis/slide_io.py +++ b/valis/slide_io.py @@ -3339,7 +3339,7 @@ def update_xml_for_new_img(img, reader, level=0, channel_names=None, colormap=CM Parameters ------- - img : ndarry or pyvips.Image + img : np.ndarray or pyvips.Image Image for which xml will be generated. Used to determine shape and datatype. reader : SlideReader diff --git a/valis/warp_tools.py b/valis/warp_tools.py index c751007a..72198944 100644 --- a/valis/warp_tools.py +++ b/valis/warp_tools.py @@ -1537,7 +1537,7 @@ def get_warp_map(M=None, dxdy=None, transformation_dst_shape_rc=None, Returns ------- - coord_map : ndarry + coord_map : np.ndarray A 2band numpy array that has location of each pixel in `src_shape_rc` the warped image (with shape `dst_shape_rc`) From 240cb58b2f4d34334222e5e7b1467a59f0e2016b Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Fri, 6 Mar 2026 00:57:18 +0900 Subject: [PATCH 129/152] Fix typo: Paramters -> Parameters --- examples/acrobat_2023/valis/feature_detectors.py | 4 ++-- valis/feature_detectors.py | 4 ++-- valis/slide_io.py | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/acrobat_2023/valis/feature_detectors.py b/examples/acrobat_2023/valis/feature_detectors.py index 45efa3a6..6394bc4b 100644 --- a/examples/acrobat_2023/valis/feature_detectors.py +++ b/examples/acrobat_2023/valis/feature_detectors.py @@ -289,8 +289,8 @@ def detect(self, image): Uses keypoint info to create KeyPoint objects for OpenCV - Paramters - --------- + Parameters + ---------- image : ndarray image from keypoints will be detected diff --git a/valis/feature_detectors.py b/valis/feature_detectors.py index 6fe3f0bb..f5299feb 100644 --- a/valis/feature_detectors.py +++ b/valis/feature_detectors.py @@ -326,8 +326,8 @@ def detect(self, image): Uses keypoint info to create KeyPoint objects for OpenCV - Paramters - --------- + Parameters + ---------- image : ndarray image from keypoints will be detected diff --git a/valis/slide_io.py b/valis/slide_io.py index 4ddfd424..7eee5847 100644 --- a/valis/slide_io.py +++ b/valis/slide_io.py @@ -482,8 +482,8 @@ def check_to_use_openslide(src_f): def get_ome_obj(x): """Get ome_types.model.ome.OME object - Paramters - --------- + Parameters + ---------- x: str Either OME-XML or path to ome.tiff From 1ad5082d7bea5e477a4a83bbe3d74fb805681e79 Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Fri, 6 Mar 2026 00:58:25 +0900 Subject: [PATCH 130/152] Fix typo: pvips -> pyvips --- examples/acrobat_2023/valis/slide_io.py | 4 ++-- examples/acrobat_2023/valis/warp_tools.py | 8 ++++---- valis/slide_io.py | 2 +- valis/warp_tools.py | 8 ++++---- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/examples/acrobat_2023/valis/slide_io.py b/examples/acrobat_2023/valis/slide_io.py index 3c9cf3ae..0e2f0002 100644 --- a/examples/acrobat_2023/valis/slide_io.py +++ b/examples/acrobat_2023/valis/slide_io.py @@ -1768,7 +1768,7 @@ def slide2image(self, level, xywh=None, *args, **kwargs): except pyvips.error.Error as e: # Big hack for when get the error "tiff2vips: out of order read" even with random access out_shape_wh = self.metadata.slide_dimensions[level] - msg1 = f"pyvips.error.Error: {e} when converting pvips.Image to numpy array" + msg1 = f"pyvips.error.Error: {e} when converting pyvips.Image to numpy array" msg2 = f"Will try to resize level 0 to have shape {out_shape_wh} and convert" valtils.print_warning(msg1) valtils.print_warning(msg2, None) @@ -2402,7 +2402,7 @@ def get_slide_reader(src_f, series=None): elif is_ometiff: if series == 0 and n_series == 1 and is_rgb and is_rgb is not None: - # Seems pvips can only read ome.tiff if there is 1 series. + # Seems pyvips can only read ome.tiff if there is 1 series. # Converting a multichannel pyvips.Image is very slow, but is fast for RGB reader = VipsSlideReader else: diff --git a/examples/acrobat_2023/valis/warp_tools.py b/examples/acrobat_2023/valis/warp_tools.py index 8ef7c5fe..cdb26244 100644 --- a/examples/acrobat_2023/valis/warp_tools.py +++ b/examples/acrobat_2023/valis/warp_tools.py @@ -28,8 +28,8 @@ def is_pyvips_22(): - pvips_ver = pyvips.__version__.split(".") - pyvips_22 = eval(pvips_ver[0]) >= 2 and eval(pvips_ver[1]) >= 2 + pyvips_ver = pyvips.__version__.split(".") + pyvips_22 = eval(pyvips_ver[0]) >= 2 and eval(pyvips_ver[1]) >= 2 return pyvips_22 @@ -335,7 +335,7 @@ def save_img(dst_f, img, thumbnail_size=None): Filename for saved image img : ndarray, pyvips.Image - Image to be saved. Numpy arrays will be converted to pvips.Image + Image to be saved. Numpy arrays will be converted to pyvips.Image thumbnail_size : optional, int If not None, the image will be resized to fit within this size @@ -1328,7 +1328,7 @@ def warp_img_from_to(img, from_M=None, from_transformation_src_shape_rc=None, Returns ------- - in_target_space : ndarray, pvips.Image + in_target_space : ndarray, pyvips.Image `img` warped onto the "to" image """ diff --git a/valis/slide_io.py b/valis/slide_io.py index 7eee5847..69646234 100644 --- a/valis/slide_io.py +++ b/valis/slide_io.py @@ -2237,7 +2237,7 @@ def slide2image(self, level, xywh=None, *args, **kwargs): except pyvips.error.Error as e: # Big hack for when get the error "tiff2vips: out of order read" even with random access out_shape_wh = self.metadata.slide_dimensions[level] - msg1 = f"pyvips.error.Error: {e} when converting pvips.Image to numpy array" + msg1 = f"pyvips.error.Error: {e} when converting pyvips.Image to numpy array" msg2 = f"Will try to resize level 0 to have shape {out_shape_wh} and convert" valtils.print_warning(msg1) valtils.print_warning(msg2, None) diff --git a/valis/warp_tools.py b/valis/warp_tools.py index 72198944..b748adad 100644 --- a/valis/warp_tools.py +++ b/valis/warp_tools.py @@ -29,8 +29,8 @@ def is_pyvips_22(): - pvips_ver = pyvips.__version__.split(".") - pyvips_22 = eval(pvips_ver[0]) >= 2 and eval(pvips_ver[1]) >= 2 + pyvips_ver = pyvips.__version__.split(".") + pyvips_22 = eval(pyvips_ver[0]) >= 2 and eval(pyvips_ver[1]) >= 2 return pyvips_22 def get_ref_img_idx(img_f_list, ref_img_name=None): @@ -326,7 +326,7 @@ def save_img(dst_f, img, thumbnail_size=None): Filename for saved image img : ndarray, pyvips.Image - Image to be saved. Numpy arrays will be converted to pvips.Image + Image to be saved. Numpy arrays will be converted to pyvips.Image thumbnail_size : optional, int If not None, the image will be resized to fit within this size @@ -1458,7 +1458,7 @@ def warp_img_from_to(img, from_M=None, from_transformation_src_shape_rc=None, Returns ------- - in_target_space : ndarray, pvips.Image + in_target_space : ndarray, pyvips.Image `img` warped onto the "to" image """ From a7fe6d787f8d44fcf03938df8a66bc1040119e5c Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Fri, 6 Mar 2026 00:58:50 +0900 Subject: [PATCH 131/152] Fix typo: Phyiscal -> Physical --- examples/acrobat_2023/valis/slide_io.py | 2 +- valis/slide_io.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/acrobat_2023/valis/slide_io.py b/examples/acrobat_2023/valis/slide_io.py index 0e2f0002..ccf463e0 100644 --- a/examples/acrobat_2023/valis/slide_io.py +++ b/examples/acrobat_2023/valis/slide_io.py @@ -52,7 +52,7 @@ """str: Physical unit when the unit can't be found in the metadata""" MICRON_UNIT = u'\u00B5m' -"""str: Phyiscal unit for micron/micrometers""" +"""str: Physical unit for micron/micrometers""" ALL_OPENSLIDE_READABLE_FORMATS = [".svs", ".tif", ".vms", ".vmu", ".ndpi", ".scn", ".mrxs", ".tiff", ".svslide", ".bif"] """list: File extensions that OpenSlide can read""" diff --git a/valis/slide_io.py b/valis/slide_io.py index 69646234..345dd6d0 100644 --- a/valis/slide_io.py +++ b/valis/slide_io.py @@ -68,7 +68,7 @@ """str: Physical unit when the unit can't be found in the metadata""" MICRON_UNIT = u'\u00B5m' -"""str: Phyiscal unit for micron/micrometers""" +"""str: Physical unit for micron/micrometers""" ALL_OPENSLIDE_READABLE_FORMATS = [".svs", ".tif", ".vms", ".vmu", ".ndpi", ".scn", ".mrxs", ".tiff", ".svslide", ".bif"] """list: File extensions that OpenSlide can read""" From 82acf989e21d932ec06ee0b7fba553c26cc54daa Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Fri, 6 Mar 2026 00:59:11 +0900 Subject: [PATCH 132/152] Fix typo: descriiption -> description --- examples/acrobat_2023/valis/slide_io.py | 2 +- valis/slide_io.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/acrobat_2023/valis/slide_io.py b/examples/acrobat_2023/valis/slide_io.py index ccf463e0..567275f1 100644 --- a/examples/acrobat_2023/valis/slide_io.py +++ b/examples/acrobat_2023/valis/slide_io.py @@ -1816,7 +1816,7 @@ def _get_dtype(self): """Get Bio-Formats datatype from values in metadata. For example, BF metadata may have image datatype as - uint32, but in the image descriiption, min/max/resppnse, + uint32, but in the image description, min/max/resppnse, are floats. This will determine if the slide should be cast to a different dataatype to match values in metadata. diff --git a/valis/slide_io.py b/valis/slide_io.py index 345dd6d0..0e6810e6 100644 --- a/valis/slide_io.py +++ b/valis/slide_io.py @@ -2325,7 +2325,7 @@ def _get_dtype(self): """Get Bio-Formats datatype from values in metadata. For example, BF metadata may have image datatype as - uint32, but in the image descriiption, min/max/resppnse, + uint32, but in the image description, min/max/resppnse, are floats. This will determine if the slide should be cast to a different dataatype to match values in metadata. From eb2c23a3059e6672c058023615cec84d0a713e18 Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Fri, 6 Mar 2026 00:59:33 +0900 Subject: [PATCH 133/152] Fix typo: resppnse -> response --- examples/acrobat_2023/valis/slide_io.py | 2 +- valis/slide_io.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/acrobat_2023/valis/slide_io.py b/examples/acrobat_2023/valis/slide_io.py index 567275f1..348c5e8c 100644 --- a/examples/acrobat_2023/valis/slide_io.py +++ b/examples/acrobat_2023/valis/slide_io.py @@ -1816,7 +1816,7 @@ def _get_dtype(self): """Get Bio-Formats datatype from values in metadata. For example, BF metadata may have image datatype as - uint32, but in the image description, min/max/resppnse, + uint32, but in the image description, min/max/response, are floats. This will determine if the slide should be cast to a different dataatype to match values in metadata. diff --git a/valis/slide_io.py b/valis/slide_io.py index 0e6810e6..93e561ad 100644 --- a/valis/slide_io.py +++ b/valis/slide_io.py @@ -2325,7 +2325,7 @@ def _get_dtype(self): """Get Bio-Formats datatype from values in metadata. For example, BF metadata may have image datatype as - uint32, but in the image description, min/max/resppnse, + uint32, but in the image description, min/max/response, are floats. This will determine if the slide should be cast to a different dataatype to match values in metadata. From f34cc0a7ba350b226e0f4a1512b622a45ff4b88c Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Fri, 6 Mar 2026 00:59:52 +0900 Subject: [PATCH 134/152] Fix typo: dataatype -> datatype --- examples/acrobat_2023/valis/slide_io.py | 2 +- valis/slide_io.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/acrobat_2023/valis/slide_io.py b/examples/acrobat_2023/valis/slide_io.py index 348c5e8c..eef2473c 100644 --- a/examples/acrobat_2023/valis/slide_io.py +++ b/examples/acrobat_2023/valis/slide_io.py @@ -1818,7 +1818,7 @@ def _get_dtype(self): For example, BF metadata may have image datatype as uint32, but in the image description, min/max/response, are floats. This will determine if the slide should be cast - to a different dataatype to match values in metadata. + to a different datatype to match values in metadata. """ smallest_level = len(self.metadata.slide_dimensions) - 1 diff --git a/valis/slide_io.py b/valis/slide_io.py index 93e561ad..f9e34029 100644 --- a/valis/slide_io.py +++ b/valis/slide_io.py @@ -2327,7 +2327,7 @@ def _get_dtype(self): For example, BF metadata may have image datatype as uint32, but in the image description, min/max/response, are floats. This will determine if the slide should be cast - to a different dataatype to match values in metadata. + to a different datatype to match values in metadata. """ smallest_level = len(self.metadata.slide_dimensions) - 1 From f0d7076a56a53b8378c8df15ae7a968e86bbb045 Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Fri, 6 Mar 2026 01:00:43 +0900 Subject: [PATCH 135/152] Fix typo: scence_ -> scene_ --- examples/acrobat_2023/valis/slide_io.py | 4 ++-- valis/slide_io.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/acrobat_2023/valis/slide_io.py b/examples/acrobat_2023/valis/slide_io.py index eef2473c..c44ba5f3 100644 --- a/examples/acrobat_2023/valis/slide_io.py +++ b/examples/acrobat_2023/valis/slide_io.py @@ -2114,8 +2114,8 @@ def _get_slide_dimensions(self, scene=0, *args, **kwargs): czi_reader = CziFile(self.src_f) scene_bbox = czi_reader.get_all_scene_bounding_boxes()[scene] - scence_l0_wh = np.array([scene_bbox.w, scene_bbox.h]) - slide_dimensions = np.round(scence_l0_wh*zoom_levels[..., np.newaxis]).astype(int) + scene_l0_wh = np.array([scene_bbox.w, scene_bbox.h]) + slide_dimensions = np.round(scene_l0_wh*zoom_levels[..., np.newaxis]).astype(int) return slide_dimensions diff --git a/valis/slide_io.py b/valis/slide_io.py index f9e34029..e8dca694 100644 --- a/valis/slide_io.py +++ b/valis/slide_io.py @@ -2731,8 +2731,8 @@ def _get_slide_dimensions(self, scene=0, *args, **kwargs): czi_reader = CziFile(self.src_f) scene_bbox = czi_reader.get_all_scene_bounding_boxes()[scene] - scence_l0_wh = np.array([scene_bbox.w, scene_bbox.h]) - slide_dimensions = np.round(scence_l0_wh*zoom_levels[..., np.newaxis]).astype(int) + scene_l0_wh = np.array([scene_bbox.w, scene_bbox.h]) + slide_dimensions = np.round(scene_l0_wh*zoom_levels[..., np.newaxis]).astype(int) return slide_dimensions From 011db58585fe65e90ff63d2226201ad1ca9a5d5d Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Fri, 6 Mar 2026 01:01:18 +0900 Subject: [PATCH 136/152] Fix typo: xmml -> xml --- examples/acrobat_2023/valis/slide_io.py | 2 +- valis/slide_io.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/acrobat_2023/valis/slide_io.py b/examples/acrobat_2023/valis/slide_io.py index c44ba5f3..e9962e3a 100644 --- a/examples/acrobat_2023/valis/slide_io.py +++ b/examples/acrobat_2023/valis/slide_io.py @@ -2525,7 +2525,7 @@ def create_channel(channel_id, name=None, color=None): @valtils.deprecated_args(perceputally_uniform_channel_colors="colormap") def create_ome_xml(shape_xyzct, bf_dtype, is_rgb, pixel_physical_size_xyu=None, channel_names=None, colormap=None): - """Create new ome-xmml object + """Create new ome-xml object Parameters ------- diff --git a/valis/slide_io.py b/valis/slide_io.py index e8dca694..d20e4eed 100644 --- a/valis/slide_io.py +++ b/valis/slide_io.py @@ -3198,7 +3198,7 @@ def check_channel_names(channel_names, is_rgb, nc, src_f=None): def create_ome_xml(shape_xyzct, bf_dtype, is_rgb, pixel_physical_size_xyu=None, channel_names=None, colormap=CMAP_AUTO): - """Create new ome-xmml object + """Create new ome-xml object Parameters ------- From 378876c5f7ef2aec1b584263d1d9e3add5f4056c Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Fri, 6 Mar 2026 01:02:48 +0900 Subject: [PATCH 137/152] Fix typos in comments --- valis/slide_io.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/valis/slide_io.py b/valis/slide_io.py index d20e4eed..42b8225f 100644 --- a/valis/slide_io.py +++ b/valis/slide_io.py @@ -3312,7 +3312,7 @@ def get_tile_wh(reader, level, out_shape_wh, default_wh=512): tile_wh = 16 if np.any(np.array(out_shape_wh[0:2]) < tile_wh): - # Tile is too big for the image. Get niggest tile size that fit in image + # Tile is too big for the image. Get the biggest tile size that fits in the image. if tile_wh < default_wh: min_wh = 16 else: From 6e826cd08392a923618fb0dbd2fe26f963351305 Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Fri, 6 Mar 2026 01:03:44 +0900 Subject: [PATCH 138/152] Fix typo: bioformmats -> bioformats --- examples/acrobat_2023/valis/slide_io.py | 2 +- valis/slide_io.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/acrobat_2023/valis/slide_io.py b/examples/acrobat_2023/valis/slide_io.py index e9962e3a..575ae446 100644 --- a/examples/acrobat_2023/valis/slide_io.py +++ b/examples/acrobat_2023/valis/slide_io.py @@ -1182,7 +1182,7 @@ def _get_slide_dimensions(self, rdr): Notes ----- - Using javabridge and python-bioformmats, this can be accessed as follows + Using javabridge and python-bioformats, this can be accessed as follows ` bf_slide = bioformats.ImageReader(slide_f) bf_img_reader = javabridge.JWrapper(bf_slide.rdr.o) diff --git a/valis/slide_io.py b/valis/slide_io.py index 42b8225f..5664be03 100644 --- a/valis/slide_io.py +++ b/valis/slide_io.py @@ -1537,7 +1537,7 @@ def _get_slide_dimensions(self, rdr): Notes ----- - Using javabridge and python-bioformmats, this can be accessed as follows + Using javabridge and python-bioformats, this can be accessed as follows ` bf_slide = bioformats.ImageReader(slide_f) bf_img_reader = javabridge.JWrapper(bf_slide.rdr.o) From 801ed5e36f7265e30af5f3a7dd01a84778df6b5b Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Fri, 6 Mar 2026 01:04:10 +0900 Subject: [PATCH 139/152] Fix typo: bioforamts -> bioformats --- examples/acrobat_2023/valis/slide_io.py | 4 ++-- valis/slide_io.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/acrobat_2023/valis/slide_io.py b/examples/acrobat_2023/valis/slide_io.py index 575ae446..17ecd055 100644 --- a/examples/acrobat_2023/valis/slide_io.py +++ b/examples/acrobat_2023/valis/slide_io.py @@ -78,11 +78,11 @@ Created after initializing JVM.""" ome = None -"""Bioformats ome from bioforamts_jar. +"""Bioformats ome from bioformats_jar. Created after initializing JVM.""" loci = None -"""Bioformats loci from bioforamts_jar. +"""Bioformats loci from bioformats_jar. Created after initializing JVM.""" diff --git a/valis/slide_io.py b/valis/slide_io.py index 5664be03..1cbb68d7 100644 --- a/valis/slide_io.py +++ b/valis/slide_io.py @@ -126,11 +126,11 @@ def read_bf_formats(): Created after initializing JVM.""" ome = None -"""Bioformats ome from bioforamts_jar. +"""Bioformats ome from bioformats_jar. Created after initializing JVM.""" loci = None -"""Bioformats loci from bioforamts_jar. +"""Bioformats loci from bioformats_jar. Created after initializing JVM.""" OME_TYPES_PARSER = "lxml" From 921fab75b7bbdee257387c6a32074eb24fae1610 Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Fri, 6 Mar 2026 01:04:26 +0900 Subject: [PATCH 140/152] Fix typo: boformats -> bioformats --- examples/acrobat_2023/valis/slide_io.py | 2 +- valis/slide_io.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/acrobat_2023/valis/slide_io.py b/examples/acrobat_2023/valis/slide_io.py index 17ecd055..74824f5f 100644 --- a/examples/acrobat_2023/valis/slide_io.py +++ b/examples/acrobat_2023/valis/slide_io.py @@ -87,7 +87,7 @@ """ -NOTE: Commented out block is how to use boformats with javabrdige. +NOTE: Commented out block is how to use bioformats with javabrdige. However, on conda, javabridge isn't available for python 3.9. If using, remember to put bftools/bioformats_package.jar in the source directory. diff --git a/valis/slide_io.py b/valis/slide_io.py index 1cbb68d7..7c988440 100644 --- a/valis/slide_io.py +++ b/valis/slide_io.py @@ -136,7 +136,7 @@ def read_bf_formats(): OME_TYPES_PARSER = "lxml" """ -NOTE: Commented out block is how to use boformats with javabrdige. +NOTE: Commented out block is how to use bioformats with javabrdige. However, on conda, javabridge isn't available for python 3.9. If using, remember to put bftools/bioformats_package.jar in the source directory. From 98e6fa56913bba8e1fcfafded93fa27cc9f6bf85 Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Fri, 6 Mar 2026 01:04:49 +0900 Subject: [PATCH 141/152] Fix typo: mircometer -> micrometer --- examples/acrobat_2023/valis/slide_io.py | 2 +- valis/slide_io.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/acrobat_2023/valis/slide_io.py b/examples/acrobat_2023/valis/slide_io.py index 74824f5f..b82a7e3d 100644 --- a/examples/acrobat_2023/valis/slide_io.py +++ b/examples/acrobat_2023/valis/slide_io.py @@ -74,7 +74,7 @@ Created after initializing JVM.""" BF_MICROMETER = None -"""Bioformats Unit mircometer object. +"""Bioformats Unit micrometer object. Created after initializing JVM.""" ome = None diff --git a/valis/slide_io.py b/valis/slide_io.py index 7c988440..67c6406e 100644 --- a/valis/slide_io.py +++ b/valis/slide_io.py @@ -122,7 +122,7 @@ def read_bf_formats(): Created after initializing JVM.""" BF_MICROMETER = None -"""Bioformats Unit mircometer object. +"""Bioformats Unit micrometer object. Created after initializing JVM.""" ome = None From 9860208c01ff3752f2ae9fb2ee2d83399d1159f0 Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Fri, 6 Mar 2026 01:05:40 +0900 Subject: [PATCH 142/152] Fix typo: an -> and --- examples/acrobat_2023/valis/slide_io.py | 2 +- valis/slide_io.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/acrobat_2023/valis/slide_io.py b/examples/acrobat_2023/valis/slide_io.py index b82a7e3d..9d0e0484 100644 --- a/examples/acrobat_2023/valis/slide_io.py +++ b/examples/acrobat_2023/valis/slide_io.py @@ -2728,7 +2728,7 @@ def warp_and_save_slide(src_f, dst_f, transformation_src_shape_rc, transformatio which can be done using `warp_tools.get_inverse_field` level : int, optional - Pyramid level to warp an save + Pyramid level to warp and save series : int, optional Series number of image diff --git a/valis/slide_io.py b/valis/slide_io.py index 67c6406e..eac97180 100644 --- a/valis/slide_io.py +++ b/valis/slide_io.py @@ -3461,7 +3461,7 @@ def warp_and_save_slide(src_f, dst_f, transformation_src_shape_rc, transformatio which can be done using `warp_tools.get_inverse_field` level : int, optional - Pyramid level to warp an save + Pyramid level to warp and save series : int, optional Series number of image From f1399fe2b4160ddeec2a02b94d53471e4a5dac9d Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Fri, 6 Mar 2026 01:06:31 +0900 Subject: [PATCH 143/152] Fix typo: heigth -> height --- examples/acrobat_2023/valis/slide_io.py | 2 +- valis/slide_io.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/acrobat_2023/valis/slide_io.py b/examples/acrobat_2023/valis/slide_io.py index 9d0e0484..fecd2dac 100644 --- a/examples/acrobat_2023/valis/slide_io.py +++ b/examples/acrobat_2023/valis/slide_io.py @@ -2462,7 +2462,7 @@ def get_shape_xyzct(shape_wh, n_channels): Parameters ---------- shape_wh : tuple of int - Width and heigth of image + Width and height of image n_channels : int Number of channels in the image diff --git a/valis/slide_io.py b/valis/slide_io.py index eac97180..0c480aa8 100644 --- a/valis/slide_io.py +++ b/valis/slide_io.py @@ -3020,7 +3020,7 @@ def get_shape_xyzct(shape_wh, n_channels, nt=1, nz=1): Parameters ---------- shape_wh : tuple of int - Width and heigth of image + Width and height of image n_channels : int Number of channels in the image From 2d1b4502689391f5603b0b34b4c59c92181fe8e6 Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Fri, 6 Mar 2026 01:07:30 +0900 Subject: [PATCH 144/152] Fix typo: naames -> names --- examples/acrobat_2023/valis/slide_io.py | 2 +- valis/slide_io.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/acrobat_2023/valis/slide_io.py b/examples/acrobat_2023/valis/slide_io.py index fecd2dac..cf5c7a2a 100644 --- a/examples/acrobat_2023/valis/slide_io.py +++ b/examples/acrobat_2023/valis/slide_io.py @@ -1486,7 +1486,7 @@ def _get_channel_names(self, vips_img): Returns ------- channel_names : list - List of channel naames. + List of channel names. """ diff --git a/valis/slide_io.py b/valis/slide_io.py index 0c480aa8..85acd8c4 100644 --- a/valis/slide_io.py +++ b/valis/slide_io.py @@ -1905,7 +1905,7 @@ def _get_channel_names(self, vips_img, *args, **kwargs): Returns ------- channel_names : list - List of channel naames. + List of channel names. """ @@ -2264,7 +2264,7 @@ def _get_channel_names(self, vips_img, *args, **kwargs): Returns ------- channel_names : list - List of channel naames. + List of channel names. """ From 562d8594559533c2684a8ce313e84a5d533fd7eb Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Fri, 6 Mar 2026 01:08:24 +0900 Subject: [PATCH 145/152] Change function names: check_czi_jpegxr -> check_czi_jpgxr --- valis/slide_io.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/valis/slide_io.py b/valis/slide_io.py index 85acd8c4..30b1cb09 100644 --- a/valis/slide_io.py +++ b/valis/slide_io.py @@ -432,7 +432,7 @@ def bf2vips_dtype(bf_dtype): return vips_format -def check_czi_jpegxr(src_f): +def check_czi_jpgxr(src_f): f_extension = slide_tools.get_slide_extension(src_f) if f_extension != ".czi": return False @@ -2932,7 +2932,7 @@ def get_slide_reader(src_f, series=None): return VipsSlideReader if is_czi: - is_jpegxr = check_czi_jpegxr(src_f) + is_jpegxr = check_czi_jpgxr(src_f) is_m1_mac = valtils.check_m1_mac() if is_m1_mac and is_jpegxr: msg = "Will likely be errors using Bioformats to read a JPEGXR compressed CZI on this Apple M1 machine. Will use CziJpgxrReader instead." From 8d9dd3497f5b1cacc4568bcca8e02f6bd92bf200 Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Fri, 6 Mar 2026 01:11:18 +0900 Subject: [PATCH 146/152] Add comma to the next of 'Otherwise' --- examples/acrobat_2023/valis/registration.py | 4 ++-- examples/acrobat_2023/valis/slide_io.py | 22 ++++++++++----------- valis/registration.py | 4 ++-- valis/slide_io.py | 20 +++++++++---------- 4 files changed, 25 insertions(+), 25 deletions(-) diff --git a/examples/acrobat_2023/valis/registration.py b/examples/acrobat_2023/valis/registration.py index 5aa9f8df..8d0c5e15 100644 --- a/examples/acrobat_2023/valis/registration.py +++ b/examples/acrobat_2023/valis/registration.py @@ -402,7 +402,7 @@ def slide2image(self, level, series=None, xywh=None): xywh : tuple of int, optional The region to be sliced from the slide. If None, - then the entire slide will be converted. Otherwise + then the entire slide will be converted. Otherwise, xywh is the (top left x, top left y, width, height) of the region to be sliced. @@ -430,7 +430,7 @@ def slide2vips(self, level, series=None, xywh=None): xywh : tuple of int, optional The region to be sliced from the slide. If None, - then the entire slide will be converted. Otherwise + then the entire slide will be converted. Otherwise, xywh is the (top left x, top left y, width, height) of the region to be sliced. diff --git a/examples/acrobat_2023/valis/slide_io.py b/examples/acrobat_2023/valis/slide_io.py index cf5c7a2a..be66e225 100644 --- a/examples/acrobat_2023/valis/slide_io.py +++ b/examples/acrobat_2023/valis/slide_io.py @@ -631,7 +631,7 @@ def slide2vips(self, level, xywh=None, *args, **kwargs): xywh : tuple of int, optional The region to be sliced from the slide. If None, - then the entire slide will be converted. Otherwise + then the entire slide will be converted. Otherwise, xywh is the (top left x, top left y, width, height) of the region to be sliced. @@ -652,7 +652,7 @@ def slide2image(self, level, xywh=None, *args, **kwargs): xywh : tuple of int, optional The region to be sliced from the slide. If None, - then the entire slide will be converted. Otherwise + then the entire slide will be converted. Otherwise, xywh is the (top left x, top left y, width, height) of the region to be sliced. @@ -922,7 +922,7 @@ def slide2vips(self, level, series=None, xywh=None, tile_wh=None, *args, **kwarg xywh : tuple of int, optional The region to be sliced from the slide. If None, - then the entire slide will be converted. Otherwise + then the entire slide will be converted. Otherwise, xywh is the (top left x, top left y, width, height) of the region to be sliced. @@ -983,7 +983,7 @@ def slide2image(self, level, series=None, xywh=None, *args, **kwargs): xywh : tuple of int, optional The region to be sliced from the slide. If None, - then the entire slide will be converted. Otherwise + then the entire slide will be converted. Otherwise, xywh is the (top left x, top left y, width, height) of the region to be sliced. @@ -1354,7 +1354,7 @@ def _slide2vips_ome_one_series(self, level, *args, **kwargs): xywh : tuple of int, optional The region to be sliced from the slide. If None, - then the entire slide will be converted. Otherwise + then the entire slide will be converted. Otherwise, xywh is the (top left x, top left y, width, height) of the region to be sliced. @@ -1393,7 +1393,7 @@ def slide2vips(self, level, xywh=None, *args, **kwargs): xywh : tuple of int, optional The region to be sliced from the slide. If None, - then the entire slide will be converted. Otherwise + then the entire slide will be converted. Otherwise, xywh is the (top left x, top left y, width, height) of the region to be sliced. @@ -1440,7 +1440,7 @@ def slide2image(self, level, xywh=None, *args, **kwargs): xywh : tuple of int, optional The region to be sliced from the slide. If None, - then the entire slide will be converted. Otherwise + then the entire slide will be converted. Otherwise, xywh is the (top left x, top left y, width, height) of the region to be sliced. @@ -1713,7 +1713,7 @@ def slide2vips(self, level, xywh=None, *args, **kwargs): xywh : tuple of int, optional The region to be sliced from the slide. If None, - then the entire slide will be converted. Otherwise + then the entire slide will be converted. Otherwise, xywh is the (top left x, top left y, width, height) of the region to be sliced. @@ -1956,7 +1956,7 @@ def slide2vips(self, level, xywh=None, *args, **kwargs): xywh : tuple of int, optional The region to be sliced from the slide. If None, - then the entire slide will be converted. Otherwise + then the entire slide will be converted. Otherwise, xywh is the (top left x, top left y, width, height) of the region to be sliced. @@ -1985,7 +1985,7 @@ def slide2image(self, level, xywh=None, *args, **kwargs): xywh : tuple of int, optional The region to be sliced from the slide. If None, - then the entire slide will be converted. Otherwise + then the entire slide will be converted. Otherwise, xywh is the (top left x, top left y, width, height) of the region to be sliced. @@ -2969,7 +2969,7 @@ def convert_to_ome_tiff(src_f, dst_f, level, series=None, xywh=None, xywh : tuple of int, optional The region of the slide to be converted. If None, - then the entire slide will be converted. Otherwise + then the entire slide will be converted. Otherwise, xywh is the (top left x, top left y, width, height) of the region to be sliced. diff --git a/valis/registration.py b/valis/registration.py index de5b060e..974248bd 100644 --- a/valis/registration.py +++ b/valis/registration.py @@ -456,7 +456,7 @@ def slide2image(self, level, series=None, xywh=None): xywh : tuple of int, optional The region to be sliced from the slide. If None, - then the entire slide will be converted. Otherwise + then the entire slide will be converted. Otherwise, xywh is the (top left x, top left y, width, height) of the region to be sliced. @@ -484,7 +484,7 @@ def slide2vips(self, level, series=None, xywh=None): xywh : tuple of int, optional The region to be sliced from the slide. If None, - then the entire slide will be converted. Otherwise + then the entire slide will be converted. Otherwise, xywh is the (top left x, top left y, width, height) of the region to be sliced. diff --git a/valis/slide_io.py b/valis/slide_io.py index 30b1cb09..b0169ce1 100644 --- a/valis/slide_io.py +++ b/valis/slide_io.py @@ -982,7 +982,7 @@ def slide2vips(self, level, xywh=None, *args, **kwargs): xywh : tuple of int, optional The region to be sliced from the slide. If None, - then the entire slide will be converted. Otherwise + then the entire slide will be converted. Otherwise, xywh is the (top left x, top left y, width, height) of the region to be sliced. @@ -1003,7 +1003,7 @@ def slide2image(self, level, xywh=None, *args, **kwargs): xywh : tuple of int, optional The region to be sliced from the slide. If None, - then the entire slide will be converted. Otherwise + then the entire slide will be converted. Otherwise, xywh is the (top left x, top left y, width, height) of the region to be sliced. @@ -1275,7 +1275,7 @@ def slide2vips(self, level, series=None, xywh=None, tile_wh=None, z=0, t=0, *arg xywh : tuple of int, optional The region to be sliced from the slide. If None, - then the entire slide will be converted. Otherwise + then the entire slide will be converted. Otherwise, xywh is the (top left x, top left y, width, height) of the region to be sliced. @@ -1340,7 +1340,7 @@ def slide2image(self, level, series=None, xywh=None, z=0, t=0, *args, **kwargs): xywh : tuple of int, optional The region to be sliced from the slide. If None, - then the entire slide will be converted. Otherwise + then the entire slide will be converted. Otherwise, xywh is the (top left x, top left y, width, height) of the region to be sliced. @@ -1747,7 +1747,7 @@ def _slide2vips_ome_one_series(self, level, *args, **kwargs): xywh : tuple of int, optional The region to be sliced from the slide. If None, - then the entire slide will be converted. Otherwise + then the entire slide will be converted. Otherwise, xywh is the (top left x, top left y, width, height) of the region to be sliced. @@ -1785,7 +1785,7 @@ def slide2vips(self, level, xywh=None, *args, **kwargs): xywh : tuple of int, optional The region to be sliced from the slide. If None, - then the entire slide will be converted. Otherwise + then the entire slide will be converted. Otherwise, xywh is the (top left x, top left y, width, height) of the region to be sliced. @@ -1836,7 +1836,7 @@ def slide2image(self, level, xywh=None, *args, **kwargs): xywh : tuple of int, optional The region to be sliced from the slide. If None, - then the entire slide will be converted. Otherwise + then the entire slide will be converted. Otherwise, xywh is the (top left x, top left y, width, height) of the region to be sliced. @@ -2175,7 +2175,7 @@ def slide2vips(self, level, xywh=None, *args, **kwargs): xywh : tuple of int, optional The region to be sliced from the slide. If None, - then the entire slide will be converted. Otherwise + then the entire slide will be converted. Otherwise, xywh is the (top left x, top left y, width, height) of the region to be sliced. @@ -2553,7 +2553,7 @@ def slide2image(self, level, xywh=None, *args, **kwargs): xywh : tuple of int, optional The region to be sliced from the slide. If None, - then the entire slide will be converted. Otherwise + then the entire slide will be converted. Otherwise, xywh is the (top left x, top left y, width, height) of the region to be sliced. @@ -3724,7 +3724,7 @@ def convert_to_ome_tiff(src_f, dst_f, level, series=None, xywh=None, xywh : tuple of int, optional The region of the slide to be converted. If None, - then the entire slide will be converted. Otherwise + then the entire slide will be converted. Otherwise, xywh is the (top left x, top left y, width, height) of the region to be sliced. From ecf5f500f2c4b2764c31d84bb26882d740373b8e Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Fri, 6 Mar 2026 01:13:01 +0900 Subject: [PATCH 147/152] Make simpler expression: 'Whether or not to' -> Whether to --- examples/acrobat_2023/valis/registration.py | 28 ++++++++-------- examples/acrobat_2023/valis/warp_tools.py | 6 ++-- examples/acrobat_2023/valis_acrobat_2023.py | 2 +- valis/preprocessing.py | 4 +-- valis/registration.py | 36 ++++++++++----------- valis/slide_io.py | 6 ++-- valis/warp_tools.py | 6 ++-- 7 files changed, 44 insertions(+), 44 deletions(-) diff --git a/examples/acrobat_2023/valis/registration.py b/examples/acrobat_2023/valis/registration.py index 8d0c5e15..50868118 100644 --- a/examples/acrobat_2023/valis/registration.py +++ b/examples/acrobat_2023/valis/registration.py @@ -663,7 +663,7 @@ def warp_img(self, img=None, non_rigid=True, crop=True, interp_method="bicubic") will be warped. non_rigid : bool - Whether or not to conduct non-rigid warping. If False, + Whether to conduct non-rigid warping. If False, then only a rigid transformation will be applied. crop: bool, str @@ -774,7 +774,7 @@ def warp_img_from_to(self, img, to_slide_obj, Pyramid level of the slide/image that `img` will be warped on to non_rigid : bool, optional - Whether or not to conduct non-rigid warping. If False, + Whether to conduct non-rigid warping. If False, then only a rigid transformation will be applied. """ @@ -826,7 +826,7 @@ def warp_slide(self, level, non_rigid=True, crop=True, Pyramid level to be warped non_rigid : bool, optional - Whether or not to conduct non-rigid warping. If False, + Whether to conduct non-rigid warping. If False, then only a rigid transformation will be applied. Default is True crop: bool, str @@ -920,7 +920,7 @@ def warp_and_save_slide(self, dst_f, level=0, non_rigid=True, Pyramid level to be warped non_rigid : bool, optional - Whether or not to conduct non-rigid warping. If False, + Whether to conduct non-rigid warping. If False, then only a rigid transformation will be applied. Default is True crop: bool, str @@ -1034,7 +1034,7 @@ def warp_xy(self, xy, M=None, slide_level=0, pt_level=0, image's shape (row, col). Default is 0. non_rigid : bool, optional - Whether or not to conduct non-rigid warping. If False, + Whether to conduct non-rigid warping. If False, then only a rigid transformation will be applied. Default is True. crop: bool, str @@ -1134,7 +1134,7 @@ def warp_xy_from_to(self, xy, to_slide_obj, src_slide_level=0, src_pt_level=0, to their location in an image with that same shape. non_rigid : bool, optional - Whether or not to conduct non-rigid warping. If False, + Whether to conduct non-rigid warping. If False, then only a rigid transformation will be applied. """ @@ -1210,7 +1210,7 @@ def warp_geojson(self, geojson_f, M=None, slide_level=0, pt_level=0, image's shape (row, col). Default is 0. non_rigid : bool, optional - Whether or not to conduct non-rigid warping. If False, + Whether to conduct non-rigid warping. If False, then only a rigid transformation will be applied. Default is True. crop: bool, str @@ -1324,7 +1324,7 @@ def warp_geojson_from_to(self, geojson_f, to_slide_obj, src_slide_level=0, src_p to their location in an image with that same shape. non_rigid : bool, optional - Whether or not to conduct non-rigid warping. If False, + Whether to conduct non-rigid warping. If False, then only a rigid transformation will be applied. Returns @@ -1755,7 +1755,7 @@ def __init__(self, src_dir, dst_dir, series=None, name=None, image_type=None, methods and arguments. compose_non_rigid : bool, optional - Whether or not to compose non-rigid transformations. If `True`, + Whether to compose non-rigid transformations. If `True`, then an image is non-rigidly warped before aligning to the adjacent non-rigidly aligned image. This allows the transformations to accumulate, which may bring distant features together but could @@ -1771,7 +1771,7 @@ def __init__(self, src_dir, dst_dir, series=None, name=None, image_type=None, Valis.slide_dict. do_rigid: bool, dictionary, optional - Whether or not to perform rigid registration. If `False`, rigid + Whether to perform rigid registration. If `False`, rigid registration will be skipped. If `do_rigid` is a dictionary, it should contain inverse transformation @@ -1801,7 +1801,7 @@ def __init__(self, src_dir, dst_dir, series=None, name=None, image_type=None, is defined, then `crop` will be set to "reference". create_masks : bool, optional - Whether or not to create and apply masks for registration. + Whether to create and apply masks for registration. Can help focus alignment on the tissue, but can sometimes mask too much if there is a lot of variation in the image. @@ -4415,7 +4415,7 @@ def warp_and_save_slides(self, dst_dir, level=0, non_rigid=True, resolution image will be warped and saved. non_rigid : bool, optional - Whether or not to conduct non-rigid warping. If False, + Whether to conduct non-rigid warping. If False, then only a rigid transformation will be applied. Default is True crop: bool, str @@ -4482,7 +4482,7 @@ def warp_and_merge_slides(self, dst_f=None, level=0, non_rigid=True, resolution image will be warped and saved. non_rigid : bool, optional - Whether or not to conduct non-rigid warping. If False, + Whether to conduct non-rigid warping. If False, then only a rigid transformation will be applied. Default is True crop: bool, str @@ -4507,7 +4507,7 @@ def warp_and_merge_slides(self, dst_f=None, level=0, non_rigid=True, List of RGB colors (0-255) to use for channel colors drop_duplicates : bool, optional - Whether or not to drop duplicate channels that might be found in multiple slides. + Whether to drop duplicate channels that might be found in multiple slides. For example, if DAPI is in multiple slides, then the only the DAPI channel in the first slide will be kept. diff --git a/examples/acrobat_2023/valis/warp_tools.py b/examples/acrobat_2023/valis/warp_tools.py index cdb26244..778726b4 100644 --- a/examples/acrobat_2023/valis/warp_tools.py +++ b/examples/acrobat_2023/valis/warp_tools.py @@ -1499,10 +1499,10 @@ def get_reflection_M(reflect_x, reflect_y, shape_rc): ---------- reflect_x : bool - Whether or not to reflect the x-axis (columns) + Whether to reflect the x-axis (columns) reflecct y : bool - Whether or not to reflect the y-axis (rows) + Whether to reflect the y-axis (rows) shape_rc : tuple of int Shape of the image being reflected @@ -1698,7 +1698,7 @@ def get_mesh(shape, grid_spacing, bbox_rc_wh=None, inclusive=False): (row, column, width, height) of bounding box inclusive : bool - Whether or not to include image edges + Whether to include image edges """ diff --git a/examples/acrobat_2023/valis_acrobat_2023.py b/examples/acrobat_2023/valis_acrobat_2023.py index 3cb235b6..f3685035 100644 --- a/examples/acrobat_2023/valis_acrobat_2023.py +++ b/examples/acrobat_2023/valis_acrobat_2023.py @@ -41,7 +41,7 @@ parser.add_argument('-PATH_OUTPUT_DIR', type=str, help='csv containing image pairs and landmarks') parser.add_argument('-row_idx', type=int, help='name/row of sample') parser.add_argument('-micro_reg_fraction', type=str, help='Size of images used for 2nd registation') - parser.add_argument('-use_masks', type=str, help='Whether or not to use masks for registration') + parser.add_argument('-use_masks', type=str, help='Whether to use masks for registration') args = vars(parser.parse_args()) diff --git a/valis/preprocessing.py b/valis/preprocessing.py index 89c365dd..e1ee2e70 100644 --- a/valis/preprocessing.py +++ b/valis/preprocessing.py @@ -268,7 +268,7 @@ def process_image(self, cspace="JzAzBz", method="similarity", adaptive_eq=False, How to calculate similarity of each pixel to colors detected in image adaptive_eq : bool - Whether or not to apply adaptive histogram equalization + Whether to apply adaptive histogram equalization Returns ------- @@ -2412,7 +2412,7 @@ def img_to_tensor(img, return_rgb=True): or (H, W) for single channel return_rgb: bool - Whether or not to convert greyscale image to RGB + Whether to convert greyscale image to RGB Returns -------- diff --git a/valis/registration.py b/valis/registration.py index 974248bd..11c3d67a 100644 --- a/valis/registration.py +++ b/valis/registration.py @@ -735,7 +735,7 @@ def warp_img(self, img=None, non_rigid=True, crop=True, interp_method="bicubic") will be warped. non_rigid : bool - Whether or not to conduct non-rigid warping. If False, + Whether to conduct non-rigid warping. If False, then only a rigid transformation will be applied. crop: bool, str @@ -850,7 +850,7 @@ def warp_img_from_to(self, img, to_slide_obj, Pyramid level of the slide/image that `img` will be warped on to non_rigid : bool, optional - Whether or not to conduct non-rigid warping. If False, + Whether to conduct non-rigid warping. If False, then only a rigid transformation will be applied. """ @@ -902,7 +902,7 @@ def warp_slide(self, level, non_rigid=True, crop=True, Pyramid level to be warped non_rigid : bool, optional - Whether or not to conduct non-rigid warping. If False, + Whether to conduct non-rigid warping. If False, then only a rigid transformation will be applied. Default is True crop: bool, str @@ -1024,7 +1024,7 @@ def warp_and_save_slide(self, dst_f, level=0, non_rigid=True, Pyramid level to be warped non_rigid : bool, optional - Whether or not to conduct non-rigid warping. If False, + Whether to conduct non-rigid warping. If False, then only a rigid transformation will be applied. Default is True crop: bool, str @@ -1063,7 +1063,7 @@ def warp_and_save_slide(self, dst_f, level=0, non_rigid=True, Q factor for lossy compression pyramid : bool - Whether or not to save an image pyramid. + Whether to save an image pyramid. """ if src_f is None: @@ -1132,7 +1132,7 @@ def warp_xy(self, xy, M=None, slide_level=0, pt_level=0, image's shape (row, col). Default is 0. non_rigid : bool, optional - Whether or not to conduct non-rigid warping. If False, + Whether to conduct non-rigid warping. If False, then only a rigid transformation will be applied. Default is True. crop: bool, str @@ -1232,7 +1232,7 @@ def warp_xy_from_to(self, xy, to_slide_obj, src_slide_level=0, src_pt_level=0, to their location in an image with that same shape. non_rigid : bool, optional - Whether or not to conduct non-rigid warping. If False, + Whether to conduct non-rigid warping. If False, then only a rigid transformation will be applied. """ @@ -1308,7 +1308,7 @@ def warp_geojson(self, geojson_f, M=None, slide_level=0, pt_level=0, image's shape (row, col). Default is 0. non_rigid : bool, optional - Whether or not to conduct non-rigid warping. If False, + Whether to conduct non-rigid warping. If False, then only a rigid transformation will be applied. Default is True. crop: bool, str @@ -1422,7 +1422,7 @@ def warp_geojson_from_to(self, geojson_f, to_slide_obj, src_slide_level=0, src_p to their location in an image with that same shape. non_rigid : bool, optional - Whether or not to conduct non-rigid warping. If False, + Whether to conduct non-rigid warping. If False, then only a rigid transformation will be applied. Returns @@ -1878,7 +1878,7 @@ def __init__(self, src_dir, dst_dir, series=None, name=None, image_type=None, methods and arguments. compose_non_rigid : bool, optional - Whether or not to compose non-rigid transformations. If `True`, + Whether to compose non-rigid transformations. If `True`, then an image is non-rigidly warped before aligning to the adjacent non-rigidly aligned image. This allows the transformations to accumulate, which may bring distant features together but could @@ -1894,7 +1894,7 @@ def __init__(self, src_dir, dst_dir, series=None, name=None, image_type=None, Valis.slide_dict. do_rigid: bool, dictionary, optional - Whether or not to perform rigid registration. If `False`, rigid + Whether to perform rigid registration. If `False`, rigid registration will be skipped. If `do_rigid` is a dictionary, it should contain inverse transformation @@ -1924,16 +1924,16 @@ def __init__(self, src_dir, dst_dir, series=None, name=None, image_type=None, is defined, then `crop` will be set to "reference". create_masks : bool, optional - Whether or not to create and apply masks for registration. + Whether to create and apply masks for registration. Can help focus alignment on the tissue, but can sometimes mask too much if there is a lot of variation in the image. denoise_rigid : bool, optional - Whether or not to denoise processed images before rigid registration. + Whether to denoise processed images before rigid registration. Note that un-denoised images are used in the non-rigid registration crop_for_rigid_reg : bool, optional - Whether or not to crop the images used for rigid registration. If `True`, + Whether to crop the images used for rigid registration. If `True`, then higher resolution images may be used for rigid registration, as valis will "zoom" in to the area around the mask created by `ImageProcessor.create_mask()`, and slice out that region and resize it to have a maximum dimension the same @@ -5124,7 +5124,7 @@ def warp_and_save_slides(self, dst_dir, level=0, non_rigid=True, resolution image will be warped and saved. non_rigid : bool, optional - Whether or not to conduct non-rigid warping. If False, + Whether to conduct non-rigid warping. If False, then only a rigid transformation will be applied. Default is True crop: bool, str @@ -5221,7 +5221,7 @@ def warp_and_merge_slides(self, dst_f=None, level=0, non_rigid=True, resolution image will be warped and saved. non_rigid : bool, optional - Whether or not to conduct non-rigid warping. If False, + Whether to conduct non-rigid warping. If False, then only a rigid transformation will be applied. Default is True crop: bool, str @@ -5246,7 +5246,7 @@ def warp_and_merge_slides(self, dst_f=None, level=0, non_rigid=True, List of RGB colors (0-255) to use for channel colors drop_duplicates : bool, optional - Whether or not to drop duplicate channels that might be found in multiple slides. + Whether to drop duplicate channels that might be found in multiple slides. For example, if DAPI is in multiple slides, then the only the DAPI channel in the first slide will be kept. @@ -5264,7 +5264,7 @@ def warp_and_merge_slides(self, dst_f=None, level=0, non_rigid=True, Q factor for lossy compression pyramid : bool - Whether or not to save an image pyramid. + Whether to save an image pyramid. Returns ------- diff --git a/valis/slide_io.py b/valis/slide_io.py index b0169ce1..7bafe5d1 100644 --- a/valis/slide_io.py +++ b/valis/slide_io.py @@ -3492,7 +3492,7 @@ def warp_and_save_slide(src_f, dst_f, transformation_src_shape_rc, transformatio Q factor for lossy compression pyramid : bool - Whether or not to save an image pyramid. + Whether to save an image pyramid. reader: SlideReader, optional Instantiated SlideReader to use to read image. If `None`, @@ -3557,7 +3557,7 @@ def save_ome_tiff(img, dst_f, ome_xml=None, tile_wh=512, compression=DEFAULT_COM Q factor for lossy compression pyramid : bool - Whether or not to save an image pyramid. + Whether to save an image pyramid. """ compression = compression.lower() @@ -3744,7 +3744,7 @@ def convert_to_ome_tiff(src_f, dst_f, level, series=None, xywh=None, Q factor for lossy compression pyramid : bool - Whether or not to save an image pyramid. + Whether to save an image pyramid. """ diff --git a/valis/warp_tools.py b/valis/warp_tools.py index b748adad..281444df 100644 --- a/valis/warp_tools.py +++ b/valis/warp_tools.py @@ -1629,10 +1629,10 @@ def get_reflection_M(reflect_x, reflect_y, shape_rc): ---------- reflect_x : bool - Whether or not to reflect the x-axis (columns) + Whether to reflect the x-axis (columns) reflecct y : bool - Whether or not to reflect the y-axis (rows) + Whether to reflect the y-axis (rows) shape_rc : tuple of int Shape of the image being reflected @@ -1828,7 +1828,7 @@ def get_mesh(shape, grid_spacing, bbox_rc_wh=None, inclusive=False): (row, column, width, height) of bounding box inclusive : bool - Whether or not to include image edges + Whether to include image edges """ From de2269fc6a3aa7e1451b9fa430359086c69bd01e Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Fri, 6 Mar 2026 01:14:32 +0900 Subject: [PATCH 148/152] Revise argument descriptions --- examples/acrobat_2023/valis/affine_optimizer.py | 2 +- valis/affine_optimizer.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/acrobat_2023/valis/affine_optimizer.py b/examples/acrobat_2023/valis/affine_optimizer.py index 630f6727..efc8420c 100644 --- a/examples/acrobat_2023/valis/affine_optimizer.py +++ b/examples/acrobat_2023/valis/affine_optimizer.py @@ -495,7 +495,7 @@ class AffineOptimizer(object): Current level of the Guassian pyramid that is being registered accepts_xy : bool - Bool declaring whether or not the optimizer will use corresponding points to optimize the registration + Boolean indicating whether the optimizer uses corresponding points to optimize registration. Methods ------- diff --git a/valis/affine_optimizer.py b/valis/affine_optimizer.py index b2a4fe71..e8a2006d 100644 --- a/valis/affine_optimizer.py +++ b/valis/affine_optimizer.py @@ -481,7 +481,7 @@ class AffineOptimizer(object): Current level of the Guassian pyramid that is being registered accepts_xy : bool - Bool declaring whether or not the optimizer will use corresponding points to optimize the registration + Boolean indicating whether the optimizer uses corresponding points to optimize registration. Methods ------- From f6f15bc09d0682a011e262f3a534083657c35c07 Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Fri, 6 Mar 2026 01:14:51 +0900 Subject: [PATCH 149/152] Fix typo: Guassian -> Gaussian --- examples/acrobat_2023/valis/affine_optimizer.py | 2 +- valis/affine_optimizer.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/acrobat_2023/valis/affine_optimizer.py b/examples/acrobat_2023/valis/affine_optimizer.py index efc8420c..099689dd 100644 --- a/examples/acrobat_2023/valis/affine_optimizer.py +++ b/examples/acrobat_2023/valis/affine_optimizer.py @@ -492,7 +492,7 @@ class AffineOptimizer(object): Type of transformation, "EuclideanTransform" or "SimilarityTransform" current_level : int - Current level of the Guassian pyramid that is being registered + Current level of the Gaussian pyramid that is being registered accepts_xy : bool Boolean indicating whether the optimizer uses corresponding points to optimize registration. diff --git a/valis/affine_optimizer.py b/valis/affine_optimizer.py index e8a2006d..0aecb6d3 100644 --- a/valis/affine_optimizer.py +++ b/valis/affine_optimizer.py @@ -478,7 +478,7 @@ class AffineOptimizer(object): Type of transformation, "EuclideanTransform" or "SimilarityTransform" current_level : int - Current level of the Guassian pyramid that is being registered + Current level of the Gaussian pyramid that is being registered accepts_xy : bool Boolean indicating whether the optimizer uses corresponding points to optimize registration. From 036af14110225b2ab93a34816c2326ec599dccd5 Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Fri, 6 Mar 2026 01:15:13 +0900 Subject: [PATCH 150/152] Fix typo: ridid -> rigid --- examples/acrobat_2023/valis/affine_optimizer.py | 2 +- valis/affine_optimizer.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/acrobat_2023/valis/affine_optimizer.py b/examples/acrobat_2023/valis/affine_optimizer.py index 099689dd..4007a1b1 100644 --- a/examples/acrobat_2023/valis/affine_optimizer.py +++ b/examples/acrobat_2023/valis/affine_optimizer.py @@ -473,7 +473,7 @@ def MI(fixed, moving, nb, spacing): class AffineOptimizer(object): - """Class that optimizes ridid registration + """Class that optimizes rigid registration Attributes ---------- diff --git a/valis/affine_optimizer.py b/valis/affine_optimizer.py index 0aecb6d3..0ac40091 100644 --- a/valis/affine_optimizer.py +++ b/valis/affine_optimizer.py @@ -459,7 +459,7 @@ def MI(fixed, moving, nb, spacing): class AffineOptimizer(object): - """Class that optimizes ridid registration + """Class that optimizes rigid registration Attributes ---------- From b3b065aad375e1b8198d4ac3908da5e87a15d572 Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Fri, 6 Mar 2026 01:27:11 +0900 Subject: [PATCH 151/152] Fix typo: 'inside of' -> 'inside' --- examples/acrobat_2023/valis/affine_optimizer.py | 2 +- examples/acrobat_2023/valis/warp_tools.py | 2 +- valis/affine_optimizer.py | 2 +- valis/warp_tools.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/acrobat_2023/valis/affine_optimizer.py b/examples/acrobat_2023/valis/affine_optimizer.py index 4007a1b1..d0427d92 100644 --- a/examples/acrobat_2023/valis/affine_optimizer.py +++ b/examples/acrobat_2023/valis/affine_optimizer.py @@ -521,7 +521,7 @@ class AffineOptimizer(object): to have a new cost_fxn method. See AffineOptimizerDisplacement for an example implementing a new cost function Major overhauls are possible too. See AffineOptimizerMattesMI for an example on using SimpleITK's - optimization methods inside of an AffineOptimizer subclass + optimization methods inside an AffineOptimizer subclass If the optimizer uses corressponding points, then the class attribute accepts_xy needs to be set to True. The default is False. diff --git a/examples/acrobat_2023/valis/warp_tools.py b/examples/acrobat_2023/valis/warp_tools.py index 778726b4..025a8193 100644 --- a/examples/acrobat_2023/valis/warp_tools.py +++ b/examples/acrobat_2023/valis/warp_tools.py @@ -2723,7 +2723,7 @@ def get_xy_inside_mask(xy, mask): Returns ------- keep_idx : ndarray - Indices of `xy` that are inside of `mask` + Indices of `xy` that are inside `mask` """ mask_cnt, _ = cv2.findContours(mask, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE) diff --git a/valis/affine_optimizer.py b/valis/affine_optimizer.py index 0ac40091..5875a1dc 100644 --- a/valis/affine_optimizer.py +++ b/valis/affine_optimizer.py @@ -507,7 +507,7 @@ class AffineOptimizer(object): to have a new cost_fxn method. See AffineOptimizerDisplacement for an example implementing a new cost function Major overhauls are possible too. See AffineOptimizerMattesMI for an example on using SimpleITK's - optimization methods inside of an AffineOptimizer subclass + optimization methods inside an AffineOptimizer subclass If the optimizer uses corressponding points, then the class attribute accepts_xy needs to be set to True. The default is False. diff --git a/valis/warp_tools.py b/valis/warp_tools.py index 281444df..0eb7f434 100644 --- a/valis/warp_tools.py +++ b/valis/warp_tools.py @@ -2876,7 +2876,7 @@ def get_xy_inside_mask(xy, mask): Returns ------- keep_idx : ndarray - Indices of `xy` that are inside of `mask` + Indices of `xy` that are inside `mask` """ mask_cnt, _ = cv2.findContours(mask, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE) From aae5eb921646aaa95e233481947569cfbb489350 Mon Sep 17 00:00:00 2001 From: dandyrilla Date: Fri, 6 Mar 2026 01:28:02 +0900 Subject: [PATCH 152/152] Fix typo: corressponding -> corresponding --- examples/acrobat_2023/valis/affine_optimizer.py | 2 +- valis/affine_optimizer.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/acrobat_2023/valis/affine_optimizer.py b/examples/acrobat_2023/valis/affine_optimizer.py index d0427d92..9762db09 100644 --- a/examples/acrobat_2023/valis/affine_optimizer.py +++ b/examples/acrobat_2023/valis/affine_optimizer.py @@ -523,7 +523,7 @@ class AffineOptimizer(object): Major overhauls are possible too. See AffineOptimizerMattesMI for an example on using SimpleITK's optimization methods inside an AffineOptimizer subclass - If the optimizer uses corressponding points, then the class attribute + If the optimizer uses corresponding points, then the class attribute accepts_xy needs to be set to True. The default is False. """ diff --git a/valis/affine_optimizer.py b/valis/affine_optimizer.py index 5875a1dc..3f712fd1 100644 --- a/valis/affine_optimizer.py +++ b/valis/affine_optimizer.py @@ -509,7 +509,7 @@ class AffineOptimizer(object): Major overhauls are possible too. See AffineOptimizerMattesMI for an example on using SimpleITK's optimization methods inside an AffineOptimizer subclass - If the optimizer uses corressponding points, then the class attribute + If the optimizer uses corresponding points, then the class attribute accepts_xy needs to be set to True. The default is False. """