fepegar / torchio

Compare 68ffea7 ... +1 ... c9c9a5c

Coverage Reach
torchio/transforms/augmentation/intensity/random_labels_to_image.py torchio/transforms/augmentation/intensity/random_motion.py torchio/transforms/augmentation/intensity/random_ghosting.py torchio/transforms/augmentation/intensity/random_swap.py torchio/transforms/augmentation/intensity/random_bias_field.py torchio/transforms/augmentation/intensity/random_spike.py torchio/transforms/augmentation/intensity/random_gamma.py torchio/transforms/augmentation/intensity/random_blur.py torchio/transforms/augmentation/intensity/random_noise.py torchio/transforms/augmentation/intensity/__init__.py torchio/transforms/augmentation/spatial/random_affine.py torchio/transforms/augmentation/spatial/random_elastic_deformation.py torchio/transforms/augmentation/spatial/random_flip.py torchio/transforms/augmentation/spatial/random_anisotropy.py torchio/transforms/augmentation/spatial/__init__.py torchio/transforms/augmentation/composition.py torchio/transforms/augmentation/random_transform.py torchio/transforms/augmentation/__init__.py torchio/transforms/preprocessing/spatial/resample.py torchio/transforms/preprocessing/spatial/crop_or_pad.py torchio/transforms/preprocessing/spatial/pad.py torchio/transforms/preprocessing/spatial/crop.py torchio/transforms/preprocessing/spatial/ensure_shape_multiple.py torchio/transforms/preprocessing/spatial/to_canonical.py torchio/transforms/preprocessing/spatial/bounds_transform.py torchio/transforms/preprocessing/intensity/histogram_standardization.py torchio/transforms/preprocessing/intensity/rescale.py torchio/transforms/preprocessing/intensity/z_normalization.py torchio/transforms/preprocessing/intensity/normalization_transform.py torchio/transforms/preprocessing/intensity/__init__.py torchio/transforms/preprocessing/label/remap_labels.py torchio/transforms/preprocessing/label/one_hot.py torchio/transforms/preprocessing/label/sequential_labels.py torchio/transforms/preprocessing/label/keep_largest_component.py torchio/transforms/preprocessing/label/remove_labels.py torchio/transforms/preprocessing/label/contour.py torchio/transforms/preprocessing/label/label_transform.py torchio/transforms/preprocessing/__init__.py torchio/transforms/transform.py torchio/transforms/data_parser.py torchio/transforms/__init__.py torchio/transforms/lambda_transform.py torchio/transforms/interpolation.py torchio/transforms/intensity_transform.py torchio/transforms/fourier.py torchio/transforms/spatial_transform.py torchio/data/image.py torchio/data/io.py torchio/data/sampler/weighted.py torchio/data/sampler/label.py torchio/data/sampler/sampler.py torchio/data/sampler/uniform.py torchio/data/sampler/__init__.py torchio/data/inference/aggregator.py torchio/data/inference/grid_sampler.py torchio/data/inference/__init__.py torchio/data/subject.py torchio/data/queue.py torchio/data/dataset.py torchio/data/__init__.py torchio/datasets/mni/icbm.py torchio/datasets/mni/colin.py torchio/datasets/mni/pediatric.py torchio/datasets/mni/sheep.py torchio/datasets/mni/__init__.py torchio/datasets/mni/mni.py torchio/datasets/ixi.py torchio/datasets/episurg.py torchio/datasets/bite.py torchio/datasets/itk_snap/itk_snap.py torchio/datasets/itk_snap/__init__.py torchio/datasets/fpg.py torchio/datasets/slicer.py torchio/datasets/__init__.py torchio/utils.py torchio/visualization.py torchio/download.py torchio/cli/apply_transform.py torchio/cli/print_info.py torchio/typing.py torchio/constants.py torchio/__init__.py torchio/reference.py tests/transforms/augmentation/test_random_labels_to_image.py tests/transforms/augmentation/test_random_affine.py tests/transforms/augmentation/test_random_ghosting.py tests/transforms/augmentation/test_random_elastic_deformation.py tests/transforms/augmentation/test_random_motion.py tests/transforms/augmentation/test_random_spike.py tests/transforms/augmentation/test_random_gamma.py tests/transforms/augmentation/test_random_noise.py tests/transforms/augmentation/test_random_blur.py tests/transforms/augmentation/test_random_anisotropy.py tests/transforms/augmentation/test_random_flip.py tests/transforms/augmentation/test_random_bias_field.py tests/transforms/augmentation/test_oneof.py tests/transforms/augmentation/test_random_swap.py tests/transforms/preprocessing/test_crop_pad.py tests/transforms/preprocessing/test_rescale.py tests/transforms/preprocessing/test_resample.py tests/transforms/preprocessing/test_histogram_standardization.py tests/transforms/preprocessing/test_ensure_shape_multiple.py tests/transforms/preprocessing/test_pad.py tests/transforms/preprocessing/test_z_normalization.py tests/transforms/preprocessing/test_to_canonical.py tests/transforms/preprocessing/test_crop.py tests/transforms/test_transforms.py tests/transforms/test_invertibility.py tests/transforms/label/test_remove_labels.py tests/transforms/label/test_sequential_labels.py tests/transforms/label/test_remap_labels.py tests/transforms/test_lambda_transform.py tests/transforms/test_collate.py tests/transforms/test_reproducibility.py tests/data/test_image.py tests/data/test_io.py tests/data/sampler/test_label_sampler.py tests/data/sampler/test_weighted_sampler.py tests/data/sampler/test_uniform_sampler.py tests/data/sampler/test_patch_sampler.py tests/data/sampler/test_random_sampler.py tests/data/inference/test_aggregator.py tests/data/inference/test_grid_sampler.py tests/data/inference/test_inference.py tests/data/test_subject.py tests/data/test_subjects_dataset.py tests/data/test_queue.py tests/utils.py tests/test_utils.py tests/test_cli.py tests/datasets/test_ixi.py print_system.py

No flags found

Use flags to group coverage reports by test type, project and/or folders.
Then setup custom commit statuses and notifications for each flag.

e.g., #unittest #integration

#production #enterprise

#frontend #backend

Learn more about Codecov Flags here.

Showing 1 of 1 files from the diff.

@@ -60,9 +60,9 @@
Loading
60 60
        tensor: If :attr:`path` is not given, :attr:`tensor` must be a 4D
61 61
            :class:`torch.Tensor` or NumPy array with dimensions
62 62
            :math:`(C, W, H, D)`.
63 -
        affine: If :attr:`path` is not given, :attr:`affine` must be a
64 -
            :math:`4 \times 4` NumPy array. If ``None``, :attr:`affine` is an
65 -
            identity matrix.
63 +
        affine: :math:`4 \times 4` matrix to convert voxel coordinates to world
64 +
            coordinates. If ``None``, an identity matrix will be used. See the
65 +
            `NiBabel docs on coordinates`_ for more information.
66 66
        check_nans: If ``True``, issues a warning if NaNs are found
67 67
            in the image. If ``False``, images will not be checked for the
68 68
            presence of NaNs.
@@ -93,6 +93,7 @@
Loading
93 93
    .. _preprocessing: https://torchio.readthedocs.io/transforms/preprocessing.html#intensity
94 94
    .. _augmentation: https://torchio.readthedocs.io/transforms/augmentation.html#intensity
95 95
    .. _NiBabel docs: https://nipy.org/nibabel/image_orientation.html
96 +
    .. _NiBabel docs on coordinates: https://nipy.org/nibabel/coordinate_systems.html#the-affine-matrix-as-a-transformation-between-spaces
96 97
    .. _3D Slicer wiki: https://www.slicer.org/wiki/Coordinate_systems
97 98
    .. _FSL docs: https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/Orientation%20Explained
98 99
    .. _SimpleITK docs: https://simpleitk.readthedocs.io/en/master/fundamentalConcepts.html
@@ -419,7 +420,7 @@
Loading
419 420
            raise TypeError(f'Affine must be a NumPy array, not {type(affine)}')
420 421
        if affine.shape != (4, 4):
421 422
            raise ValueError(f'Affine shape must be (4, 4), not {affine.shape}')
422 -
        return affine
423 +
        return affine.astype(np.float64)
423 424
424 425
    def load(self) -> None:
425 426
        r"""Load the image from disk.

Learn more Showing 2 files with coverage changes found.

Changes in torchio/utils.py
-1
+1
Loading file...
Changes in torchio/transforms/transform.py
-6
+6
Loading file...
Files Coverage
tests 99.76%
torchio 0.15% 86.57%
print_system.py 0.00%
Project Totals (132 files) 90.55%
Loading