cellprofiler-library-nightly 5.0.0.dev707__tar.gz → 5.0.0.dev718__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (133) hide show
  1. {cellprofiler_library_nightly-5.0.0.dev707/cellprofiler_library_nightly.egg-info → cellprofiler_library_nightly-5.0.0.dev718}/PKG-INFO +1 -1
  2. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/_version.py +3 -3
  3. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/functions/measurement.py +429 -0
  4. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/functions/segmentation.py +40 -1
  5. cellprofiler_library_nightly-5.0.0.dev718/cellprofiler_library/modules/_relateobjects.py +213 -0
  6. cellprofiler_library_nightly-5.0.0.dev718/cellprofiler_library/opts/relateobjects.py +25 -0
  7. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718/cellprofiler_library_nightly.egg-info}/PKG-INFO +1 -1
  8. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library_nightly.egg-info/SOURCES.txt +2 -0
  9. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library_nightly.egg-info/scm_file_list.json +2 -0
  10. cellprofiler_library_nightly-5.0.0.dev718/cellprofiler_library_nightly.egg-info/scm_version.json +8 -0
  11. cellprofiler_library_nightly-5.0.0.dev707/cellprofiler_library_nightly.egg-info/scm_version.json +0 -8
  12. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/LICENSE +0 -0
  13. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/README.md +0 -0
  14. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/__init__.py +0 -0
  15. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/functions/__init__.py +0 -0
  16. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/functions/file_processing.py +0 -0
  17. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/functions/image_processing.py +0 -0
  18. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/functions/object_processing.py +0 -0
  19. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/measurement_model.py +0 -0
  20. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/modules/__init__.py +0 -0
  21. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/modules/_align.py +0 -0
  22. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/modules/_closing.py +0 -0
  23. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/modules/_colortogray.py +0 -0
  24. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/modules/_combineobjects.py +0 -0
  25. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/modules/_convertimagetoobjects.py +0 -0
  26. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/modules/_convertobjectstoimage.py +0 -0
  27. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/modules/_correctilluminationapply.py +0 -0
  28. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/modules/_correctilluminationcalculate.py +0 -0
  29. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/modules/_crop.py +0 -0
  30. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/modules/_dilateimage.py +0 -0
  31. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/modules/_dilateobjects.py +0 -0
  32. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/modules/_enhanceedges.py +0 -0
  33. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/modules/_enhanceorsuppressfeatures.py +0 -0
  34. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/modules/_erodeimage.py +0 -0
  35. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/modules/_erodeobjects.py +0 -0
  36. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/modules/_expandorshrinkobjects.py +0 -0
  37. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/modules/_fillobjects.py +0 -0
  38. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/modules/_filterobjects.py +0 -0
  39. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/modules/_findmaxima.py +0 -0
  40. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/modules/_flipandrotate.py +0 -0
  41. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/modules/_gaussianfilter.py +0 -0
  42. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/modules/_graytocolor.py +0 -0
  43. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/modules/_identifydeadworms.py +0 -0
  44. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/modules/_identifyprimaryobjects.py +0 -0
  45. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/modules/_identifysecondaryobjects.py +0 -0
  46. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/modules/_identifytertiaryobjects.py +0 -0
  47. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/modules/_imagemath.py +0 -0
  48. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/modules/_makeprojection.py +0 -0
  49. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/modules/_measurecolocalization.py +0 -0
  50. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/modules/_measuregranularity.py +0 -0
  51. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/modules/_measureimageareaoccupied.py +0 -0
  52. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/modules/_measureimageintensity.py +0 -0
  53. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/modules/_measureimageoverlap.py +0 -0
  54. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/modules/_measureimagequality.py +0 -0
  55. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/modules/_measureimageskeleton.py +0 -0
  56. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/modules/_measureobjectintensity.py +0 -0
  57. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/modules/_measureobjectintensitydistribution.py +0 -0
  58. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/modules/_measureobjectneighbors.py +0 -0
  59. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/modules/_measureobjectoverlap.py +0 -0
  60. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/modules/_measureobjectsizeshape.py +0 -0
  61. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/modules/_measureobjectskeleton.py +0 -0
  62. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/modules/_measuretexture.py +0 -0
  63. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/modules/_medialaxis.py +0 -0
  64. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/modules/_medianfilter.py +0 -0
  65. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/modules/_morph.py +0 -0
  66. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/modules/_morphologicalskeleton.py +0 -0
  67. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/modules/_opening.py +0 -0
  68. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/modules/_overlayobjects.py +0 -0
  69. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/modules/_overlayoutlines.py +0 -0
  70. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/modules/_reducenoise.py +0 -0
  71. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/modules/_removeholes.py +0 -0
  72. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/modules/_rescaleintensity.py +0 -0
  73. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/modules/_resize.py +0 -0
  74. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/modules/_savecroppedobjects.py +0 -0
  75. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/modules/_shrinktoobjectcenters.py +0 -0
  76. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/modules/_smooth.py +0 -0
  77. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/modules/_threshold.py +0 -0
  78. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/modules/_watershed.py +0 -0
  79. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/opts/__init__.py +0 -0
  80. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/opts/align.py +0 -0
  81. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/opts/colortogray.py +0 -0
  82. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/opts/convertimagetoobjects.py +0 -0
  83. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/opts/convertobjectstoimage.py +0 -0
  84. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/opts/correctilluminationapply.py +0 -0
  85. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/opts/correctilluminationcalculate.py +0 -0
  86. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/opts/crop.py +0 -0
  87. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/opts/dilateimage.py +0 -0
  88. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/opts/dilateobjects.py +0 -0
  89. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/opts/enhanceedges.py +0 -0
  90. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/opts/enhanceorsuppressfeatures.py +0 -0
  91. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/opts/erodeimage.py +0 -0
  92. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/opts/erodeobjects.py +0 -0
  93. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/opts/filterobjects.py +0 -0
  94. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/opts/findmaxima.py +0 -0
  95. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/opts/flipandrotate.py +0 -0
  96. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/opts/graytocolor.py +0 -0
  97. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/opts/identifydeadworms.py +0 -0
  98. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/opts/identifyprimaryobjects.py +0 -0
  99. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/opts/identifysecondaryobjects.py +0 -0
  100. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/opts/identifytertiaryobjects.py +0 -0
  101. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/opts/imagemath.py +0 -0
  102. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/opts/makeprojection.py +0 -0
  103. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/opts/measurecolocalization.py +0 -0
  104. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/opts/measuregranularity.py +0 -0
  105. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/opts/measureimageareaoccupied.py +0 -0
  106. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/opts/measureimageintensity.py +0 -0
  107. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/opts/measureimageoverlap.py +0 -0
  108. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/opts/measureimagequality.py +0 -0
  109. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/opts/measureimageskeleton.py +0 -0
  110. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/opts/measureobjectintensity.py +0 -0
  111. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/opts/measureobjectintensitydistribution.py +0 -0
  112. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/opts/measureobjectneighbors.py +0 -0
  113. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/opts/measureobjectoverlap.py +0 -0
  114. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/opts/measureobjectskeleton.py +0 -0
  115. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/opts/measuretexture.py +0 -0
  116. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/opts/morph.py +0 -0
  117. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/opts/objectsizeshapefeatures.py +0 -0
  118. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/opts/overlayoutlines.py +0 -0
  119. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/opts/removeholes.py +0 -0
  120. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/opts/rescaleintensity.py +0 -0
  121. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/opts/resize.py +0 -0
  122. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/opts/shrinktoobjectcenters.py +0 -0
  123. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/opts/smooth.py +0 -0
  124. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/opts/structuring_elements.py +0 -0
  125. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/opts/threshold.py +0 -0
  126. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/py.typed +0 -0
  127. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library/types.py +0 -0
  128. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library_nightly.egg-info/dependency_links.txt +0 -0
  129. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library_nightly.egg-info/requires.txt +0 -0
  130. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/cellprofiler_library_nightly.egg-info/top_level.txt +0 -0
  131. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/environment.yml +0 -0
  132. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/pyproject.toml +0 -0
  133. {cellprofiler_library_nightly-5.0.0.dev707 → cellprofiler_library_nightly-5.0.0.dev718}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cellprofiler-library-nightly
3
- Version: 5.0.0.dev707
3
+ Version: 5.0.0.dev718
4
4
  Summary: cellprofiler-library implements CellProfiler's image processing and mathematical code, and is usable as a standalone library
5
5
  Author: Anne Carpenter, Thouis (Ray) Jones, Lee Kamentsky, Vebjorn Ljosa, David Logan, Mark Bray, Madison Swain-Bowden, Allen Goodman, Claire McQuinn, Alice Lucas, Callum Tromans-Coia
6
6
  Author-email: Beth Cimini <bcimini@broadinstitute.org>, David Stirling <dstirling@glencoesoftware.com>, Nodar Gogoberidze <ngogober@broadinstitute.org>
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
18
18
  commit_id: str | None
19
19
  __commit_id__: str | None
20
20
 
21
- __version__ = version = '5.0.0.dev707'
22
- __version_tuple__ = version_tuple = (5, 0, 0, 'dev707')
21
+ __version__ = version = '5.0.0.dev718'
22
+ __version_tuple__ = version_tuple = (5, 0, 0, 'dev718')
23
23
 
24
- __commit_id__ = commit_id = 'g2b3417b86'
24
+ __commit_id__ = commit_id = 'ga1fd59b3a'
@@ -41,6 +41,12 @@ from cellprofiler_library.opts.measureobjectoverlap import DecimationMethod as O
41
41
  from cellprofiler_library.opts.measureobjectskeleton import VF_I, VF_J, VF_LABELS, VF_KIND, EF_V1, EF_V2, EF_LENGTH, EF_TOTAL_INTENSITY
42
42
  from cellprofiler_library.opts.measureobjectneighbors import DistanceMethod as NeighborsDistanceMethod
43
43
  from cellprofiler_library.opts.measureobjectneighbors import MeasurementScale as NeighborsMeasurementScale
44
+ from cellprofiler_core.constants.measurement import (
45
+ FF_PARENT,
46
+ )
47
+ from cellprofiler_library.opts.relateobjects import TemplateMeasurementFormat
48
+ from cellprofiler_library.measurement_model import LibraryMeasurements
49
+ from cellprofiler_library.functions.segmentation import center_of_labels_mass
44
50
 
45
51
  ###############################################################################
46
52
  # MeasureImageOverlap
@@ -3993,3 +3999,426 @@ def measure_haralick_features_objects(
3993
3999
  pass
3994
4000
 
3995
4001
  return features
4002
+
4003
+ ###############################################################################
4004
+ # RelateObjects
4005
+ ###############################################################################
4006
+
4007
+ def compute_centroid_distances(
4008
+ child_centers: NDArray[numpy.float64],
4009
+ parent_centers: NDArray[numpy.float64],
4010
+ parents_of: NDArray[numpy.int32]
4011
+ ) -> NDArray[numpy.float64]:
4012
+ """Calculate the centroid-centroid distance between parent & child
4013
+
4014
+ Args:
4015
+ child_centers: (N, 2) or (N, 3) array of child object centroids
4016
+ parent_centers: (M, 2) or (M, 3) array of parent object centroids
4017
+ parents_of: Array of length N mapping each child to its parent index (1-based).
4018
+ 0 indicates no parent.
4019
+
4020
+ Returns:
4021
+ Array of length N containing distances. NaN for unparented children.
4022
+ """
4023
+ if parent_centers.shape[0] == 0 or child_centers.shape[0] == 0:
4024
+ return numpy.full(len(parents_of), numpy.nan)
4025
+
4026
+ # Adjust to 0-based indexing
4027
+ parents_of_idx = parents_of - 1
4028
+
4029
+ # Mask for valid parents
4030
+ # parents_of > 0 checks for 0 (no parent)
4031
+ # parents_of <= len(parent_centers) checks for valid index
4032
+ mask = (parents_of > 0) & (parents_of <= parent_centers.shape[0])
4033
+
4034
+ dist = numpy.full(child_centers.shape[0], numpy.nan)
4035
+
4036
+ if numpy.any(mask):
4037
+ # Calculate Euclidean distance
4038
+ # parent_centers[parents_of_idx[mask]] gets the parent center for each child
4039
+ diff = child_centers[mask, :] - parent_centers[parents_of_idx[mask], :]
4040
+ dist[mask] = numpy.sqrt(numpy.sum(diff ** 2, axis=1))
4041
+
4042
+ return dist
4043
+
4044
+
4045
+ def compute_minimum_distances(
4046
+ child_centers: NDArray[numpy.float64],
4047
+ parent_labels: NDArray[ObjectLabel],
4048
+ parents_of: NDArray[numpy.int32]
4049
+ ) -> NDArray[numpy.float64]:
4050
+ """Calculate the distance from child center to parent perimeter
4051
+
4052
+ Args:
4053
+ child_centers: (N, 2) or (N, 3) array of child object centroids
4054
+ parent_labels: Label matrix of parent objects
4055
+ parents_of: Array of length N mapping each child to its parent index (1-based)
4056
+
4057
+ Returns:
4058
+ Array of length N containing minimum distances. NaN for unparented children.
4059
+ """
4060
+ if len(parents_of) == 0:
4061
+ return numpy.zeros((0,))
4062
+
4063
+ if numpy.all(parents_of == 0):
4064
+ return numpy.full(len(parents_of), numpy.nan)
4065
+
4066
+ mask = parents_of > 0
4067
+
4068
+ # Filter for children with parents
4069
+ child_centers_masked = child_centers[mask, :]
4070
+ parents_of_masked = parents_of[mask] - 1
4071
+
4072
+ # Find parent boundaries
4073
+ # inner mode: boundaries are inside the object
4074
+ pperim = (
4075
+ skimage.segmentation.find_boundaries(parent_labels, mode="inner")
4076
+ * parent_labels
4077
+ )
4078
+
4079
+ # Get a list of all points on the perimeter
4080
+ perim_loc = numpy.argwhere(pperim != 0)
4081
+
4082
+ if len(perim_loc) == 0:
4083
+ # Should not happen if there are parents, but safety check
4084
+ return numpy.full(len(parents_of), numpy.nan)
4085
+
4086
+ # Get the label # for each point
4087
+ # multidimensional indexing with non-tuple values
4088
+ perim_loc_t = tuple(map(tuple, perim_loc.transpose()))
4089
+ perim_idx = pperim[perim_loc_t]
4090
+
4091
+ # Sort the points by label #
4092
+ # We sort perimeter points so we can group them by parent label
4093
+ # The original code sorts by column order reversed?
4094
+ # reverse_column_order = list(range(children.dimensions))[::-1] -> implied from perim_loc
4095
+ # Actually we just need to group by label.
4096
+
4097
+ # Sort by label first
4098
+ sort_idx = numpy.argsort(perim_idx)
4099
+ perim_loc = perim_loc[sort_idx, :]
4100
+ perim_idx = perim_idx[sort_idx]
4101
+
4102
+ # Get counts and indexes to each run of perimeter points
4103
+ # This tells us where each parent's perimeter points start and end in the sorted array
4104
+ counts = scipy.ndimage.sum(
4105
+ numpy.ones(len(perim_idx)),
4106
+ perim_idx,
4107
+ numpy.arange(1, perim_idx[-1] + 1),
4108
+ ).astype(numpy.int32)
4109
+
4110
+ # Start indices for each label
4111
+ indexes = numpy.cumsum(counts) - counts
4112
+
4113
+ # Check if parents_of_masked are within range of counts
4114
+ # It's possible a parent has no perimeter pixels? (single pixel object?)
4115
+ # find_boundaries should handle it.
4116
+
4117
+ valid_parents_mask = parents_of_masked < len(counts)
4118
+ # Further filter if needed, but assuming parents_of aligns with parent_labels
4119
+
4120
+ # For the children, get the index and count of the parent's perimeter points
4121
+ # We might have parents in parents_of that are not in perim_idx if they have no perimeter?
4122
+ # But parents_of comes from relate_children, so they must overlap.
4123
+
4124
+ # We need to handle the case where a parent label exists but has no perimeter points
4125
+ # (though find_boundaries inner usually returns the pixel itself for single pixel)
4126
+
4127
+ ccounts = counts[parents_of_masked]
4128
+ cindexes = indexes[parents_of_masked]
4129
+
4130
+ # ccounts is num perimeter points for the parent of each child
4131
+
4132
+ # Now make an array that has an element for each of that child's perimeter points
4133
+ # Total size = sum(ccounts)
4134
+ total_points = numpy.sum(ccounts)
4135
+
4136
+ if total_points == 0:
4137
+ return numpy.full(len(parents_of), numpy.nan)
4138
+
4139
+ clabel = numpy.zeros(total_points, int)
4140
+
4141
+ # cfirst is the eventual first index of each child in the clabel array
4142
+ cfirst = numpy.cumsum(ccounts) - ccounts
4143
+
4144
+ # Mark transitions
4145
+ if len(cfirst) > 1:
4146
+ clabel[cfirst[1:]] += 1
4147
+
4148
+ clabel = numpy.cumsum(clabel)
4149
+
4150
+ # clabel is an index into child_centers_masked (0 to N_children-1)
4151
+ # mapped to the expanded perimeter points
4152
+
4153
+ # Make an index that runs from 0 to ccounts for each child label.
4154
+ cp_index = numpy.arange(len(clabel)) - cfirst[clabel]
4155
+
4156
+ # then add cindexes to get an index to the perimeter point in perim_loc
4157
+ # cindexes[clabel] gives the start of the parent's perimeter points in perim_loc
4158
+ cp_index += cindexes[clabel]
4159
+
4160
+ # Now, calculate the distance from the centroid of each label to each perimeter point in the parent.
4161
+ # perim_loc[cp_index, :] are the coordinates of the perimeter points
4162
+ # child_centers_masked[clabel, :] are the coordinates of the child centers
4163
+
4164
+ dists_expanded = numpy.sqrt(
4165
+ numpy.sum((perim_loc[cp_index, :] - child_centers_masked[clabel, :]) ** 2, 1)
4166
+ )
4167
+
4168
+ # Finally, find the minimum distance per child
4169
+ min_dist = scipy.ndimage.minimum(dists_expanded, clabel, numpy.arange(len(ccounts)))
4170
+
4171
+ # Account for unparented children
4172
+ dist = numpy.full(len(parents_of), numpy.nan)
4173
+ dist[mask] = min_dist
4174
+
4175
+ return dist
4176
+
4177
+ def measure_centroid_distances(
4178
+ parent_labels: ObjectSegmentation,
4179
+ child_labels: ObjectSegmentation,
4180
+ parents_of: NDArray[ObjectLabel]
4181
+ ) -> NDArray[numpy.float64]:
4182
+ """Calculate the centroid-centroid distance between parent & child
4183
+
4184
+ Args:
4185
+ parent_labels: Label matrix of parent objects
4186
+ child_labels: Label matrix of child objects
4187
+ parents_of: Array mapping child index to parent label (from relate_children)
4188
+
4189
+ Returns:
4190
+ Array of distances for each child
4191
+ """
4192
+ # Calculate centers of mass
4193
+ # centers_of_labels returns (N, 2) or (N, 3) array. Row i corresponds to label i+1.
4194
+ pcenters = centers_of_labels(parent_labels)
4195
+ ccenters = centers_of_labels(child_labels)
4196
+
4197
+ if pcenters.shape[0] == 0 or ccenters.shape[0] == 0:
4198
+ dist = numpy.array([numpy.NaN] * len(parents_of))
4199
+ else:
4200
+ #
4201
+ # Make indexing of parents_of be same as pcenters
4202
+ # parents_of contains label numbers (1-based). pcenters is 0-indexed (row 0 is label 1).
4203
+ # So we subtract 1.
4204
+ #
4205
+ parents_of_idx = parents_of - 1
4206
+
4207
+ # mask for children that have a valid parent (parent label > 0 and within range)
4208
+ # Note: parents_of == 0 means no parent.
4209
+ mask = (parents_of_idx != -1) & (parents_of_idx < pcenters.shape[0])
4210
+
4211
+ # Also need to check if parents_of indices are valid for pcenters array size
4212
+ # (Though relate_children should ensure parents_of contains valid parent labels)
4213
+
4214
+ dist = numpy.array([numpy.NaN] * ccenters.shape[0])
4215
+
4216
+ if numpy.any(mask):
4217
+ # ccenters has shape (n_children, dims).
4218
+ # pcenters[parents_of_idx[mask], :] has shape (n_masked_children, dims)
4219
+ # We calculate Euclidean distance between child center and its parent center
4220
+ dist[mask] = numpy.sqrt(
4221
+ numpy.sum((ccenters[mask, :] - pcenters[parents_of_idx[mask], :]) ** 2, 1)
4222
+ )
4223
+
4224
+ return dist
4225
+
4226
+ def calculate_centroid_distances(
4227
+ parents: ObjectSegmentation,
4228
+ children: ObjectSegmentation,
4229
+ parents_of: NDArray[ObjectLabel]
4230
+ ) -> NDArray[numpy.float64]:
4231
+ """Calculate the centroid-centroid distance between parent & child"""
4232
+
4233
+ # pcenters = parents.center_of_mass()
4234
+ pcenters = center_of_labels_mass(parents, validate=False)
4235
+
4236
+ # ccenters = children.center_of_mass()
4237
+ ccenters = center_of_labels_mass(children, validate=False)
4238
+
4239
+ if pcenters.shape[0] == 0 or ccenters.shape[0] == 0:
4240
+ dist = numpy.array([numpy.NaN] * len(parents_of))
4241
+ else:
4242
+ #
4243
+ # Make indexing of parents_of be same as pcenters
4244
+ #
4245
+ parents_of = parents_of - 1
4246
+
4247
+ mask = (parents_of != -1) | (parents_of > pcenters.shape[0])
4248
+
4249
+ dist = numpy.array([numpy.NaN] * ccenters.shape[0])
4250
+
4251
+ dist[mask] = numpy.sqrt(
4252
+ numpy.sum((ccenters[mask, :] - pcenters[parents_of[mask], :]) ** 2, 1)
4253
+ )
4254
+ return dist
4255
+
4256
+ def calculate_minimum_distances(
4257
+ parents: ObjectSegmentation,
4258
+ children: ObjectSegmentation,
4259
+ children_dimensions: int,
4260
+ parents_of: NDArray[ObjectLabel]
4261
+ ) -> NDArray[numpy.float64]:
4262
+ """Calculate the distance from child center to parent perimeter"""
4263
+ if len(parents_of) == 0:
4264
+ dist = numpy.zeros((0,))
4265
+ elif numpy.all(parents_of == 0):
4266
+ dist = numpy.array([numpy.NaN] * len(parents_of))
4267
+ else:
4268
+ mask = parents_of > 0
4269
+
4270
+ # this is what core _objects.py does
4271
+ ccenters = center_of_labels_mass(children, validate=False)
4272
+
4273
+ ccenters = ccenters[mask, :]
4274
+
4275
+ parents_of_masked = parents_of[mask] - 1
4276
+
4277
+ pperim = (
4278
+ skimage.segmentation.find_boundaries(parents, mode="inner")
4279
+ * parents
4280
+ )
4281
+
4282
+ # Get a list of all points on the perimeter
4283
+ perim_loc = numpy.argwhere(pperim != 0)
4284
+
4285
+ # Get the label # for each point
4286
+ # multidimensional indexing with non-tuple values not allowed as of numpy 1.23
4287
+ perim_loc_t = tuple(map(tuple, perim_loc.transpose()))
4288
+ perim_idx = pperim[perim_loc_t]
4289
+
4290
+ # Sort the points by label #
4291
+ reverse_column_order = list(range(children_dimensions))[::-1]
4292
+
4293
+ coordinates = perim_loc[:, reverse_column_order].transpose().tolist()
4294
+
4295
+ coordinates.append(perim_idx)
4296
+
4297
+ idx = numpy.lexsort(coordinates)
4298
+
4299
+ perim_loc = perim_loc[idx, :]
4300
+
4301
+ perim_idx = perim_idx[idx]
4302
+
4303
+ # Get counts and indexes to each run of perimeter points
4304
+ counts = scipy.ndimage.sum(
4305
+ numpy.ones(len(perim_idx)),
4306
+ perim_idx,
4307
+ numpy.arange(1, perim_idx[-1] + 1),
4308
+ ).astype(numpy.int32)
4309
+
4310
+ indexes = numpy.cumsum(counts) - counts
4311
+
4312
+ # For the children, get the index and count of the parent
4313
+ ccounts = counts[parents_of_masked]
4314
+ cindexes = indexes[parents_of_masked]
4315
+
4316
+ # Now make an array that has an element for each of that child's perimeter points
4317
+ clabel = numpy.zeros(numpy.sum(ccounts), int)
4318
+
4319
+ # cfirst is the eventual first index of each child in the clabel array
4320
+ cfirst = numpy.cumsum(ccounts) - ccounts
4321
+
4322
+ clabel[cfirst[1:]] += 1
4323
+ clabel = numpy.cumsum(clabel)
4324
+
4325
+ # Make an index that runs from 0 to ccounts for each child label.
4326
+ cp_index = numpy.arange(len(clabel)) - cfirst[clabel]
4327
+
4328
+ # then add cindexes to get an index to the perimeter point
4329
+ cp_index += cindexes[clabel]
4330
+
4331
+ # Now, calculate the distance from the centroid of each label to each perimeter point in the parent.
4332
+ dist = numpy.sqrt(
4333
+ numpy.sum((perim_loc[cp_index, :] - ccenters[clabel, :]) ** 2, 1)
4334
+ )
4335
+
4336
+ # Finally, find the minimum distance per child
4337
+ min_dist = scipy.ndimage.minimum(dist, clabel, numpy.arange(len(ccounts)))
4338
+
4339
+ # Account for unparented children
4340
+ dist = numpy.array([numpy.NaN] * len(mask))
4341
+ dist[mask] = min_dist
4342
+ return dist
4343
+
4344
+ def find_parents_of(
4345
+ parent_name: str,
4346
+ x_name: str,
4347
+ y_name: str,
4348
+ meas: LibraryMeasurements,
4349
+ ) -> NDArray[ObjectLabel]:
4350
+ """Return the parents_of measurement or equivalent
4351
+ parent_name - name of parent objects
4352
+
4353
+ Return a vector of parent indexes to the given parent name using
4354
+ the Parent measurement. Look for a direct parent / child link first
4355
+ and then look for relationships between self.parent_name and the
4356
+ named parent.
4357
+ """
4358
+ parent_feature = FF_PARENT % parent_name
4359
+
4360
+ primary_parent = x_name
4361
+
4362
+ sub_object_name = y_name
4363
+
4364
+ primary_parent_feature = FF_PARENT % primary_parent
4365
+
4366
+ parents_of: NDArray[ObjectLabel] = numpy.zeros(0, int)
4367
+
4368
+ if parent_feature in meas.get_feature_names(sub_object_name):
4369
+ parents_of = meas.get_measurement(sub_object_name, parent_feature) # changed get_current_measurement to get_measurement assuming that when get_meaurement is called with the LibraryMeasurement object here, it is always the LibraryMeasurement of the current image set
4370
+ elif parent_feature in meas.get_feature_names(primary_parent):
4371
+ #
4372
+ # parent_name is the grandparent of the sub-object via
4373
+ # the primary parent.
4374
+ #
4375
+ primary_parents_of = meas.get_measurement( # changed get_current_measurement to get_measurement
4376
+ sub_object_name, primary_parent_feature
4377
+ )
4378
+
4379
+ grandparents_of = meas.get_measurement( # changed get_current_measurement to get_measurement
4380
+ primary_parent, parent_feature
4381
+ )
4382
+
4383
+ mask = primary_parents_of != 0
4384
+
4385
+ parents_of = numpy.zeros(primary_parents_of.shape[0], grandparents_of.dtype)
4386
+
4387
+ if primary_parents_of.shape[0] > 0:
4388
+ parents_of[mask] = grandparents_of[primary_parents_of[mask] - 1]
4389
+ elif primary_parent_feature in meas.get_feature_names(parent_name):
4390
+ primary_parents_of = meas.get_measurement(
4391
+ sub_object_name, primary_parent_feature
4392
+ )
4393
+
4394
+ primary_parents_of_parent = meas.get_measurement(
4395
+ parent_name, primary_parent_feature
4396
+ )
4397
+
4398
+ if len(primary_parents_of_parent) == 0:
4399
+ return primary_parents_of_parent
4400
+
4401
+ #
4402
+ # There may not be a 1-1 relationship, but we attempt to
4403
+ # construct one
4404
+ #
4405
+ reverse_lookup_len = max(
4406
+ numpy.max(primary_parents_of) + 1, len(primary_parents_of_parent)
4407
+ )
4408
+
4409
+ reverse_lookup = numpy.zeros(reverse_lookup_len, int)
4410
+
4411
+ if primary_parents_of_parent.shape[0] > 0:
4412
+ reverse_lookup[primary_parents_of_parent] = numpy.arange(
4413
+ 1, len(primary_parents_of_parent) + 1
4414
+ )
4415
+
4416
+ if primary_parents_of.shape[0] > 0:
4417
+ parents_of = reverse_lookup[primary_parents_of]
4418
+ else:
4419
+ raise ValueError(
4420
+ "Don't know how to relate {} to {}".format(primary_parent, parent_name)
4421
+ )
4422
+
4423
+ return parents_of
4424
+
@@ -707,7 +707,7 @@ def find_label_overlaps(parent_labels, child_labels, validate=True):
707
707
  shape=(parent_count + 1, child_count + 1),
708
708
  )
709
709
 
710
- # needs library tests
710
+ # TODO: library - needs library tests
711
711
  def find_ijv_overlaps(parent_ijv, child_ijv, validate=True):
712
712
  """
713
713
  Find per pixel overlap of parent labels and child labels
@@ -810,3 +810,42 @@ def relate_histogram(histogram: scipy.sparse.coo_matrix) -> Tuple[NDArray[Object
810
810
  #
811
811
  return children_per_parent, parents_of_children[1:]
812
812
 
813
+ def relate_children(
814
+ parent_segmentations,
815
+ child_segmentations,
816
+ parent_ijv,
817
+ child_ijv,
818
+ volumetric=False
819
+ ):
820
+ """Relate the object numbers in one label to the object numbers in another
821
+
822
+ children - another "objects" instance: the labels of children within
823
+ the parent which is "self"
824
+
825
+ Returns two 1-d arrays. The first gives the number of children within
826
+ each parent. The second gives the mapping of each child to its parent's
827
+ object number.
828
+ """
829
+ if volumetric:
830
+ histogram = histogram_from_labels(parent_segmentations, child_segmentations)
831
+ else:
832
+ histogram = histogram_from_ijv(parent_ijv, child_ijv)
833
+
834
+ return relate_histogram(histogram)
835
+
836
+ def histogram_from_ijv(
837
+ parent_ijv,
838
+ child_ijv
839
+ ):
840
+ """Find per pixel overlap of parent labels and child labels,
841
+ stored in ijv format.
842
+
843
+ parent_ijv - the parents which contain the children
844
+ child_ijv - the children to be mapped to a parent
845
+
846
+ Returns a sparse matrix of overlap between each parent and child.
847
+ Note that the first row and column are empty, as these
848
+ correspond to parent and child labels of 0.
849
+ """
850
+ return find_ijv_overlaps(parent_ijv, child_ijv, validate=True)
851
+