nettracer3d 0.3.6__tar.gz → 0.3.8__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 (23) hide show
  1. {nettracer3d-0.3.6/src/nettracer3d.egg-info → nettracer3d-0.3.8}/PKG-INFO +1 -1
  2. {nettracer3d-0.3.6 → nettracer3d-0.3.8}/pyproject.toml +1 -1
  3. {nettracer3d-0.3.6 → nettracer3d-0.3.8}/src/nettracer3d/nettracer_gui.py +24 -12
  4. {nettracer3d-0.3.6 → nettracer3d-0.3.8/src/nettracer3d.egg-info}/PKG-INFO +1 -1
  5. {nettracer3d-0.3.6 → nettracer3d-0.3.8}/LICENSE +0 -0
  6. {nettracer3d-0.3.6 → nettracer3d-0.3.8}/README.md +0 -0
  7. {nettracer3d-0.3.6 → nettracer3d-0.3.8}/setup.cfg +0 -0
  8. {nettracer3d-0.3.6 → nettracer3d-0.3.8}/src/nettracer3d/__init__.py +0 -0
  9. {nettracer3d-0.3.6 → nettracer3d-0.3.8}/src/nettracer3d/community_extractor.py +0 -0
  10. {nettracer3d-0.3.6 → nettracer3d-0.3.8}/src/nettracer3d/hub_getter.py +0 -0
  11. {nettracer3d-0.3.6 → nettracer3d-0.3.8}/src/nettracer3d/modularity.py +0 -0
  12. {nettracer3d-0.3.6 → nettracer3d-0.3.8}/src/nettracer3d/morphology.py +0 -0
  13. {nettracer3d-0.3.6 → nettracer3d-0.3.8}/src/nettracer3d/nettracer.py +0 -0
  14. {nettracer3d-0.3.6 → nettracer3d-0.3.8}/src/nettracer3d/network_analysis.py +0 -0
  15. {nettracer3d-0.3.6 → nettracer3d-0.3.8}/src/nettracer3d/network_draw.py +0 -0
  16. {nettracer3d-0.3.6 → nettracer3d-0.3.8}/src/nettracer3d/node_draw.py +0 -0
  17. {nettracer3d-0.3.6 → nettracer3d-0.3.8}/src/nettracer3d/proximity.py +0 -0
  18. {nettracer3d-0.3.6 → nettracer3d-0.3.8}/src/nettracer3d/simple_network.py +0 -0
  19. {nettracer3d-0.3.6 → nettracer3d-0.3.8}/src/nettracer3d/smart_dilate.py +0 -0
  20. {nettracer3d-0.3.6 → nettracer3d-0.3.8}/src/nettracer3d.egg-info/SOURCES.txt +0 -0
  21. {nettracer3d-0.3.6 → nettracer3d-0.3.8}/src/nettracer3d.egg-info/dependency_links.txt +0 -0
  22. {nettracer3d-0.3.6 → nettracer3d-0.3.8}/src/nettracer3d.egg-info/requires.txt +0 -0
  23. {nettracer3d-0.3.6 → nettracer3d-0.3.8}/src/nettracer3d.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: nettracer3d
3
- Version: 0.3.6
3
+ Version: 0.3.8
4
4
  Summary: Scripts for intializing and analyzing networks from segmentations of three dimensional images.
5
5
  Author-email: Liam McLaughlin <boom2449@gmail.com>
6
6
  Project-URL: User_Manual, https://drive.google.com/drive/folders/1fTkz3n4LN9_VxKRKC8lVQSlrz_wq0bVn?usp=drive_link
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "nettracer3d"
3
- version = "0.3.6"
3
+ version = "0.3.8"
4
4
  authors = [
5
5
  { name="Liam McLaughlin", email="boom2449@gmail.com" },
6
6
  ]
@@ -167,6 +167,7 @@ class ImageViewerWindow(QMainWindow):
167
167
  self.zoom_button.setFixedSize(40, 40)
168
168
  self.zoom_button.clicked.connect(self.toggle_zoom_mode)
169
169
  control_layout.addWidget(self.zoom_button)
170
+ self.resizing = False
170
171
 
171
172
  self.pan_button = QPushButton("✋")
172
173
  self.pan_button.setCheckable(True)
@@ -564,7 +565,7 @@ class ImageViewerWindow(QMainWindow):
564
565
  link_nodes.triggered.connect(self.handle_link)
565
566
  delink_nodes = highlight_menu.addAction("Split Nodes")
566
567
  delink_nodes.triggered.connect(self.handle_split)
567
- context_menu.addMenu(highlight_menu)
568
+ context_menu.addMenu(highlight_menu)
568
569
 
569
570
  # Create measure menu
570
571
  measure_menu = QMenu("Measure", self)
@@ -2797,8 +2798,12 @@ class ImageViewerWindow(QMainWindow):
2797
2798
  def update_slice(self):
2798
2799
  """Queue a slice update when slider moves."""
2799
2800
  # Store current view settings
2800
- current_xlim = self.ax.get_xlim() if hasattr(self, 'ax') and self.ax.get_xlim() != (0, 1) else None
2801
- current_ylim = self.ax.get_ylim() if hasattr(self, 'ax') and self.ax.get_ylim() != (0, 1) else None
2801
+ if not self.resizing:
2802
+ current_xlim = self.ax.get_xlim() if hasattr(self, 'ax') and self.ax.get_xlim() != (0, 1) else None
2803
+ current_ylim = self.ax.get_ylim() if hasattr(self, 'ax') and self.ax.get_ylim() != (0, 1) else None
2804
+ else:
2805
+ current_xlim = None
2806
+ current_ylim = None
2802
2807
 
2803
2808
  # Store the pending slice and view settings
2804
2809
  self.pending_slice = (self.slice_slider.value(), (current_xlim, current_ylim))
@@ -2855,11 +2860,8 @@ class ImageViewerWindow(QMainWindow):
2855
2860
  self.ax = self.figure.add_subplot(111)
2856
2861
 
2857
2862
  # Store current zoom limits if they exist and weren't provided
2858
- if preserve_zoom is None and hasattr(self, 'ax'):
2859
- current_xlim = self.ax.get_xlim() if self.ax.get_xlim() != (0, 1) else None
2860
- current_ylim = self.ax.get_ylim() if self.ax.get_ylim() != (0, 1) else None
2861
- else:
2862
- current_xlim, current_ylim = preserve_zoom if preserve_zoom else (None, None)
2863
+
2864
+ current_xlim, current_ylim = preserve_zoom if preserve_zoom else (None, None)
2863
2865
 
2864
2866
  # Define base colors for each channel with increased intensity
2865
2867
  base_colors = self.base_colors
@@ -2934,10 +2936,7 @@ class ImageViewerWindow(QMainWindow):
2934
2936
  cmap=highlight_cmap,
2935
2937
  alpha=0.5)
2936
2938
 
2937
- # Restore zoom limits if they existed
2938
- if current_xlim is not None and current_ylim is not None:
2939
- self.ax.set_xlim(current_xlim)
2940
- self.ax.set_ylim(current_ylim)
2939
+
2941
2940
 
2942
2941
  # Style the axes
2943
2942
  self.ax.set_xlabel('X')
@@ -2978,8 +2977,17 @@ class ImageViewerWindow(QMainWindow):
2978
2977
  if active_channels:
2979
2978
  self.ax.set_xlim(-0.5, min_width - 0.5)
2980
2979
  self.ax.set_ylim(min_height - 0.5, -0.5)
2980
+
2981
+ if self.resizing:
2982
+ self.original_xlim = self.ax.get_xlim()
2983
+ self.original_ylim = self.ax.get_ylim()
2984
+ # Restore zoom limits if they existed
2985
+ if current_xlim is not None and current_ylim is not None:
2986
+ self.ax.set_xlim(current_xlim)
2987
+ self.ax.set_ylim(current_ylim)
2981
2988
 
2982
2989
  self.canvas.draw()
2990
+
2983
2991
  def show_netshow_dialog(self):
2984
2992
  dialog = NetShowDialog(self)
2985
2993
  dialog.exec()
@@ -4956,6 +4964,7 @@ class ResizeDialog(QDialog):
4956
4964
 
4957
4965
  def run_resize(self, undo = False):
4958
4966
  try:
4967
+ self.parent().resizing = True
4959
4968
  # Get parameters
4960
4969
  try:
4961
4970
  resize = float(self.resize.text()) if self.resize.text() else None
@@ -5104,6 +5113,7 @@ class ResizeDialog(QDialog):
5104
5113
 
5105
5114
  self.parent().update_display()
5106
5115
  self.reset_fields()
5116
+ self.parent().resizing = False
5107
5117
  self.accept()
5108
5118
 
5109
5119
  except Exception as e:
@@ -6034,6 +6044,7 @@ class GenNodesDialog(QDialog):
6034
6044
  )
6035
6045
 
6036
6046
  if down_factor > 0 and not self.called:
6047
+ self.parent().resizing = True
6037
6048
 
6038
6049
  my_network.edges = n3d.downsample(my_network.edges, down_factor, order = order)
6039
6050
  my_network.xy_scale = my_network.xy_scale * down_factor
@@ -6061,6 +6072,7 @@ class GenNodesDialog(QDialog):
6061
6072
 
6062
6073
 
6063
6074
  self.parent().update_display()
6075
+ self.parent().resizing = False
6064
6076
  self.accept()
6065
6077
 
6066
6078
  except Exception as e:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: nettracer3d
3
- Version: 0.3.6
3
+ Version: 0.3.8
4
4
  Summary: Scripts for intializing and analyzing networks from segmentations of three dimensional images.
5
5
  Author-email: Liam McLaughlin <boom2449@gmail.com>
6
6
  Project-URL: User_Manual, https://drive.google.com/drive/folders/1fTkz3n4LN9_VxKRKC8lVQSlrz_wq0bVn?usp=drive_link
File without changes
File without changes
File without changes