Skip to content

Commit ba09eca

Browse files
Update to_imod.py (#127)
Don't scale the imod point export with the voxel size.
1 parent 61bd683 commit ba09eca

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

synapse_net/imod/to_imod.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -239,18 +239,11 @@ def write_segmentation_to_imod_as_points(
239239
segmentation_key: The key to the segmentation data in case the segmentation is stored in hdf5 files.
240240
"""
241241

242-
# Read the resolution information from the mrcfile.
243-
with mrcfile.open(mrc_path, "r") as f:
244-
resolution = f.voxel_size.tolist()
245-
246-
# The resolution is stored in angstrom, we convert it to nanometer.
247-
resolution = [res / 10 for res in resolution]
248-
249242
# Extract the center coordinates and radii from the segmentation.
250243
if isinstance(segmentation, str):
251244
segmentation = _load_segmentation(segmentation, segmentation_key)
252245
coordinates, radii = convert_segmentation_to_spheres(
253-
segmentation, resolution=resolution, radius_factor=radius_factor, estimate_radius_2d=estimate_radius_2d
246+
segmentation, radius_factor=radius_factor, estimate_radius_2d=estimate_radius_2d
254247
)
255248

256249
# Write the point annotations to imod.

0 commit comments

Comments
 (0)