nettracer3d 0.5.1__tar.gz → 0.5.2__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 (26) hide show
  1. {nettracer3d-0.5.1/src/nettracer3d.egg-info → nettracer3d-0.5.2}/PKG-INFO +5 -5
  2. {nettracer3d-0.5.1 → nettracer3d-0.5.2}/README.md +2 -2
  3. {nettracer3d-0.5.1 → nettracer3d-0.5.2}/pyproject.toml +3 -3
  4. {nettracer3d-0.5.1 → nettracer3d-0.5.2}/src/nettracer3d/nettracer_gui.py +22 -17
  5. {nettracer3d-0.5.1 → nettracer3d-0.5.2}/src/nettracer3d/node_draw.py +5 -1
  6. {nettracer3d-0.5.1 → nettracer3d-0.5.2}/src/nettracer3d/segmenter.py +14 -2
  7. {nettracer3d-0.5.1 → nettracer3d-0.5.2/src/nettracer3d.egg-info}/PKG-INFO +5 -5
  8. {nettracer3d-0.5.1 → nettracer3d-0.5.2}/LICENSE +0 -0
  9. {nettracer3d-0.5.1 → nettracer3d-0.5.2}/setup.cfg +0 -0
  10. {nettracer3d-0.5.1 → nettracer3d-0.5.2}/src/nettracer3d/__init__.py +0 -0
  11. {nettracer3d-0.5.1 → nettracer3d-0.5.2}/src/nettracer3d/community_extractor.py +0 -0
  12. {nettracer3d-0.5.1 → nettracer3d-0.5.2}/src/nettracer3d/hub_getter.py +0 -0
  13. {nettracer3d-0.5.1 → nettracer3d-0.5.2}/src/nettracer3d/modularity.py +0 -0
  14. {nettracer3d-0.5.1 → nettracer3d-0.5.2}/src/nettracer3d/morphology.py +0 -0
  15. {nettracer3d-0.5.1 → nettracer3d-0.5.2}/src/nettracer3d/nettracer.py +0 -0
  16. {nettracer3d-0.5.1 → nettracer3d-0.5.2}/src/nettracer3d/network_analysis.py +0 -0
  17. {nettracer3d-0.5.1 → nettracer3d-0.5.2}/src/nettracer3d/network_draw.py +0 -0
  18. {nettracer3d-0.5.1 → nettracer3d-0.5.2}/src/nettracer3d/proximity.py +0 -0
  19. {nettracer3d-0.5.1 → nettracer3d-0.5.2}/src/nettracer3d/run.py +0 -0
  20. {nettracer3d-0.5.1 → nettracer3d-0.5.2}/src/nettracer3d/simple_network.py +0 -0
  21. {nettracer3d-0.5.1 → nettracer3d-0.5.2}/src/nettracer3d/smart_dilate.py +0 -0
  22. {nettracer3d-0.5.1 → nettracer3d-0.5.2}/src/nettracer3d.egg-info/SOURCES.txt +0 -0
  23. {nettracer3d-0.5.1 → nettracer3d-0.5.2}/src/nettracer3d.egg-info/dependency_links.txt +0 -0
  24. {nettracer3d-0.5.1 → nettracer3d-0.5.2}/src/nettracer3d.egg-info/entry_points.txt +0 -0
  25. {nettracer3d-0.5.1 → nettracer3d-0.5.2}/src/nettracer3d.egg-info/requires.txt +0 -0
  26. {nettracer3d-0.5.1 → nettracer3d-0.5.2}/src/nettracer3d.egg-info/top_level.txt +0 -0
@@ -1,9 +1,9 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: nettracer3d
3
- Version: 0.5.1
3
+ Version: 0.5.2
4
4
  Summary: Scripts for intializing and analyzing networks from segmentations of three dimensional images.
5
- Author-email: Liam McLaughlin <boom2449@gmail.com>
6
- Project-URL: User_Manual, https://drive.google.com/drive/folders/1fTkz3n4LN9_VxKRKC8lVQSlrz_wq0bVn?usp=drive_link
5
+ Author-email: Liam McLaughlin <mclaughlinliam99@gmail.com>
6
+ Project-URL: User_Tutorial, https://www.youtube.com/watch?v=cRatn5VTWDY
7
7
  Project-URL: Reference_Citation_For_Use, https://doi.org/10.1101/2024.07.29.605633
8
8
  Classifier: Programming Language :: Python :: 3
9
9
  Classifier: License :: Other/Proprietary License
@@ -36,8 +36,8 @@ Requires-Dist: cupy; extra == "cupy"
36
36
  NetTracer3D is a python package developed for both 2D and 3D analysis of microscopic images in the .tif file format. It supports generation of 3D networks showing the relationships between objects (or nodes) in three dimensional space, either based on their own proximity or connectivity via connecting objects such as nerves or blood vessels. In addition to these functionalities are several advanced 3D data processing algorithms, such as labeling of branched structures or abstraction of branched structures into networks. Note that nettracer3d uses segmented data, which can be segmented from other softwares such as ImageJ and imported into NetTracer3D, although it does offer its own segmentation via intensity and volumetric thresholding, or random forest machine learning segmentation. NetTracer3D currently has a fully functional GUI. To use the GUI, after installing the nettracer3d package via pip, enter the command 'nettracer3d' in your command prompt:
37
37
 
38
38
 
39
- This gui is built from the PyQt6 package and therefore may not function on dockers or virtual envs that are unable to support PyQt6 displays. More advanced documentation (especially for the GUI) is coming down the line, but for now please see: https://drive.google.com/drive/folders/1fTkz3n4LN9_VxKRKC8lVQSlrz_wq0bVn?usp=drive_link
40
- for a user manual that provides older documentation.
39
+ This gui is built from the PyQt6 package and therefore may not function on dockers or virtual envs that are unable to support PyQt6 displays. More advanced documentation is coming down the line, but for now please see: https://www.youtube.com/watch?v=cRatn5VTWDY
40
+ for a video tutorial on using the GUI.
41
41
 
42
42
  NetTracer3D is free to use/fork for academic/nonprofit use so long as citation is provided, and is available for commercial use at a fee (see license file for information).
43
43
 
@@ -1,8 +1,8 @@
1
1
  NetTracer3D is a python package developed for both 2D and 3D analysis of microscopic images in the .tif file format. It supports generation of 3D networks showing the relationships between objects (or nodes) in three dimensional space, either based on their own proximity or connectivity via connecting objects such as nerves or blood vessels. In addition to these functionalities are several advanced 3D data processing algorithms, such as labeling of branched structures or abstraction of branched structures into networks. Note that nettracer3d uses segmented data, which can be segmented from other softwares such as ImageJ and imported into NetTracer3D, although it does offer its own segmentation via intensity and volumetric thresholding, or random forest machine learning segmentation. NetTracer3D currently has a fully functional GUI. To use the GUI, after installing the nettracer3d package via pip, enter the command 'nettracer3d' in your command prompt:
2
2
 
3
3
 
4
- This gui is built from the PyQt6 package and therefore may not function on dockers or virtual envs that are unable to support PyQt6 displays. More advanced documentation (especially for the GUI) is coming down the line, but for now please see: https://drive.google.com/drive/folders/1fTkz3n4LN9_VxKRKC8lVQSlrz_wq0bVn?usp=drive_link
5
- for a user manual that provides older documentation.
4
+ This gui is built from the PyQt6 package and therefore may not function on dockers or virtual envs that are unable to support PyQt6 displays. More advanced documentation is coming down the line, but for now please see: https://www.youtube.com/watch?v=cRatn5VTWDY
5
+ for a video tutorial on using the GUI.
6
6
 
7
7
  NetTracer3D is free to use/fork for academic/nonprofit use so long as citation is provided, and is available for commercial use at a fee (see license file for information).
8
8
 
@@ -1,8 +1,8 @@
1
1
  [project]
2
2
  name = "nettracer3d"
3
- version = "0.5.1"
3
+ version = "0.5.2"
4
4
  authors = [
5
- { name="Liam McLaughlin", email="boom2449@gmail.com" },
5
+ { name="Liam McLaughlin", email="mclaughlinliam99@gmail.com" },
6
6
  ]
7
7
  description = "Scripts for intializing and analyzing networks from segmentations of three dimensional images."
8
8
  dependencies = [
@@ -46,5 +46,5 @@ cupy = [
46
46
  nettracer3d = "nettracer3d.run:main"
47
47
 
48
48
  [project.urls]
49
- User_Manual = "https://drive.google.com/drive/folders/1fTkz3n4LN9_VxKRKC8lVQSlrz_wq0bVn?usp=drive_link"
49
+ User_Tutorial = "https://www.youtube.com/watch?v=cRatn5VTWDY"
50
50
  Reference_Citation_For_Use = "https://doi.org/10.1101/2024.07.29.605633"
@@ -1069,24 +1069,29 @@ class ImageViewerWindow(QMainWindow):
1069
1069
 
1070
1070
  neighbors = set() # Use a set from the start to avoid duplicates
1071
1071
  nodes += self.clicked_values['nodes']
1072
+
1073
+ try:
1072
1074
 
1073
- # Get the existing DataFrame from the model
1074
- original_df = self.network_table.model()._data
1075
-
1076
- # Create mask for pairs that have nodes of the ID in question
1077
- mask = (
1078
- (original_df.iloc[:, 0].isin(nodes)) | (original_df.iloc[:, 1].isin(nodes))
1079
- )
1080
-
1081
- # Filter the DataFrame to only include direct connections
1082
- filtered_df = original_df[mask].copy()
1083
-
1084
- # Create new model with filtered DataFrame and update selection table
1085
- new_model = PandasModel(filtered_df)
1086
- self.selection_table.setModel(new_model)
1087
-
1088
- # Switch to selection table
1089
- self.selection_button.click()
1075
+ # Get the existing DataFrame from the model
1076
+ original_df = self.network_table.model()._data
1077
+
1078
+ # Create mask for pairs that have nodes of the ID in question
1079
+ mask = (
1080
+ (original_df.iloc[:, 0].isin(nodes)) | (original_df.iloc[:, 1].isin(nodes))
1081
+ )
1082
+
1083
+
1084
+ # Filter the DataFrame to only include direct connections
1085
+ filtered_df = original_df[mask].copy()
1086
+
1087
+ # Create new model with filtered DataFrame and update selection table
1088
+ new_model = PandasModel(filtered_df)
1089
+ self.selection_table.setModel(new_model)
1090
+
1091
+ # Switch to selection table
1092
+ self.selection_button.click()
1093
+ except:
1094
+ pass
1090
1095
 
1091
1096
  print(f"Found {len(filtered_df)} direct connections between nodes of ID {sort} and their neighbors (of any ID)")
1092
1097
 
@@ -175,7 +175,11 @@ def degree_draw(degree_dict, centroid_dict, nodes):
175
175
 
176
176
  for node in centroid_dict:
177
177
 
178
- degree = degree_dict[node]
178
+ try:
179
+ degree = degree_dict[node]
180
+ except:
181
+ continue
182
+
179
183
  z, y, x = centroid_dict[node].astype(int)
180
184
 
181
185
  try:
@@ -2,8 +2,14 @@ from sklearn.ensemble import RandomForestClassifier
2
2
  import numpy as np
3
3
  try:
4
4
  import torch
5
+ except:
6
+ pass
7
+ try:
5
8
  import cupy as cp
6
9
  import cupyx.scipy.ndimage as cpx
10
+ except:
11
+ pass
12
+ try:
7
13
  from cuml.ensemble import RandomForestClassifier as cuRandomForestClassifier
8
14
  except:
9
15
  pass
@@ -19,9 +25,15 @@ class InteractiveSegmenter:
19
25
  self.image_3d = image_3d
20
26
  self.patterns = []
21
27
 
22
- self.use_gpu = use_gpu and cp.cuda.is_available()
28
+ try:
29
+ self.use_gpu = use_gpu and cp.cuda.is_available()
30
+ except:
31
+ self.use_gpu = False
23
32
  if self.use_gpu:
24
- print(f"Using GPU: {torch.cuda.get_device_name()}")
33
+ try:
34
+ print(f"Using GPU: {torch.cuda.get_device_name()}")
35
+ except:
36
+ pass
25
37
  self.image_gpu = cp.asarray(image_3d)
26
38
  try:
27
39
  self.model = cuRandomForestClassifier(
@@ -1,9 +1,9 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: nettracer3d
3
- Version: 0.5.1
3
+ Version: 0.5.2
4
4
  Summary: Scripts for intializing and analyzing networks from segmentations of three dimensional images.
5
- Author-email: Liam McLaughlin <boom2449@gmail.com>
6
- Project-URL: User_Manual, https://drive.google.com/drive/folders/1fTkz3n4LN9_VxKRKC8lVQSlrz_wq0bVn?usp=drive_link
5
+ Author-email: Liam McLaughlin <mclaughlinliam99@gmail.com>
6
+ Project-URL: User_Tutorial, https://www.youtube.com/watch?v=cRatn5VTWDY
7
7
  Project-URL: Reference_Citation_For_Use, https://doi.org/10.1101/2024.07.29.605633
8
8
  Classifier: Programming Language :: Python :: 3
9
9
  Classifier: License :: Other/Proprietary License
@@ -36,8 +36,8 @@ Requires-Dist: cupy; extra == "cupy"
36
36
  NetTracer3D is a python package developed for both 2D and 3D analysis of microscopic images in the .tif file format. It supports generation of 3D networks showing the relationships between objects (or nodes) in three dimensional space, either based on their own proximity or connectivity via connecting objects such as nerves or blood vessels. In addition to these functionalities are several advanced 3D data processing algorithms, such as labeling of branched structures or abstraction of branched structures into networks. Note that nettracer3d uses segmented data, which can be segmented from other softwares such as ImageJ and imported into NetTracer3D, although it does offer its own segmentation via intensity and volumetric thresholding, or random forest machine learning segmentation. NetTracer3D currently has a fully functional GUI. To use the GUI, after installing the nettracer3d package via pip, enter the command 'nettracer3d' in your command prompt:
37
37
 
38
38
 
39
- This gui is built from the PyQt6 package and therefore may not function on dockers or virtual envs that are unable to support PyQt6 displays. More advanced documentation (especially for the GUI) is coming down the line, but for now please see: https://drive.google.com/drive/folders/1fTkz3n4LN9_VxKRKC8lVQSlrz_wq0bVn?usp=drive_link
40
- for a user manual that provides older documentation.
39
+ This gui is built from the PyQt6 package and therefore may not function on dockers or virtual envs that are unable to support PyQt6 displays. More advanced documentation is coming down the line, but for now please see: https://www.youtube.com/watch?v=cRatn5VTWDY
40
+ for a video tutorial on using the GUI.
41
41
 
42
42
  NetTracer3D is free to use/fork for academic/nonprofit use so long as citation is provided, and is available for commercial use at a fee (see license file for information).
43
43
 
File without changes
File without changes