From 2882ef10902a6b5f227e82c07ad0f35212a213c1 Mon Sep 17 00:00:00 2001 From: Dimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com> Date: Wed, 19 Jul 2023 22:04:18 +0200 Subject: [PATCH] DOC: Fix typos found by codespell --- doc/source/dicom/dicom_intro.rst | 10 +++++----- doc/source/external/nifti1.h | 2 +- doc/source/old/format_design.txt | 2 +- nibabel/cifti2/cifti2_axes.py | 2 +- nibabel/tests/test_loadsave.py | 2 +- nibabel/tests/test_nifti1.py | 2 +- nibabel/tests/test_processing.py | 2 +- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/doc/source/dicom/dicom_intro.rst b/doc/source/dicom/dicom_intro.rst index f1508932c6..e618153396 100644 --- a/doc/source/dicom/dicom_intro.rst +++ b/doc/source/dicom/dicom_intro.rst @@ -228,22 +228,22 @@ Here is the start of the relevant section from PS 3.5: 7.8.1 PRIVATE DATA ELEMENT TAGS - It is possible that multiple implementors may define Private Elements with the + It is possible that multiple implementers may define Private Elements with the same (odd) group number. To avoid conflicts, Private Elements shall be assigned Private Data Element Tags according to the following rules. a) Private Creator Data Elements numbered (gggg,0010-00FF) (gggg is odd) shall be used to reserve a block of Elements with Group Number gggg for use by an - individual implementor. The implementor shall insert an identification code + individual implementer. The implementer shall insert an identification code in the first unused (unassigned) Element in this series to reserve a block of Private Elements. The VR of the private identification code shall be LO (Long String) and the VM shall be equal to 1. b) Private Creator Data Element (gggg,0010), is a Type 1 Data Element that - identifies the implementor reserving element (gggg,1000-10FF), Private Creator - Data Element (gggg,0011) identifies the implementor reserving elements + identifies the implementer reserving element (gggg,1000-10FF), Private Creator + Data Element (gggg,0011) identifies the implementer reserving elements (gggg,1100-11FF), and so on, until Private Creator Data Element (gggg,00FF) - identifies the implementor reserving elements (gggg,FF00- FFFF). + identifies the implementer reserving elements (gggg,FF00- FFFF). c) Encoders of Private Data Elements shall be able to dynamically assign private data to any available (unreserved) block(s) within the Private group, diff --git a/doc/source/external/nifti1.h b/doc/source/external/nifti1.h index 80066fb347..dce3a88c1a 100644 --- a/doc/source/external/nifti1.h +++ b/doc/source/external/nifti1.h @@ -869,7 +869,7 @@ typedef struct { unsigned char r,g,b; } rgb_byte ; as a displacement field or vector: - dataset must have a 5th dimension - intent_code must be NIFTI_INTENT_DISPVECT - - dim[5] must be the dimensionality of the displacment + - dim[5] must be the dimensionality of the displacement vector (e.g., 3 for spatial displacement, 2 for in-plane) */ #define NIFTI_INTENT_DISPVECT 1006 /* specifically for displacements */ diff --git a/doc/source/old/format_design.txt b/doc/source/old/format_design.txt index 29585866a9..fdbf9419ba 100644 --- a/doc/source/old/format_design.txt +++ b/doc/source/old/format_design.txt @@ -13,7 +13,7 @@ The Image and the Format objects form a `bridge pattern diagram `_ the Image class plays the role of the Abstraction, and the Format plays the -role of the implementor. +role of the implementer. The Format object provides an interface to the underlying file format. diff --git a/nibabel/cifti2/cifti2_axes.py b/nibabel/cifti2/cifti2_axes.py index 0c75190f80..bc6069a160 100644 --- a/nibabel/cifti2/cifti2_axes.py +++ b/nibabel/cifti2/cifti2_axes.py @@ -59,7 +59,7 @@ In this very simple case ``bm_cortex`` describes a left cortical surface skipping the second out of four vertices. ``bm_thal`` contains all voxels in a 2x2x2 volume. -Brain structure names automatically get converted to valid CIFTI-2 indentifiers using +Brain structure names automatically get converted to valid CIFTI-2 identifiers using :meth:`BrainModelAxis.to_cifti_brain_structure_name`. A 1-dimensional mask will be automatically interpreted as a surface element and a 3-dimensional mask as a volume element. diff --git a/nibabel/tests/test_loadsave.py b/nibabel/tests/test_loadsave.py index de1d818039..4071b09f72 100644 --- a/nibabel/tests/test_loadsave.py +++ b/nibabel/tests/test_loadsave.py @@ -192,7 +192,7 @@ def test_read_img_data_nifti(): assert_array_equal(actual_unscaled, read_img_data(img_back, prefer='unscaled')) # Check the offset too img.header.set_data_offset(1024) - # Delete arrays still pointing to file, so Windows can re-use + # Delete arrays still pointing to file, so Windows can reuse del actual_unscaled, unscaled_back img.to_file_map() # Write an integer of zeros after diff --git a/nibabel/tests/test_nifti1.py b/nibabel/tests/test_nifti1.py index 7b7f44fe0b..c7df6911ae 100644 --- a/nibabel/tests/test_nifti1.py +++ b/nibabel/tests/test_nifti1.py @@ -1169,7 +1169,7 @@ def test_dynamic_dtype_aliases(self): assert img.get_data_dtype() == alias img_rt = bytesio_round_trip(img) assert img_rt.get_data_dtype() == effective_dt - # Seralizing does not finalize the source image + # Serializing does not finalize the source image assert img.get_data_dtype() == alias def test_static_dtype_aliases(self): diff --git a/nibabel/tests/test_processing.py b/nibabel/tests/test_processing.py index ffd1fbff2b..27da6639c0 100644 --- a/nibabel/tests/test_processing.py +++ b/nibabel/tests/test_processing.py @@ -222,7 +222,7 @@ def test_resample_from_to(caplog): @needs_scipy def test_resample_to_output(caplog): - # Test routine to sample iamges to output space + # Test routine to sample images to output space # Image aligned to output axes - no-op data = np.arange(24, dtype='int32').reshape((2, 3, 4)) img = Nifti1Image(data, np.eye(4))