__init__.py 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  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. Fourier filters
  37. ===============
  38. .. autosummary::
  39. :toctree: generated/
  40. fourier_ellipsoid
  41. fourier_gaussian
  42. fourier_shift
  43. fourier_uniform
  44. Interpolation
  45. =============
  46. .. autosummary::
  47. :toctree: generated/
  48. affine_transform - Apply an affine transformation
  49. geometric_transform - Apply an arbritrary geometric transform
  50. map_coordinates - Map input array to new coordinates by interpolation
  51. rotate - Rotate an array
  52. shift - Shift an array
  53. spline_filter
  54. spline_filter1d
  55. zoom - Zoom an array
  56. Measurements
  57. ============
  58. .. autosummary::
  59. :toctree: generated/
  60. center_of_mass - The center of mass of the values of an array at labels
  61. extrema - Min's and max's of an array at labels, with their positions
  62. find_objects - Find objects in a labeled array
  63. histogram - Histogram of the values of an array, optionally at labels
  64. label - Label features in an array
  65. labeled_comprehension
  66. maximum
  67. maximum_position
  68. mean - Mean of the values of an array at labels
  69. median
  70. minimum
  71. minimum_position
  72. standard_deviation - Standard deviation of an N-D image array
  73. sum_labels - Sum of the values of the array
  74. value_indices - Find indices of each distinct value in given array
  75. variance - Variance of the values of an N-D image array
  76. watershed_ift
  77. Morphology
  78. ==========
  79. .. autosummary::
  80. :toctree: generated/
  81. binary_closing
  82. binary_dilation
  83. binary_erosion
  84. binary_fill_holes
  85. binary_hit_or_miss
  86. binary_opening
  87. binary_propagation
  88. black_tophat
  89. distance_transform_bf
  90. distance_transform_cdt
  91. distance_transform_edt
  92. generate_binary_structure
  93. grey_closing
  94. grey_dilation
  95. grey_erosion
  96. grey_opening
  97. iterate_structure
  98. morphological_gradient
  99. morphological_laplace
  100. white_tophat
  101. """
  102. # Copyright (C) 2003-2005 Peter J. Verveer
  103. #
  104. # Redistribution and use in source and binary forms, with or without
  105. # modification, are permitted provided that the following conditions
  106. # are met:
  107. #
  108. # 1. Redistributions of source code must retain the above copyright
  109. # notice, this list of conditions and the following disclaimer.
  110. #
  111. # 2. Redistributions in binary form must reproduce the above
  112. # copyright notice, this list of conditions and the following
  113. # disclaimer in the documentation and/or other materials provided
  114. # with the distribution.
  115. #
  116. # 3. The name of the author may not be used to endorse or promote
  117. # products derived from this software without specific prior
  118. # written permission.
  119. #
  120. # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
  121. # OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  122. # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  123. # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
  124. # DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  125. # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
  126. # GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  127. # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
  128. # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  129. # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  130. # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  131. from ._filters import * # noqa: F401 F403
  132. from ._fourier import * # noqa: F401 F403
  133. from ._interpolation import * # noqa: F401 F403
  134. from ._measurements import * # noqa: F401 F403
  135. from ._morphology import * # noqa: F401 F403
  136. # Deprecated namespaces, to be removed in v2.0.0
  137. from . import filters # noqa: F401
  138. from . import fourier # noqa: F401
  139. from . import interpolation # noqa: F401
  140. from . import measurements # noqa: F401
  141. from . import morphology # noqa: F401
  142. __all__ = [s for s in dir() if not s.startswith('_')]
  143. from scipy._lib._testutils import PytestTester
  144. test = PytestTester(__name__)
  145. del PytestTester