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.
- {amaazetools-0.1.9/amaazetools.egg-info → amaazetools-0.2.1}/PKG-INFO +3 -2
- {amaazetools-0.1.9 → amaazetools-0.2.1}/amaazetools/dicom.py +14 -5
- {amaazetools-0.1.9 → amaazetools-0.2.1/amaazetools.egg-info}/PKG-INFO +3 -2
- {amaazetools-0.1.9 → amaazetools-0.2.1}/pyproject.toml +1 -1
- {amaazetools-0.1.9 → amaazetools-0.2.1}/LICENSE +0 -0
- {amaazetools-0.1.9 → amaazetools-0.2.1}/MANIFEST.in +0 -0
- {amaazetools-0.1.9 → amaazetools-0.2.1}/README.md +0 -0
- {amaazetools-0.1.9 → amaazetools-0.2.1}/amaazetools/__init__.py +0 -0
- {amaazetools-0.1.9 → amaazetools-0.2.1}/amaazetools/edge_detection.py +0 -0
- {amaazetools-0.1.9 → amaazetools-0.2.1}/amaazetools/mesh_segmentation.py +0 -0
- {amaazetools-0.1.9 → amaazetools-0.2.1}/amaazetools/svi.py +0 -0
- {amaazetools-0.1.9 → amaazetools-0.2.1}/amaazetools/trimesh.py +0 -0
- {amaazetools-0.1.9 → amaazetools-0.2.1}/amaazetools.egg-info/SOURCES.txt +0 -0
- {amaazetools-0.1.9 → amaazetools-0.2.1}/amaazetools.egg-info/dependency_links.txt +0 -0
- {amaazetools-0.1.9 → amaazetools-0.2.1}/amaazetools.egg-info/requires.txt +0 -0
- {amaazetools-0.1.9 → amaazetools-0.2.1}/amaazetools.egg-info/top_level.txt +0 -0
- {amaazetools-0.1.9 → amaazetools-0.2.1}/setup.cfg +0 -0
- {amaazetools-0.1.9 → amaazetools-0.2.1}/setup.py +0 -0
- {amaazetools-0.1.9 → amaazetools-0.2.1}/src/cextensions.c +0 -0
- {amaazetools-0.1.9 → amaazetools-0.2.1}/src/memory_allocation.c +0 -0
- {amaazetools-0.1.9 → amaazetools-0.2.1}/src/memory_allocation.h +0 -0
- {amaazetools-0.1.9 → amaazetools-0.2.1}/src/mesh_operations.c +0 -0
- {amaazetools-0.1.9 → amaazetools-0.2.1}/src/mesh_operations.h +0 -0
- {amaazetools-0.1.9 → amaazetools-0.2.1}/src/svi_computations.c +0 -0
- {amaazetools-0.1.9 → amaazetools-0.2.1}/src/svi_computations.h +0 -0
- {amaazetools-0.1.9 → amaazetools-0.2.1}/src/vector_operations.h +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: amaazetools
|
|
3
|
-
Version: 0.1
|
|
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.
|
|
490
|
-
|
|
491
|
-
|
|
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
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: amaazetools
|
|
3
|
-
Version: 0.1
|
|
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
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|