File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 3
3
4
4
from synapse_net .file_utils import read_mrc
5
5
from synapse_net .sample_data import get_sample_data
6
- from synapse_net .tools . util import run_segmentation , get_model , compute_scale_from_voxel_size
6
+ from synapse_net .inference import compute_scale_from_voxel_size , get_model , run_segmentation
7
7
8
8
9
9
def segment_structures (tomogram , voxel_size ):
@@ -65,6 +65,10 @@ def main():
65
65
66
66
# Segment synaptic vesicles, the active zone, and the synaptic compartment.
67
67
segmentations = segment_structures (tomogram , voxel_size )
68
+ import h5py
69
+ with h5py .File ("seg.h5" , "r" ) as f :
70
+ for name , seg in segmentations .items ():
71
+ f .create_dataset (name , data = seg , compression = "gzip" )
68
72
69
73
# Post-process the segmentations, to find the presynaptic terminal,
70
74
# filter out vesicles not in the terminal, and to 'snape' the AZ to the presynaptic boundary.
Original file line number Diff line number Diff line change 1
1
"""This submodule implements SynapseNet's segmentation functionality.
2
2
"""
3
- from .inference import run_segmentation , get_model
3
+ from .inference import run_segmentation , get_model , compute_scale_from_voxel_size
You can’t perform that action at this time.
0 commit comments