amaazetools 0.1.9__tar.gz → 0.2.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 (26) hide show
  1. {amaazetools-0.1.9/amaazetools.egg-info → amaazetools-0.2.1}/PKG-INFO +3 -2
  2. {amaazetools-0.1.9 → amaazetools-0.2.1}/amaazetools/dicom.py +14 -5
  3. {amaazetools-0.1.9 → amaazetools-0.2.1/amaazetools.egg-info}/PKG-INFO +3 -2
  4. {amaazetools-0.1.9 → amaazetools-0.2.1}/pyproject.toml +1 -1
  5. {amaazetools-0.1.9 → amaazetools-0.2.1}/LICENSE +0 -0
  6. {amaazetools-0.1.9 → amaazetools-0.2.1}/MANIFEST.in +0 -0
  7. {amaazetools-0.1.9 → amaazetools-0.2.1}/README.md +0 -0
  8. {amaazetools-0.1.9 → amaazetools-0.2.1}/amaazetools/__init__.py +0 -0
  9. {amaazetools-0.1.9 → amaazetools-0.2.1}/amaazetools/edge_detection.py +0 -0
  10. {amaazetools-0.1.9 → amaazetools-0.2.1}/amaazetools/mesh_segmentation.py +0 -0
  11. {amaazetools-0.1.9 → amaazetools-0.2.1}/amaazetools/svi.py +0 -0
  12. {amaazetools-0.1.9 → amaazetools-0.2.1}/amaazetools/trimesh.py +0 -0
  13. {amaazetools-0.1.9 → amaazetools-0.2.1}/amaazetools.egg-info/SOURCES.txt +0 -0
  14. {amaazetools-0.1.9 → amaazetools-0.2.1}/amaazetools.egg-info/dependency_links.txt +0 -0
  15. {amaazetools-0.1.9 → amaazetools-0.2.1}/amaazetools.egg-info/requires.txt +0 -0
  16. {amaazetools-0.1.9 → amaazetools-0.2.1}/amaazetools.egg-info/top_level.txt +0 -0
  17. {amaazetools-0.1.9 → amaazetools-0.2.1}/setup.cfg +0 -0
  18. {amaazetools-0.1.9 → amaazetools-0.2.1}/setup.py +0 -0
  19. {amaazetools-0.1.9 → amaazetools-0.2.1}/src/cextensions.c +0 -0
  20. {amaazetools-0.1.9 → amaazetools-0.2.1}/src/memory_allocation.c +0 -0
  21. {amaazetools-0.1.9 → amaazetools-0.2.1}/src/memory_allocation.h +0 -0
  22. {amaazetools-0.1.9 → amaazetools-0.2.1}/src/mesh_operations.c +0 -0
  23. {amaazetools-0.1.9 → amaazetools-0.2.1}/src/mesh_operations.h +0 -0
  24. {amaazetools-0.1.9 → amaazetools-0.2.1}/src/svi_computations.c +0 -0
  25. {amaazetools-0.1.9 → amaazetools-0.2.1}/src/svi_computations.h +0 -0
  26. {amaazetools-0.1.9 → amaazetools-0.2.1}/src/vector_operations.h +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: amaazetools
3
- Version: 0.1.9
3
+ Version: 0.2.1
4
4
  Summary: Python package for mesh processing tools developed by AMAAZE
5
5
  Author-email: Jeff Calder <jwcalder@umn.edu>
6
6
  License: MIT
@@ -21,6 +21,7 @@ Requires-Dist: scikit-learn
21
21
  Requires-Dist: matplotlib
22
22
  Requires-Dist: graphlearning
23
23
  Requires-Dist: plyfile
24
+ Dynamic: license-file
24
25
 
25
26
  # AMAAZE Tools
26
27
 
@@ -341,7 +341,7 @@ def imshow(J):
341
341
  plt.figure()
342
342
  plt.imshow(J, cmap='gray')
343
343
 
344
- def surface_bones(directory, iso=2500, write_gif=False):
344
+ def surface_bones(directory, iso=2500, write_gif=False, mirror=False):
345
345
  """ Processes all npz files in directory creating surface and saving to a ply file.
346
346
 
347
347
  Parameters
@@ -352,6 +352,8 @@ def surface_bones(directory, iso=2500, write_gif=False):
352
352
  Iso level to be used for surfacing.
353
353
  write_gif : bool (optional), default=False
354
354
  Whether to output rotating gifs for each object. Requires mayavi, which can be hard to install.
355
+ mirror : bool (optional), default=False
356
+ Whether to mirror bones when surfacing.
355
357
 
356
358
  Returns
357
359
  -------
@@ -367,6 +369,9 @@ def surface_bones(directory, iso=2500, write_gif=False):
367
369
  #Rescale image to account for different dx/dz dimensions
368
370
  J = rescale(I.astype(float),(dz/dx,1,1),mode='constant')
369
371
 
372
+ if mirror:
373
+ J = J[::-1,:,:]
374
+
370
375
  #Marching cubes for isosurface
371
376
  iso_level = iso
372
377
  verts,faces,normals,values = tm.marching_cubes(J,iso_level)
@@ -486,9 +491,10 @@ def process_dicom(directory, scanlayout, CTdir='ScanOverviews', Meshdir='Meshes'
486
491
  str_z1 = np.array2string(z1, separator=',')
487
492
  str_z2 = np.array2string(z2, separator=',')
488
493
 
489
- df = df.append({'ScanPacket':subdir, 'Process':True, 'x1':str_x1, 'x2':str_x2,
490
- 'y1':str_y1, 'y2':str_y2,
491
- 'z1':str_z1, 'z2':str_z2,}, ignore_index=True)
494
+ df = pd.concat([df, pd.DataFrame([{'ScanPacket':subdir, 'Process':True, 'x1':str_x1, 'x2':str_x2, 'y1':str_y1, 'y2':str_y2, 'z1':str_z1, 'z2':str_z2}])], ignore_index=True)
495
+ #df = df.append({'ScanPacket':subdir, 'Process':True, 'x1':str_x1, 'x2':str_x2,
496
+ # 'y1':str_y1, 'y2':str_y2,
497
+ # 'z1':str_z1, 'z2':str_z2,}, ignore_index=True)
492
498
  else: #Load chop locations from spreadsheet
493
499
 
494
500
  x1 = np.fromstring(chopsheet['x1'][i][1:-1], sep=',').astype(int)
@@ -870,7 +876,7 @@ def seg_adjacency_matrix(u):
870
876
  return M,X,Y
871
877
 
872
878
 
873
- def surfacing_subproc(filename,directory,iso_level,write_gif=False):
879
+ def surfacing_subproc(filename,directory,iso_level,write_gif=False,miror=False):
874
880
 
875
881
  print('Loading '+filename+'...')
876
882
  M = np.load(os.path.join(directory,filename))
@@ -878,6 +884,9 @@ def surfacing_subproc(filename,directory,iso_level,write_gif=False):
878
884
 
879
885
  #Rescale image to account for different dx/dz dimensions
880
886
  J = rescale(I.astype(float),(dz/dx,1,1),mode='constant')
887
+
888
+ if mirror:
889
+ J = J[::-1,:,:]
881
890
 
882
891
  try:
883
892
  verts,faces,normals,values = tm.marching_cubes(J,iso_level)
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: amaazetools
3
- Version: 0.1.9
3
+ Version: 0.2.1
4
4
  Summary: Python package for mesh processing tools developed by AMAAZE
5
5
  Author-email: Jeff Calder <jwcalder@umn.edu>
6
6
  License: MIT
@@ -21,6 +21,7 @@ Requires-Dist: scikit-learn
21
21
  Requires-Dist: matplotlib
22
22
  Requires-Dist: graphlearning
23
23
  Requires-Dist: plyfile
24
+ Dynamic: license-file
24
25
 
25
26
  # AMAAZE Tools
26
27
 
@@ -9,7 +9,7 @@ packages = ['amaazetools']
9
9
 
10
10
  [project]
11
11
  name = "amaazetools"
12
- version = "0.1.9"
12
+ version = "0.2.1"
13
13
  authors = [
14
14
  { name="Jeff Calder", email="jwcalder@umn.edu" },
15
15
  ]
File without changes
File without changes
File without changes
File without changes
File without changes