From 790f4c6f0f7c67af1bb2225760f22c6ae897383c Mon Sep 17 00:00:00 2001 From: polarbean <harry.carey95@gmail.com> Date: Wed, 26 Mar 2025 17:13:56 +0100 Subject: [PATCH] make propagation optional --- PyNutil/io/read_and_write.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PyNutil/io/read_and_write.py b/PyNutil/io/read_and_write.py index 0487e0b..2389eaa 100644 --- a/PyNutil/io/read_and_write.py +++ b/PyNutil/io/read_and_write.py @@ -182,7 +182,7 @@ def load_segmentation(segmentation_path: str): # related to read and write # this function reads a VisuAlign JSON and returns the slices -def load_quint_json(filename): +def load_quint_json(filename, propagate_missing_values=True): """ Reads a VisuAlign JSON file (.waln or .wwrp) and extracts slice information. Slices may include anchoring, grid spacing, and other image metadata. @@ -213,7 +213,7 @@ def load_quint_json(filename): else: slices = vafile["slices"] - if len(slices) > 1: + if (len(slices) > 1) & propagate_missing_values: slices = propagate(slices) vafile["slices"] = slices return vafile -- GitLab