nettracer3d 0.2.9__tar.gz → 0.3.1__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 (24) hide show
  1. {nettracer3d-0.2.9/src/nettracer3d.egg-info → nettracer3d-0.3.1}/PKG-INFO +9 -4
  2. nettracer3d-0.3.1/README.md +13 -0
  3. {nettracer3d-0.2.9 → nettracer3d-0.3.1}/pyproject.toml +1 -1
  4. {nettracer3d-0.2.9 → nettracer3d-0.3.1}/src/nettracer3d/community_extractor.py +37 -3
  5. {nettracer3d-0.2.9 → nettracer3d-0.3.1}/src/nettracer3d/nettracer.py +46 -26
  6. {nettracer3d-0.2.9 → nettracer3d-0.3.1}/src/nettracer3d/nettracer_gui.py +10 -1
  7. {nettracer3d-0.2.9 → nettracer3d-0.3.1}/src/nettracer3d/network_analysis.py +40 -6
  8. {nettracer3d-0.2.9 → nettracer3d-0.3.1}/src/nettracer3d/network_draw.py +37 -3
  9. {nettracer3d-0.2.9 → nettracer3d-0.3.1}/src/nettracer3d/node_draw.py +37 -3
  10. {nettracer3d-0.2.9 → nettracer3d-0.3.1/src/nettracer3d.egg-info}/PKG-INFO +9 -4
  11. nettracer3d-0.2.9/README.md +0 -8
  12. {nettracer3d-0.2.9 → nettracer3d-0.3.1}/LICENSE +0 -0
  13. {nettracer3d-0.2.9 → nettracer3d-0.3.1}/setup.cfg +0 -0
  14. {nettracer3d-0.2.9 → nettracer3d-0.3.1}/src/nettracer3d/__init__.py +0 -0
  15. {nettracer3d-0.2.9 → nettracer3d-0.3.1}/src/nettracer3d/hub_getter.py +0 -0
  16. {nettracer3d-0.2.9 → nettracer3d-0.3.1}/src/nettracer3d/modularity.py +0 -0
  17. {nettracer3d-0.2.9 → nettracer3d-0.3.1}/src/nettracer3d/morphology.py +0 -0
  18. {nettracer3d-0.2.9 → nettracer3d-0.3.1}/src/nettracer3d/proximity.py +0 -0
  19. {nettracer3d-0.2.9 → nettracer3d-0.3.1}/src/nettracer3d/simple_network.py +0 -0
  20. {nettracer3d-0.2.9 → nettracer3d-0.3.1}/src/nettracer3d/smart_dilate.py +0 -0
  21. {nettracer3d-0.2.9 → nettracer3d-0.3.1}/src/nettracer3d.egg-info/SOURCES.txt +0 -0
  22. {nettracer3d-0.2.9 → nettracer3d-0.3.1}/src/nettracer3d.egg-info/dependency_links.txt +0 -0
  23. {nettracer3d-0.2.9 → nettracer3d-0.3.1}/src/nettracer3d.egg-info/requires.txt +0 -0
  24. {nettracer3d-0.2.9 → nettracer3d-0.3.1}/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.2.9
3
+ Version: 0.3.1
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
@@ -31,10 +31,15 @@ Requires-Dist: cupy-cuda12x; extra == "cuda12"
31
31
  Provides-Extra: cupy
32
32
  Requires-Dist: cupy; extra == "cupy"
33
33
 
34
- NetTracer3D is a python package developed for 3D analysis of microscopic images in the .tif file format, such as lightsheet images, although it can also be used for 2D analysis if the user converts the 2D .tif file into a 3D stack first by appending the image together twice. NetTracer3D does not function on images directly, but rather on binary/labelled segmentations of image signal, and general requires one segmentation to serve as objects in a network (nodes) and one segmentation to serve as a connective media (edges), although it is possible to make networks from only edges.
34
+ 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 or volumetric thresholding. NetTracer3D currently has a fully functional GUI. To use the GUI, after installing the nettracer3d package via pip, run a python script in your env with the following commands:
35
35
 
36
- Please see: https://drive.google.com/drive/folders/1fTkz3n4LN9_VxKRKC8lVQSlrz_wq0bVn?usp=drive_link
37
- for a user manual that provides documentation and detailed information.
36
+ #Start
37
+ from nettracer3d import nettracer_gui
38
+ nettracer_gui.run_gui()
39
+ #End
40
+
41
+ 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
42
+ for a user manual that provides older documentation.
38
43
 
39
44
  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).
40
45
 
@@ -0,0 +1,13 @@
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 or volumetric thresholding. NetTracer3D currently has a fully functional GUI. To use the GUI, after installing the nettracer3d package via pip, run a python script in your env with the following commands:
2
+
3
+ #Start
4
+ from nettracer3d import nettracer_gui
5
+ nettracer_gui.run_gui()
6
+ #End
7
+
8
+ 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
9
+ for a user manual that provides older documentation.
10
+
11
+ 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).
12
+
13
+ NetTracer3D was developed by Liam McLaughlin while working under Dr. Sanjay Jain at Washington University School of Medicine.
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "nettracer3d"
3
- version = "0.2.9"
3
+ version = "0.3.1"
4
4
  authors = [
5
5
  { name="Liam McLaughlin", email="boom2449@gmail.com" },
6
6
  ]
@@ -118,9 +118,43 @@ def get_border_nodes(partition, G):
118
118
 
119
119
  return border_nodes, intercom_connections, set(connected_coms)
120
120
 
121
- def downsample(data, factor):
122
- # Downsample the input data by a specified factor
123
- return zoom(data, 1/factor, order=0)
121
+ def downsample(data, factor, directory=None, order=0):
122
+ """
123
+ Can be used to downsample an image by some arbitrary factor. Downsampled output will be saved to the active directory if none is specified.
124
+
125
+ :param data: (Mandatory, string or ndarray) - If string, a path to a tif file to downsample. Note that the ndarray alternative is for internal use mainly and will not save its output.
126
+ :param factor: (Mandatory, int) - A factor by which to downsample the image.
127
+ :param directory: (Optional - Val = None, string) - A filepath to save outputs.
128
+ :param order: (Optional - Val = 0, int) - The order of interpolation for scipy.ndimage.zoom
129
+ :returns: a downsampled ndarray.
130
+ """
131
+ # Load the data if it's a file path
132
+ if isinstance(data, str):
133
+ data2 = data
134
+ data = tifffile.imread(data)
135
+ else:
136
+ data2 = None
137
+
138
+ # Check if Z dimension is too small relative to downsample factor
139
+ if data.ndim == 3 and data.shape[0] < factor * 4:
140
+ print(f"Warning: Z dimension ({data.shape[0]}) is less than 4x the downsample factor ({factor}). "
141
+ f"Skipping Z-axis downsampling to preserve resolution.")
142
+ zoom_factors = (1, 1/factor, 1/factor)
143
+ else:
144
+ zoom_factors = 1/factor
145
+
146
+ # Apply downsampling
147
+ data = zoom(data, zoom_factors, order=order)
148
+
149
+ # Save if input was a file path
150
+ if isinstance(data2, str):
151
+ if directory is None:
152
+ filename = "downsampled.tif"
153
+ else:
154
+ filename = f"{directory}/downsampled.tif"
155
+ tifffile.imwrite(filename, data)
156
+
157
+ return data
124
158
 
125
159
  def labels_to_boolean(label_array, labels_list):
126
160
  # Use np.isin to create a boolean array with a single operation
@@ -696,29 +696,35 @@ def fill_holes_3d(array):
696
696
 
697
697
  array = binarize(array)
698
698
  inv_array = invert_array(array)
699
+
699
700
 
700
701
  # Create arrays for all three planes
701
702
  array_xy = np.zeros_like(inv_array, dtype=np.uint8)
702
703
  array_xz = np.zeros_like(inv_array, dtype=np.uint8)
703
704
  array_yz = np.zeros_like(inv_array, dtype=np.uint8)
704
-
705
+
706
+
705
707
  # Process XY plane
706
708
  for z in range(inv_array.shape[0]):
707
709
  array_xy[z] = process_slice(inv_array[z])
710
+
711
+ if array.shape[0] > 3: #only use these dimensions for sufficiently large zstacks
708
712
 
709
- # Process XZ plane
710
- for y in range(inv_array.shape[1]):
711
- slice_xz = inv_array[:, y, :]
712
- array_xz[:, y, :] = process_slice(slice_xz)
713
+ # Process XZ plane
714
+ for y in range(inv_array.shape[1]):
715
+ slice_xz = inv_array[:, y, :]
716
+ array_xz[:, y, :] = process_slice(slice_xz)
717
+
718
+ # Process YZ plane
719
+ for x in range(inv_array.shape[2]):
720
+ slice_yz = inv_array[:, :, x]
721
+ array_yz[:, :, x] = process_slice(slice_yz)
713
722
 
714
- # Process YZ plane
715
- for x in range(inv_array.shape[2]):
716
- slice_yz = inv_array[:, :, x]
717
- array_yz[:, :, x] = process_slice(slice_yz)
718
-
719
- # Combine results from all three planes
720
- filled = (array_xy | array_xz | array_yz) * 255
721
- return array + filled
723
+ # Combine results from all three planes
724
+ filled = (array_xy | array_xz | array_yz) * 255
725
+ return array + filled
726
+ else:
727
+ return array_xy * 255
722
728
 
723
729
 
724
730
 
@@ -1336,35 +1342,44 @@ def directory_info(directory = None):
1336
1342
 
1337
1343
  #CLASSLESS FUNCTIONS THAT MAY BE USEFUL TO USERS TO RUN DIRECTLY THAT SUPPORT ANALYSIS IN SOME WAY. NOTE THESE METHODS SOMETIMES ARE USED INTERNALLY AS WELL:
1338
1344
 
1339
- def downsample(data, factor, directory = None, order = 0):
1345
+ def downsample(data, factor, directory=None, order=0):
1340
1346
  """
1341
1347
  Can be used to downsample an image by some arbitrary factor. Downsampled output will be saved to the active directory if none is specified.
1348
+
1342
1349
  :param data: (Mandatory, string or ndarray) - If string, a path to a tif file to downsample. Note that the ndarray alternative is for internal use mainly and will not save its output.
1343
1350
  :param factor: (Mandatory, int) - A factor by which to downsample the image.
1344
1351
  :param directory: (Optional - Val = None, string) - A filepath to save outputs.
1352
+ :param order: (Optional - Val = 0, int) - The order of interpolation for scipy.ndimage.zoom
1345
1353
  :returns: a downsampled ndarray.
1346
1354
  """
1347
-
1348
-
1349
- # Downsample the input data by a specified factor
1350
-
1351
- if type(data) == str:
1355
+ # Load the data if it's a file path
1356
+ if isinstance(data, str):
1352
1357
  data2 = data
1353
1358
  data = tifffile.imread(data)
1354
1359
  else:
1355
1360
  data2 = None
1361
+
1362
+ # Check if Z dimension is too small relative to downsample factor
1363
+ if data.ndim == 3 and data.shape[0] < factor * 4:
1364
+ print(f"Warning: Z dimension ({data.shape[0]}) is less than 4x the downsample factor ({factor}). "
1365
+ f"Skipping Z-axis downsampling to preserve resolution.")
1366
+ zoom_factors = (1, 1/factor, 1/factor)
1367
+ else:
1368
+ zoom_factors = 1/factor
1356
1369
 
1357
- data = zoom(data, 1/factor, order=order)
1358
-
1359
- if type(data2) == str:
1370
+ # Apply downsampling
1371
+ data = zoom(data, zoom_factors, order=order)
1372
+
1373
+ # Save if input was a file path
1374
+ if isinstance(data2, str):
1360
1375
  if directory is None:
1361
- filename = f"downampled.tif"
1376
+ filename = "downsampled.tif"
1362
1377
  else:
1363
1378
  filename = f"{directory}/downsampled.tif"
1364
1379
  tifffile.imwrite(filename, data)
1365
-
1380
+
1366
1381
  return data
1367
-
1382
+
1368
1383
  def binarize(arrayimage, directory = None):
1369
1384
  """
1370
1385
  Can be used to binarize an image. Binary output will be saved to the active directory if none is specified.
@@ -3331,7 +3346,12 @@ class Network_3D:
3331
3346
 
3332
3347
  print("Converting all edge objects to nodes...")
3333
3348
 
3334
- df, identity_dict, max_node = network_analysis.edge_to_node(self._network_lists, self._node_identities)
3349
+ if self._nodes is not None:
3350
+ max_node = np.max(self._nodes)
3351
+ else:
3352
+ max_node = None
3353
+
3354
+ df, identity_dict, max_node = network_analysis.edge_to_node(self._network_lists, self._node_identities, maxnode = max_node)
3335
3355
 
3336
3356
  self._network_lists = network_analysis.read_excel_to_lists(df)
3337
3357
  self._network, net_weights = network_analysis.weighted_network(df)
@@ -4948,6 +4948,10 @@ class ResizeDialog(QDialog):
4948
4948
  # Process highlight overlay if it exists
4949
4949
  if self.parent().highlight_overlay is not None:
4950
4950
  self.parent().highlight_overlay = n3d.resize(self.parent().highlight_overlay, resize, order)
4951
+ if my_network.search_region is not None:
4952
+ my_network.search_region = n3d.resize(search_region, resize, order)
4953
+
4954
+
4951
4955
  else:
4952
4956
  # Process each channel
4953
4957
  if array_shape == self.parent().original_shape:
@@ -4962,6 +4966,8 @@ class ResizeDialog(QDialog):
4962
4966
  if self.parent().highlight_overlay is not None:
4963
4967
  self.parent().highlight_overlay = n3d.upsample_with_padding(self.parent().highlight_overlay, original_shape = self.parent().original_shape)
4964
4968
 
4969
+ my_network.search_region = n3d.upsample_with_padding(search_region, original_shape = self.parent().original_shape)
4970
+
4965
4971
 
4966
4972
  # Update slider range based on new z-dimension
4967
4973
  for channel in self.parent().channel_data:
@@ -6289,7 +6295,10 @@ class ModifyDialog(QDialog):
6289
6295
  my_network.edge_to_node()
6290
6296
  self.parent().load_channel(0, my_network.nodes, True)
6291
6297
  self.parent().load_channel(1, my_network.edges, True)
6292
-
6298
+ try:
6299
+ self.parent().format_for_upperright_table(my_network.node_centroids, 'NodeID', ['Z', 'Y', 'X'], 'Node Centroids')
6300
+ except:
6301
+ pass
6293
6302
  try:
6294
6303
  if hasattr(my_network, 'network_lists'):
6295
6304
  model = PandasModel(my_network.network_lists)
@@ -21,9 +21,43 @@ try:
21
21
  except:
22
22
  pass
23
23
 
24
- def downsample(data, factor):
25
- # Downsample the input data by a specified factor
26
- return zoom(data, 1/factor, order=0)
24
+ def downsample(data, factor, directory=None, order=0):
25
+ """
26
+ Can be used to downsample an image by some arbitrary factor. Downsampled output will be saved to the active directory if none is specified.
27
+
28
+ :param data: (Mandatory, string or ndarray) - If string, a path to a tif file to downsample. Note that the ndarray alternative is for internal use mainly and will not save its output.
29
+ :param factor: (Mandatory, int) - A factor by which to downsample the image.
30
+ :param directory: (Optional - Val = None, string) - A filepath to save outputs.
31
+ :param order: (Optional - Val = 0, int) - The order of interpolation for scipy.ndimage.zoom
32
+ :returns: a downsampled ndarray.
33
+ """
34
+ # Load the data if it's a file path
35
+ if isinstance(data, str):
36
+ data2 = data
37
+ data = tifffile.imread(data)
38
+ else:
39
+ data2 = None
40
+
41
+ # Check if Z dimension is too small relative to downsample factor
42
+ if data.ndim == 3 and data.shape[0] < factor * 4:
43
+ print(f"Warning: Z dimension ({data.shape[0]}) is less than 4x the downsample factor ({factor}). "
44
+ f"Skipping Z-axis downsampling to preserve resolution.")
45
+ zoom_factors = (1, 1/factor, 1/factor)
46
+ else:
47
+ zoom_factors = 1/factor
48
+
49
+ # Apply downsampling
50
+ data = zoom(data, zoom_factors, order=order)
51
+
52
+ # Save if input was a file path
53
+ if isinstance(data2, str):
54
+ if directory is None:
55
+ filename = "downsampled.tif"
56
+ else:
57
+ filename = f"{directory}/downsampled.tif"
58
+ tifffile.imwrite(filename, data)
59
+
60
+ return data
27
61
 
28
62
  def compute_centroid(binary_stack, label):
29
63
  """
@@ -157,7 +191,6 @@ def read_excel_to_lists(file_path, sheet_name=0):
157
191
  master_list[2].extend([int(x) for x in data_lists[i+2]])
158
192
  except IndexError:
159
193
  master_list[2].extend([0]) # Note: Changed to list with single int 0
160
- print(master_list)
161
194
 
162
195
  return master_list
163
196
 
@@ -1169,7 +1202,7 @@ def isolate_internode_connections(networkfile, nodeIDs, ID1, ID2):
1169
1202
  # Optional: Return the updated lists if needed
1170
1203
  return master_list, output_dict
1171
1204
 
1172
- def edge_to_node(network, node_identities = None):
1205
+ def edge_to_node(network, node_identities = None, maxnode = None):
1173
1206
  """Converts edge IDs into nodes, so that the node-edge relationships can be more easily visualized"""
1174
1207
 
1175
1208
  if node_identities is not None and type(node_identities) == str:
@@ -1195,7 +1228,8 @@ def edge_to_node(network, node_identities = None):
1195
1228
  nodesB = master_list[1]
1196
1229
  edgesC = master_list[2]
1197
1230
  allnodes = set(nodesA + nodesB)
1198
- maxnode = max(allnodes)
1231
+ if maxnode is None:
1232
+ maxnode = max(allnodes)
1199
1233
  print(f"Transposing all edge vals by {maxnode} to prevent ID overlap with preexisting nodes")
1200
1234
 
1201
1235
 
@@ -95,9 +95,43 @@ def draw_line_inplace(start, end, array):
95
95
  # Set the line coordinates to 255 in the existing array
96
96
  array[x_coords, y_coords, z_coords] = 255
97
97
 
98
- def downsample(data, factor):
99
- # Downsample the input data by a specified factor
100
- return zoom(data, 1/factor, order=0)
98
+ def downsample(data, factor, directory=None, order=0):
99
+ """
100
+ Can be used to downsample an image by some arbitrary factor. Downsampled output will be saved to the active directory if none is specified.
101
+
102
+ :param data: (Mandatory, string or ndarray) - If string, a path to a tif file to downsample. Note that the ndarray alternative is for internal use mainly and will not save its output.
103
+ :param factor: (Mandatory, int) - A factor by which to downsample the image.
104
+ :param directory: (Optional - Val = None, string) - A filepath to save outputs.
105
+ :param order: (Optional - Val = 0, int) - The order of interpolation for scipy.ndimage.zoom
106
+ :returns: a downsampled ndarray.
107
+ """
108
+ # Load the data if it's a file path
109
+ if isinstance(data, str):
110
+ data2 = data
111
+ data = tifffile.imread(data)
112
+ else:
113
+ data2 = None
114
+
115
+ # Check if Z dimension is too small relative to downsample factor
116
+ if data.ndim == 3 and data.shape[0] < factor * 4:
117
+ print(f"Warning: Z dimension ({data.shape[0]}) is less than 4x the downsample factor ({factor}). "
118
+ f"Skipping Z-axis downsampling to preserve resolution.")
119
+ zoom_factors = (1, 1/factor, 1/factor)
120
+ else:
121
+ zoom_factors = 1/factor
122
+
123
+ # Apply downsampling
124
+ data = zoom(data, zoom_factors, order=order)
125
+
126
+ # Save if input was a file path
127
+ if isinstance(data2, str):
128
+ if directory is None:
129
+ filename = "downsampled.tif"
130
+ else:
131
+ filename = f"{directory}/downsampled.tif"
132
+ tifffile.imwrite(filename, data)
133
+
134
+ return data
101
135
 
102
136
  def draw_network_lattice(nodes, network, label_nodes = None):
103
137
 
@@ -5,9 +5,43 @@ from PIL import Image, ImageDraw, ImageFont
5
5
  from scipy.ndimage import zoom
6
6
 
7
7
 
8
- def downsample(data, factor):
9
- # Downsample the input data by a specified factor
10
- return zoom(data, 1/factor, order=0)
8
+ def downsample(data, factor, directory=None, order=0):
9
+ """
10
+ Can be used to downsample an image by some arbitrary factor. Downsampled output will be saved to the active directory if none is specified.
11
+
12
+ :param data: (Mandatory, string or ndarray) - If string, a path to a tif file to downsample. Note that the ndarray alternative is for internal use mainly and will not save its output.
13
+ :param factor: (Mandatory, int) - A factor by which to downsample the image.
14
+ :param directory: (Optional - Val = None, string) - A filepath to save outputs.
15
+ :param order: (Optional - Val = 0, int) - The order of interpolation for scipy.ndimage.zoom
16
+ :returns: a downsampled ndarray.
17
+ """
18
+ # Load the data if it's a file path
19
+ if isinstance(data, str):
20
+ data2 = data
21
+ data = tifffile.imread(data)
22
+ else:
23
+ data2 = None
24
+
25
+ # Check if Z dimension is too small relative to downsample factor
26
+ if data.ndim == 3 and data.shape[0] < factor * 4:
27
+ print(f"Warning: Z dimension ({data.shape[0]}) is less than 4x the downsample factor ({factor}). "
28
+ f"Skipping Z-axis downsampling to preserve resolution.")
29
+ zoom_factors = (1, 1/factor, 1/factor)
30
+ else:
31
+ zoom_factors = 1/factor
32
+
33
+ # Apply downsampling
34
+ data = zoom(data, zoom_factors, order=order)
35
+
36
+ # Save if input was a file path
37
+ if isinstance(data2, str):
38
+ if directory is None:
39
+ filename = "downsampled.tif"
40
+ else:
41
+ filename = f"{directory}/downsampled.tif"
42
+ tifffile.imwrite(filename, data)
43
+
44
+ return data
11
45
 
12
46
  def upsample_with_padding(data, factor, original_shape):
13
47
  # Upsample the input binary array while adding padding to match the original shape
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: nettracer3d
3
- Version: 0.2.9
3
+ Version: 0.3.1
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
@@ -31,10 +31,15 @@ Requires-Dist: cupy-cuda12x; extra == "cuda12"
31
31
  Provides-Extra: cupy
32
32
  Requires-Dist: cupy; extra == "cupy"
33
33
 
34
- NetTracer3D is a python package developed for 3D analysis of microscopic images in the .tif file format, such as lightsheet images, although it can also be used for 2D analysis if the user converts the 2D .tif file into a 3D stack first by appending the image together twice. NetTracer3D does not function on images directly, but rather on binary/labelled segmentations of image signal, and general requires one segmentation to serve as objects in a network (nodes) and one segmentation to serve as a connective media (edges), although it is possible to make networks from only edges.
34
+ 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 or volumetric thresholding. NetTracer3D currently has a fully functional GUI. To use the GUI, after installing the nettracer3d package via pip, run a python script in your env with the following commands:
35
35
 
36
- Please see: https://drive.google.com/drive/folders/1fTkz3n4LN9_VxKRKC8lVQSlrz_wq0bVn?usp=drive_link
37
- for a user manual that provides documentation and detailed information.
36
+ #Start
37
+ from nettracer3d import nettracer_gui
38
+ nettracer_gui.run_gui()
39
+ #End
40
+
41
+ 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
42
+ for a user manual that provides older documentation.
38
43
 
39
44
  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).
40
45
 
@@ -1,8 +0,0 @@
1
- NetTracer3D is a python package developed for 3D analysis of microscopic images in the .tif file format, such as lightsheet images, although it can also be used for 2D analysis if the user converts the 2D .tif file into a 3D stack first by appending the image together twice. NetTracer3D does not function on images directly, but rather on binary/labelled segmentations of image signal, and general requires one segmentation to serve as objects in a network (nodes) and one segmentation to serve as a connective media (edges), although it is possible to make networks from only edges.
2
-
3
- Please see: https://drive.google.com/drive/folders/1fTkz3n4LN9_VxKRKC8lVQSlrz_wq0bVn?usp=drive_link
4
- for a user manual that provides documentation and detailed information.
5
-
6
- 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).
7
-
8
- NetTracer3D was developed by Liam McLaughlin while working under Dr. Sanjay Jain at Washington University School of Medicine.
File without changes
File without changes