Skip to content

Commit

Permalink
fix: Fixed metadata conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
Karol-G committed Oct 17, 2023
1 parent 08af893 commit e6d19be
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions particleseg3d/train/preprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ def preprocess_single(i: int,
image = utils.standardize(image, zscore)

image_shape = image.shape
source_particle_size_in_mm = tuple(metadata[name]["particle_size"])
source_spacing = tuple(metadata[name]["spacing"])
source_particle_size_in_mm = [metadata[name]["particle_size"]] * 3
source_spacing = [metadata[name]["spacing"]] * 3
target_particle_size_in_mm = tuple(utils.pixel2mm(target_particle_size_in_pixel, target_spacing))

size_conversion_factor = utils.compute_size_conversion_factor(source_particle_size_in_mm, source_spacing, target_particle_size_in_mm, target_spacing)
Expand Down

0 comments on commit e6d19be

Please sign in to comment.