dpm-srm 0.1.8__cp312-cp312-win_amd64.whl

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.
@@ -0,0 +1,66 @@
1
+ Metadata-Version: 2.4
2
+ Name: dpm_srm
3
+ Version: 0.1.8
4
+ Summary: Statistical Region Merging Segmentation
5
+ Author: Digital Porous Media
6
+ Author-email: Digital Porous Media <bcchang@utexas.edu>
7
+ License: BSD License
8
+ Project-URL: Homepage, https://github.com/digital-porous-media/
9
+ Project-URL: Repository, https://github.com/digital-porous-media/dpm_srm
10
+ Project-URL: Issues, https://github.com/digital-porous-media/dpm_srm/issues
11
+ Classifier: Development Status :: 2 - Pre-Alpha
12
+ Classifier: Intended Audience :: Science/Research
13
+ Classifier: License :: OSI Approved :: BSD License
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3.8
16
+ Classifier: Programming Language :: Python :: 3.9
17
+ Classifier: Programming Language :: Python :: 3.10
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Programming Language :: Python :: 3.13
21
+ Requires-Python: >=3.8
22
+ Description-Content-Type: text/markdown
23
+ License-File: LICENSE
24
+ Requires-Dist: numpy
25
+ Dynamic: author
26
+ Dynamic: license-file
27
+
28
+ # Statistical Region Merging
29
+
30
+ Statistical Region Merging (SRM) is a method for image segmentation. The labeled image is initialized such that each pixel (or voxel) corresponds to one region. A statistical test on neighboring regions determines whether the mean intensities are similar enough to be merged.
31
+
32
+ This library is an adaptation of the [SRM plugin to Fiji/ImageJ](https://imagej.net/plugins/statistical-region-merging) and is based on the algorithm proposed in [Nock and Nielsen (2004)](10.1109/tpami.2004.110). Our contribution was to translate the original algorithm to C++ and wrap it in Python. We provide this package under the Digital Porous Media (DPM) organization.
33
+
34
+
35
+ ## Installation:
36
+ dpm_srm is packaged on [pypi](https://pypi.org/project/dpm-srm/) and can be installed with pip.
37
+ ```pip install dpm-srm```.
38
+
39
+ If installing from source, this package requires a C++ compiler.
40
+
41
+ ## Usage Example:
42
+ ---
43
+ This implementation of SRM expects a 2D or 3D grayscale (single color channel) image of type uint8, uint16, or uint32 and a value for *Q*, which is used as a merging criterion. Roughly speaking, *Q* is an estimate of the number of expected regions, though this is not strictly adhered to. The larger the *Q* value, the more regions are produced. The algorithm will return a labeled image of the same shape and datatype as the input image.
44
+
45
+ Note that the algorithm performs bucket sorting, where the number of buckets correspond to the maximum allowable value for the particular datatype. Therefore, it's important that intensity values of the input image are scaled over the entire range of the datatype. For example, if the input image is uint8, the image should be scaled such that the minimum intensity value is 0, and the maximum is 255. If the input image is uint16 or uint32, the minimum values should be 0 and the maximum should be 65535 (or 4294967295) respectively.
46
+
47
+ We wrapped each version (2D vs. 3D, dtype) of the template class into individual class instances. The nomenclature is: SRM[2(or 3)]D_u[number_of_bits]() (e.g. ```SRG2D_u8()```, ```SRG3D_u32()```).
48
+
49
+ **Python Example:**
50
+ ```
51
+ import dpm_srm
52
+ import numpy as np
53
+
54
+ np.random.seed(130621)
55
+ image = np.random.randint(0, 256, size=(100, 200, 200), dtype=np.uint8)
56
+
57
+ srm_obj = dpm_srm.SRM3D_u8(image, Q=5.0)
58
+ srm_obj.segment()
59
+ segmentation = srm_obj.get_result()
60
+ ```
61
+
62
+
63
+ ## Acknowledgements
64
+ This project includes code adapted from Statistical Region Merging by Johannes Schindelin, which is licensed under the BSD 2-Clause License.
65
+
66
+ The original code can be found [here](https://github.com/fiji/Statistical_Region_Merging/tree/master)
@@ -0,0 +1,6 @@
1
+ dpm_srm.cp312-win_amd64.pyd,sha256=gsSiQSUEBLld-hN_0dnoGe3VY_hyoRWSD96slzz7gDg,227328
2
+ dpm_srm-0.1.8.dist-info/licenses/LICENSE,sha256=TM5GONWvPhpRwVxI_NcUUc7uI-0X3len7GhDC4zVkR4,3130
3
+ dpm_srm-0.1.8.dist-info/METADATA,sha256=OCy9N8ze8lD_NRfgr_YhKyWdUDvVDKnfr_vtkJ7WxsE,3739
4
+ dpm_srm-0.1.8.dist-info/WHEEL,sha256=-0WtXfa1FcFqYulduII3R48HVP8SNWtKBAbj4Y-usSY,102
5
+ dpm_srm-0.1.8.dist-info/top_level.txt,sha256=7x0Y5PfjV6e74A2kkg8ayzUTPlgqLbLdjZkWsP6TiL8,8
6
+ dpm_srm-0.1.8.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (80.10.1)
3
+ Root-Is-Purelib: false
4
+ Tag: cp312-cp312-win_amd64
5
+
@@ -0,0 +1,57 @@
1
+ BSD 2-Clause License
2
+
3
+ # Attribution
4
+ This project includes code adapted from Statistical Region Merging by Johannes Schindelin, licensed under the BSD 2-Clause License.
5
+
6
+ # Original License
7
+ Copyright (C) 2009 - 2013, Johannes Schindelin
8
+
9
+ * Redistribution and use in source and binary forms, with or without
10
+ * modification, are permitted provided that the following conditions are met:
11
+ *
12
+ * 1. Redistributions of source code must retain the above copyright notice,
13
+ * this list of conditions and the following disclaimer.
14
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
15
+ * this list of conditions and the following disclaimer in the documentation
16
+ * and/or other materials provided with the distribution.
17
+ *
18
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
22
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28
+ * POSSIBILITY OF SUCH DAMAGE.
29
+ *
30
+ * The views and conclusions contained in the software and documentation are
31
+ * those of the authors and should not be interpreted as representing official
32
+ * policies, either expressed or implied, of any organization.
33
+
34
+
35
+ # Our Contributions
36
+ Copyright (c) 2024, Digital Porous Media
37
+
38
+ Redistribution and use in source and binary forms, with or without
39
+ modification, are permitted provided that the following conditions are met:
40
+
41
+ 1. Redistributions of source code must retain the above copyright notice, this
42
+ list of conditions and the following disclaimer.
43
+
44
+ 2. Redistributions in binary form must reproduce the above copyright notice,
45
+ this list of conditions and the following disclaimer in the documentation
46
+ and/or other materials provided with the distribution.
47
+
48
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
49
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
50
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
51
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
52
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
53
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
54
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
55
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
56
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
57
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1 @@
1
+ dpm_srm
Binary file