amaazetools 0.2.4__tar.gz → 0.2.6__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.2.4/amaazetools.egg-info → amaazetools-0.2.6}/PKG-INFO +1 -1
- {amaazetools-0.2.4 → amaazetools-0.2.6}/amaazetools/dicom.py +12 -2
- {amaazetools-0.2.4 → amaazetools-0.2.6/amaazetools.egg-info}/PKG-INFO +1 -1
- {amaazetools-0.2.4 → amaazetools-0.2.6}/pyproject.toml +1 -1
- {amaazetools-0.2.4 → amaazetools-0.2.6}/LICENSE +0 -0
- {amaazetools-0.2.4 → amaazetools-0.2.6}/MANIFEST.in +0 -0
- {amaazetools-0.2.4 → amaazetools-0.2.6}/README.md +0 -0
- {amaazetools-0.2.4 → amaazetools-0.2.6}/amaazetools/__init__.py +0 -0
- {amaazetools-0.2.4 → amaazetools-0.2.6}/amaazetools/edge_detection.py +0 -0
- {amaazetools-0.2.4 → amaazetools-0.2.6}/amaazetools/mesh_segmentation.py +0 -0
- {amaazetools-0.2.4 → amaazetools-0.2.6}/amaazetools/svi.py +0 -0
- {amaazetools-0.2.4 → amaazetools-0.2.6}/amaazetools/trimesh.py +0 -0
- {amaazetools-0.2.4 → amaazetools-0.2.6}/amaazetools.egg-info/SOURCES.txt +0 -0
- {amaazetools-0.2.4 → amaazetools-0.2.6}/amaazetools.egg-info/dependency_links.txt +0 -0
- {amaazetools-0.2.4 → amaazetools-0.2.6}/amaazetools.egg-info/requires.txt +0 -0
- {amaazetools-0.2.4 → amaazetools-0.2.6}/amaazetools.egg-info/top_level.txt +0 -0
- {amaazetools-0.2.4 → amaazetools-0.2.6}/setup.cfg +0 -0
- {amaazetools-0.2.4 → amaazetools-0.2.6}/setup.py +0 -0
- {amaazetools-0.2.4 → amaazetools-0.2.6}/src/cextensions.c +0 -0
- {amaazetools-0.2.4 → amaazetools-0.2.6}/src/memory_allocation.c +0 -0
- {amaazetools-0.2.4 → amaazetools-0.2.6}/src/memory_allocation.h +0 -0
- {amaazetools-0.2.4 → amaazetools-0.2.6}/src/mesh_operations.c +0 -0
- {amaazetools-0.2.4 → amaazetools-0.2.6}/src/mesh_operations.h +0 -0
- {amaazetools-0.2.4 → amaazetools-0.2.6}/src/svi_computations.c +0 -0
- {amaazetools-0.2.4 → amaazetools-0.2.6}/src/svi_computations.h +0 -0
- {amaazetools-0.2.4 → amaazetools-0.2.6}/src/vector_operations.h +0 -0
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#Utilities for processing dicom volumes
|
|
2
2
|
import pandas as pd, numpy as np
|
|
3
|
+
import datetime
|
|
3
4
|
import matplotlib.pyplot as plt
|
|
4
5
|
import pydicom as dicom
|
|
5
6
|
import scipy.ndimage as ndimage
|
|
@@ -370,6 +371,7 @@ def surface_bones(directory, iso=2500, write_gif=False, mirror=False):
|
|
|
370
371
|
J = rescale(I.astype(float),(dz/dx,1,1),mode='constant')
|
|
371
372
|
|
|
372
373
|
if mirror:
|
|
374
|
+
print("Correcting for mirroring...")
|
|
373
375
|
J = J[::-1,:,:]
|
|
374
376
|
|
|
375
377
|
#Marching cubes for isosurface
|
|
@@ -381,7 +383,11 @@ def surface_bones(directory, iso=2500, write_gif=False, mirror=False):
|
|
|
381
383
|
mesh.flip_normals()
|
|
382
384
|
|
|
383
385
|
#Write to ply file
|
|
384
|
-
mesh_filename = os.path.join(directory,filename[:-4]+'_iso%d'%iso_level)
|
|
386
|
+
#mesh_filename = os.path.join(directory,filename[:-4]+'_iso%d'%iso_level)
|
|
387
|
+
date_time = datetime.now().strftime("%Y%m%d_%H%M")
|
|
388
|
+
basename = os.path.splitext(filename)[0] # If we are ever concerned about varying filing extension lengths
|
|
389
|
+
mesh_filename = os.path.join(directory, basename + '_iso%d' % iso_level + '_original_' + date_time)
|
|
390
|
+
|
|
385
391
|
print('Saving mesh to '+mesh_filename+'...')
|
|
386
392
|
mesh.to_ply(mesh_filename+'.ply')
|
|
387
393
|
|
|
@@ -886,6 +892,7 @@ def surfacing_subproc(filename,directory,iso_level,write_gif=False,mirror=False)
|
|
|
886
892
|
J = rescale(I.astype(float),(dz/dx,1,1),mode='constant')
|
|
887
893
|
|
|
888
894
|
if mirror:
|
|
895
|
+
print("Correcting for mirroring...")
|
|
889
896
|
J = J[::-1,:,:]
|
|
890
897
|
|
|
891
898
|
try:
|
|
@@ -896,7 +903,10 @@ def surfacing_subproc(filename,directory,iso_level,write_gif=False,mirror=False)
|
|
|
896
903
|
mesh.flip_normals()
|
|
897
904
|
|
|
898
905
|
#Write to ply file
|
|
899
|
-
mesh_filename = os.path.join(directory,filename[:-4]+'_iso%d'%iso_level)
|
|
906
|
+
#mesh_filename = os.path.join(directory,filename[:-4]+'_iso%d'%iso_level) #This is the old one
|
|
907
|
+
date_time = datetime.now().strftime("%Y%m%d_%H%M")
|
|
908
|
+
basename = os.path.splitext(filename)[0] # If we are ever concerned about varying filing extension lengths
|
|
909
|
+
mesh_filename = os.path.join(directory, basename + '_iso%d' % iso_level + '_original_' + date_time)
|
|
900
910
|
print('Saving mesh to '+mesh_filename+'...')
|
|
901
911
|
mesh.to_ply(mesh_filename+'.ply')
|
|
902
912
|
|
|
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
|