__init__.py 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. """
  2. =========================================================
  3. Multidimensional image processing (:mod:`scipy.ndimage`)
  4. =========================================================
  5. .. currentmodule:: scipy.ndimage
  6. This package contains various functions for multidimensional image
  7. processing.
  8. Filters
  9. =======
  10. .. autosummary::
  11. :toctree: generated/
  12. convolve - Multidimensional convolution
  13. convolve1d - 1-D convolution along the given axis
  14. correlate - Multidimensional correlation
  15. correlate1d - 1-D correlation along the given axis
  16. gaussian_filter
  17. gaussian_filter1d
  18. gaussian_gradient_magnitude
  19. gaussian_laplace
  20. generic_filter - Multidimensional filter using a given function
  21. generic_filter1d - 1-D generic filter along the given axis
  22. generic_gradient_magnitude
  23. generic_laplace
  24. laplace - N-D Laplace filter based on approximate second derivatives
  25. maximum_filter
  26. maximum_filter1d
  27. median_filter - Calculates a multidimensional median filter
  28. minimum_filter
  29. minimum_filter1d
  30. percentile_filter - Calculates a multidimensional percentile filter
  31. prewitt
  32. rank_filter - Calculates a multidimensional rank filter
  33. sobel
  34. uniform_filter - Multidimensional uniform filter
  35. uniform_filter1d - 1-D uniform filter along the given axis
  36. vectorized_filter
  37. Fourier filters
  38. ===============
  39. .. autosummary::
  40. :toctree: generated/
  41. fourier_ellipsoid
  42. fourier_gaussian
  43. fourier_shift
  44. fourier_uniform
  45. Interpolation
  46. =============
  47. .. autosummary::
  48. :toctree: generated/
  49. affine_transform - Apply an affine transformation
  50. geometric_transform - Apply an arbitrary geometric transform
  51. map_coordinates - Map input array to new coordinates by interpolation
  52. rotate - Rotate an array
  53. shift - Shift an array
  54. spline_filter
  55. spline_filter1d
  56. zoom - Zoom an array
  57. Measurements
  58. ============
  59. .. autosummary::
  60. :toctree: generated/
  61. center_of_mass - The center of mass of the values of an array at labels
  62. extrema - Min's and max's of an array at labels, with their positions
  63. find_objects - Find objects in a labeled array
  64. histogram - Histogram of the values of an array, optionally at labels
  65. label - Label features in an array
  66. labeled_comprehension
  67. maximum
  68. maximum_position
  69. mean - Mean of the values of an array at labels
  70. median
  71. minimum
  72. minimum_position
  73. standard_deviation - Standard deviation of an N-D image array
  74. sum_labels - Sum of the values of the array
  75. value_indices - Find indices of each distinct value in given array
  76. variance - Variance of the values of an N-D image array
  77. watershed_ift
  78. Morphology
  79. ==========
  80. .. autosummary::
  81. :toctree: generated/
  82. binary_closing
  83. binary_dilation
  84. binary_erosion
  85. binary_fill_holes
  86. binary_hit_or_miss
  87. binary_opening
  88. binary_propagation
  89. black_tophat
  90. distance_transform_bf
  91. distance_transform_cdt
  92. distance_transform_edt
  93. generate_binary_structure
  94. grey_closing
  95. grey_dilation
  96. grey_erosion
  97. grey_opening
  98. iterate_structure
  99. morphological_gradient
  100. morphological_laplace
  101. white_tophat
  102. """
  103. # Copyright (C) 2003-2005 Peter J. Verveer
  104. #
  105. # Redistribution and use in source and binary forms, with or without
  106. # modification, are permitted provided that the following conditions
  107. # are met:
  108. #
  109. # 1. Redistributions of source code must retain the above copyright
  110. # notice, this list of conditions and the following disclaimer.
  111. #
  112. # 2. Redistributions in binary form must reproduce the above
  113. # copyright notice, this list of conditions and the following
  114. # disclaimer in the documentation and/or other materials provided
  115. # with the distribution.
  116. #
  117. # 3. The name of the author may not be used to endorse or promote
  118. # products derived from this software without specific prior
  119. # written permission.
  120. #
  121. # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
  122. # OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  123. # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  124. # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
  125. # DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  126. # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
  127. # GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  128. # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
  129. # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  130. # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  131. # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  132. # bring in the public functionality from private namespaces
  133. # mypy: ignore-errors
  134. from ._support_alternative_backends import *
  135. # adjust __all__ and do not leak implementation details
  136. from . import _support_alternative_backends
  137. __all__ = _support_alternative_backends.__all__
  138. del _support_alternative_backends, _ndimage_api, _delegators # noqa: F821
  139. # Deprecated namespaces, to be removed in v2.0.0
  140. from . import filters
  141. from . import fourier
  142. from . import interpolation
  143. from . import measurements
  144. from . import morphology
  145. from scipy._lib._testutils import PytestTester
  146. test = PytestTester(__name__)
  147. del PytestTester