amaazetools 0.2.0__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.2.0/amaazetools.egg-info → amaazetools-0.2.1}/PKG-INFO +1 -1
  2. {amaazetools-0.2.0 → amaazetools-0.2.1}/amaazetools/dicom.py +10 -2
  3. {amaazetools-0.2.0 → amaazetools-0.2.1/amaazetools.egg-info}/PKG-INFO +1 -1
  4. {amaazetools-0.2.0 → amaazetools-0.2.1}/pyproject.toml +1 -1
  5. {amaazetools-0.2.0 → amaazetools-0.2.1}/LICENSE +0 -0
  6. {amaazetools-0.2.0 → amaazetools-0.2.1}/MANIFEST.in +0 -0
  7. {amaazetools-0.2.0 → amaazetools-0.2.1}/README.md +0 -0
  8. {amaazetools-0.2.0 → amaazetools-0.2.1}/amaazetools/__init__.py +0 -0
  9. {amaazetools-0.2.0 → amaazetools-0.2.1}/amaazetools/edge_detection.py +0 -0
  10. {amaazetools-0.2.0 → amaazetools-0.2.1}/amaazetools/mesh_segmentation.py +0 -0
  11. {amaazetools-0.2.0 → amaazetools-0.2.1}/amaazetools/svi.py +0 -0
  12. {amaazetools-0.2.0 → amaazetools-0.2.1}/amaazetools/trimesh.py +0 -0
  13. {amaazetools-0.2.0 → amaazetools-0.2.1}/amaazetools.egg-info/SOURCES.txt +0 -0
  14. {amaazetools-0.2.0 → amaazetools-0.2.1}/amaazetools.egg-info/dependency_links.txt +0 -0
  15. {amaazetools-0.2.0 → amaazetools-0.2.1}/amaazetools.egg-info/requires.txt +0 -0
  16. {amaazetools-0.2.0 → amaazetools-0.2.1}/amaazetools.egg-info/top_level.txt +0 -0
  17. {amaazetools-0.2.0 → amaazetools-0.2.1}/setup.cfg +0 -0
  18. {amaazetools-0.2.0 → amaazetools-0.2.1}/setup.py +0 -0
  19. {amaazetools-0.2.0 → amaazetools-0.2.1}/src/cextensions.c +0 -0
  20. {amaazetools-0.2.0 → amaazetools-0.2.1}/src/memory_allocation.c +0 -0
  21. {amaazetools-0.2.0 → amaazetools-0.2.1}/src/memory_allocation.h +0 -0
  22. {amaazetools-0.2.0 → amaazetools-0.2.1}/src/mesh_operations.c +0 -0
  23. {amaazetools-0.2.0 → amaazetools-0.2.1}/src/mesh_operations.h +0 -0
  24. {amaazetools-0.2.0 → amaazetools-0.2.1}/src/svi_computations.c +0 -0
  25. {amaazetools-0.2.0 → amaazetools-0.2.1}/src/svi_computations.h +0 -0
  26. {amaazetools-0.2.0 → amaazetools-0.2.1}/src/vector_operations.h +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: amaazetools
3
- Version: 0.2.0
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
@@ -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)
@@ -871,7 +876,7 @@ def seg_adjacency_matrix(u):
871
876
  return M,X,Y
872
877
 
873
878
 
874
- def surfacing_subproc(filename,directory,iso_level,write_gif=False):
879
+ def surfacing_subproc(filename,directory,iso_level,write_gif=False,miror=False):
875
880
 
876
881
  print('Loading '+filename+'...')
877
882
  M = np.load(os.path.join(directory,filename))
@@ -879,6 +884,9 @@ def surfacing_subproc(filename,directory,iso_level,write_gif=False):
879
884
 
880
885
  #Rescale image to account for different dx/dz dimensions
881
886
  J = rescale(I.astype(float),(dz/dx,1,1),mode='constant')
887
+
888
+ if mirror:
889
+ J = J[::-1,:,:]
882
890
 
883
891
  try:
884
892
  verts,faces,normals,values = tm.marching_cubes(J,iso_level)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: amaazetools
3
- Version: 0.2.0
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
@@ -9,7 +9,7 @@ packages = ['amaazetools']
9
9
 
10
10
  [project]
11
11
  name = "amaazetools"
12
- version = "0.2.0"
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