nettracer3d 0.8.5__tar.gz → 0.8.6__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.

Potentially problematic release.


This version of nettracer3d might be problematic. Click here for more details.

Files changed (30) hide show
  1. {nettracer3d-0.8.5/src/nettracer3d.egg-info → nettracer3d-0.8.6}/PKG-INFO +2 -2
  2. {nettracer3d-0.8.5 → nettracer3d-0.8.6}/README.md +1 -1
  3. {nettracer3d-0.8.5 → nettracer3d-0.8.6}/pyproject.toml +1 -1
  4. {nettracer3d-0.8.5 → nettracer3d-0.8.6}/src/nettracer3d/nettracer_gui.py +33 -7
  5. {nettracer3d-0.8.5 → nettracer3d-0.8.6}/src/nettracer3d/painting.py +7 -5
  6. {nettracer3d-0.8.5 → nettracer3d-0.8.6/src/nettracer3d.egg-info}/PKG-INFO +2 -2
  7. {nettracer3d-0.8.5 → nettracer3d-0.8.6}/LICENSE +0 -0
  8. {nettracer3d-0.8.5 → nettracer3d-0.8.6}/setup.cfg +0 -0
  9. {nettracer3d-0.8.5 → nettracer3d-0.8.6}/src/nettracer3d/__init__.py +0 -0
  10. {nettracer3d-0.8.5 → nettracer3d-0.8.6}/src/nettracer3d/cellpose_manager.py +0 -0
  11. {nettracer3d-0.8.5 → nettracer3d-0.8.6}/src/nettracer3d/community_extractor.py +0 -0
  12. {nettracer3d-0.8.5 → nettracer3d-0.8.6}/src/nettracer3d/excelotron.py +0 -0
  13. {nettracer3d-0.8.5 → nettracer3d-0.8.6}/src/nettracer3d/modularity.py +0 -0
  14. {nettracer3d-0.8.5 → nettracer3d-0.8.6}/src/nettracer3d/morphology.py +0 -0
  15. {nettracer3d-0.8.5 → nettracer3d-0.8.6}/src/nettracer3d/neighborhoods.py +0 -0
  16. {nettracer3d-0.8.5 → nettracer3d-0.8.6}/src/nettracer3d/nettracer.py +0 -0
  17. {nettracer3d-0.8.5 → nettracer3d-0.8.6}/src/nettracer3d/network_analysis.py +0 -0
  18. {nettracer3d-0.8.5 → nettracer3d-0.8.6}/src/nettracer3d/network_draw.py +0 -0
  19. {nettracer3d-0.8.5 → nettracer3d-0.8.6}/src/nettracer3d/node_draw.py +0 -0
  20. {nettracer3d-0.8.5 → nettracer3d-0.8.6}/src/nettracer3d/proximity.py +0 -0
  21. {nettracer3d-0.8.5 → nettracer3d-0.8.6}/src/nettracer3d/run.py +0 -0
  22. {nettracer3d-0.8.5 → nettracer3d-0.8.6}/src/nettracer3d/segmenter.py +0 -0
  23. {nettracer3d-0.8.5 → nettracer3d-0.8.6}/src/nettracer3d/segmenter_GPU.py +0 -0
  24. {nettracer3d-0.8.5 → nettracer3d-0.8.6}/src/nettracer3d/simple_network.py +0 -0
  25. {nettracer3d-0.8.5 → nettracer3d-0.8.6}/src/nettracer3d/smart_dilate.py +0 -0
  26. {nettracer3d-0.8.5 → nettracer3d-0.8.6}/src/nettracer3d.egg-info/SOURCES.txt +0 -0
  27. {nettracer3d-0.8.5 → nettracer3d-0.8.6}/src/nettracer3d.egg-info/dependency_links.txt +0 -0
  28. {nettracer3d-0.8.5 → nettracer3d-0.8.6}/src/nettracer3d.egg-info/entry_points.txt +0 -0
  29. {nettracer3d-0.8.5 → nettracer3d-0.8.6}/src/nettracer3d.egg-info/requires.txt +0 -0
  30. {nettracer3d-0.8.5 → nettracer3d-0.8.6}/src/nettracer3d.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nettracer3d
3
- Version: 0.8.5
3
+ Version: 0.8.6
4
4
  Summary: Scripts for intializing and analyzing networks from segmentations of three dimensional images.
5
5
  Author-email: Liam McLaughlin <liamm@wustl.edu>
6
6
  Project-URL: Documentation, https://nettracer3d.readthedocs.io/en/latest/
@@ -110,6 +110,6 @@ McLaughlin, L., Zhang, B., Sharma, S. et al. Three dimensional multiscalar neuro
110
110
 
111
111
  NetTracer3D was developed by Liam McLaughlin while working under Dr. Sanjay Jain at Washington University School of Medicine.
112
112
 
113
- -- Version 0.8.5 Updates --
113
+ -- Version 0.8.6 Updates --
114
114
 
115
115
  * See Documentation Once Updated
@@ -65,6 +65,6 @@ McLaughlin, L., Zhang, B., Sharma, S. et al. Three dimensional multiscalar neuro
65
65
 
66
66
  NetTracer3D was developed by Liam McLaughlin while working under Dr. Sanjay Jain at Washington University School of Medicine.
67
67
 
68
- -- Version 0.8.5 Updates --
68
+ -- Version 0.8.6 Updates --
69
69
 
70
70
  * See Documentation Once Updated
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "nettracer3d"
3
- version = "0.8.5"
3
+ version = "0.8.6"
4
4
  authors = [
5
5
  { name="Liam McLaughlin", email="liamm@wustl.edu" },
6
6
  ]
@@ -464,6 +464,8 @@ class ImageViewerWindow(QMainWindow):
464
464
  self.paint_batch = []
465
465
  self.last_paint_pos = None
466
466
 
467
+ self.resume = False
468
+
467
469
  def start_left_scroll(self):
468
470
  """Start scrolling left when left arrow is pressed."""
469
471
  # Single increment first
@@ -2498,6 +2500,8 @@ class ImageViewerWindow(QMainWindow):
2498
2500
 
2499
2501
  if self.machine_window is not None:
2500
2502
  if self.machine_window.segmentation_worker is not None:
2503
+ if not self.machine_window.segmentation_worker._paused:
2504
+ self.resume = True
2501
2505
  self.machine_window.segmentation_worker.pause()
2502
2506
 
2503
2507
  # Store current channel visibility state
@@ -2520,10 +2524,28 @@ class ImageViewerWindow(QMainWindow):
2520
2524
  """Handle brush mode with virtual painting."""
2521
2525
  if event.inaxes != self.ax:
2522
2526
  return
2527
+
2528
+ """
2529
+ try:
2530
+ if self.machine_window is not None and not self.machine_window.segmentation_worker._paused:
2531
+ current_xlim = self.ax.get_xlim() if hasattr(self, 'ax') and self.ax.get_xlim() != (0, 1) else None
2532
+ current_ylim = self.ax.get_ylim() if hasattr(self, 'ax') and self.ax.get_ylim() != (0, 1) else None
2533
+
2534
+ if self.pen_button.isChecked():
2535
+ channel = self.active_channel
2536
+ else:
2537
+ channel = 2
2538
+
2539
+ self.pm.initiate_paint_session(channel, current_xlim, current_ylim)
2540
+ except:
2541
+ pass
2542
+ """
2523
2543
 
2524
2544
  if event.button == 1 or event.button == 3:
2525
2545
  if self.machine_window is not None:
2526
2546
  if self.machine_window.segmentation_worker is not None:
2547
+ if not self.machine_window.segmentation_worker._paused:
2548
+ self.resume = True
2527
2549
  self.machine_window.segmentation_worker.pause()
2528
2550
 
2529
2551
  x, y = int(event.xdata), int(event.ydata)
@@ -3118,10 +3140,9 @@ class ImageViewerWindow(QMainWindow):
3118
3140
 
3119
3141
  self.update_display(preserve_zoom=(current_xlim, current_ylim), continue_paint = True)
3120
3142
 
3121
- if self.machine_window is not None:
3122
- if self.machine_window.segmentation_worker is not None:
3123
- self.machine_window.segmentation_worker.resume()
3124
-
3143
+ if self.resume:
3144
+ self.machine_window.segmentation_worker.resume()
3145
+ self.resume = False
3125
3146
 
3126
3147
 
3127
3148
  def highlight_value_in_tables(self, clicked_value):
@@ -5121,9 +5142,9 @@ class ImageViewerWindow(QMainWindow):
5121
5142
  self.channel_visible = self.pre_pan_channel_state.copy()
5122
5143
  self.is_pan_preview = False
5123
5144
  self.pan_background_image = None
5124
- if self.machine_window is not None:
5125
- if self.machine_window.segmentation_worker is not None:
5126
- self.machine_window.segmentation_worker.resume()
5145
+ if self.resume:
5146
+ self.machine_window.segmentation_worker.resume()
5147
+ self.resume = False
5127
5148
  if self.static_background is not None:
5128
5149
  # NEW: Convert virtual strokes to real data before cleanup
5129
5150
  if (hasattr(self, 'virtual_draw_operations') and self.virtual_draw_operations) or \
@@ -9605,6 +9626,8 @@ class MachineWindow(QMainWindow):
9605
9626
  self.fore_button.click()
9606
9627
  self.fore_button.click()
9607
9628
 
9629
+ self.num_chunks = 0
9630
+
9608
9631
  except:
9609
9632
  return
9610
9633
 
@@ -9892,6 +9915,7 @@ class MachineWindow(QMainWindow):
9892
9915
 
9893
9916
  self._last_z = current_z
9894
9917
 
9918
+ self.num_chunks += 1
9895
9919
 
9896
9920
  current_time = time.time()
9897
9921
  if current_time - self._last_update >= 1: # Match worker's interval
@@ -10110,6 +10134,8 @@ class SegmentationWorker(QThread):
10110
10134
  current_time = time.time()
10111
10135
  if (self.chunks_since_update >= self.chunks_per_update and
10112
10136
  current_time - self.last_update >= self.update_interval):
10137
+ if self.machine_window.parent().shape[1] * self.machine_window.parent().shape[2] > 3000 * 3000: #arbitrary throttle for large arrays.
10138
+ self.msleep(3000)
10113
10139
  self.chunk_processed.emit()
10114
10140
  self.chunks_since_update = 0
10115
10141
  self.last_update = current_time
@@ -8,6 +8,8 @@ class PaintManager(QMainWindow):
8
8
  def __init__(self, parent = None):
9
9
  super().__init__(parent)
10
10
 
11
+ self.resume = False
12
+
11
13
  def get_line_points(self, x0, y0, x1, y1):
12
14
  """Get all points in a line between (x0,y0) and (x1,y1) using Bresenham's algorithm."""
13
15
  points = []
@@ -44,7 +46,8 @@ class PaintManager(QMainWindow):
44
46
 
45
47
  if self.parent().machine_window is not None:
46
48
  if self.parent().machine_window.segmentation_worker is not None:
47
- # Instead of just pausing, completely stop and clean up the worker
49
+ if not self.parent().machine_window.segmentation_worker._paused:
50
+ self.resume = True
48
51
  self.parent().machine_window.segmentation_worker.pause()
49
52
 
50
53
 
@@ -54,10 +57,9 @@ class PaintManager(QMainWindow):
54
57
  # Capture the background once
55
58
  self.parent().static_background = self.parent().canvas.copy_from_bbox(self.parent().ax.bbox)
56
59
 
57
- if self.parent().machine_window is not None:
58
- if self.parent().machine_window.segmentation_worker is not None:
59
- # Instead of just pausing, completely stop and clean up the worker
60
- self.parent().machine_window.segmentation_worker.resume()
60
+ if self.resume:
61
+ self.parent().machine_window.segmentation_worker.resume()
62
+ self.resume = False
61
63
 
62
64
 
63
65
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nettracer3d
3
- Version: 0.8.5
3
+ Version: 0.8.6
4
4
  Summary: Scripts for intializing and analyzing networks from segmentations of three dimensional images.
5
5
  Author-email: Liam McLaughlin <liamm@wustl.edu>
6
6
  Project-URL: Documentation, https://nettracer3d.readthedocs.io/en/latest/
@@ -110,6 +110,6 @@ McLaughlin, L., Zhang, B., Sharma, S. et al. Three dimensional multiscalar neuro
110
110
 
111
111
  NetTracer3D was developed by Liam McLaughlin while working under Dr. Sanjay Jain at Washington University School of Medicine.
112
112
 
113
- -- Version 0.8.5 Updates --
113
+ -- Version 0.8.6 Updates --
114
114
 
115
115
  * See Documentation Once Updated
File without changes
File without changes