From b306f322ec05410a45155be3139d6824824aadca Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Mon, 29 Apr 2024 21:30:24 -0400 Subject: [PATCH] util/view-mri-data.py: minor tweaks --- util/view-mri-data.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/util/view-mri-data.py b/util/view-mri-data.py index 62ae9b7..01bddbd 100755 --- a/util/view-mri-data.py +++ b/util/view-mri-data.py @@ -33,18 +33,19 @@ def cube_root(n): import numpy as np data = np.fromfile(sys.argv[1], dtype='>u2') -original_data_length = 7143424 +original_data_length = 109*256*256 multiplier = cube_root(len(data) // original_data_length) data.shape = (109*multiplier, 256*multiplier, 256*multiplier) data = data.T # Display the data -mlab.figure(bgcolor=(0, 0, 0), size=(1000, 1000)) +mlab.figure( bgcolor=(0,0,0), size=(1000,1000) ) +# Our data is scalar (grayscale), but not equally spaced in all +# directions. src = mlab.pipeline.scalar_field(data) - -# Our data is not equally spaced in all directions: src.spacing = [1, 1, 1.5] src.update_image_data = True -v = mlab.pipeline.volume(src, vmax=2500, vmin=1400) + +mlab.pipeline.volume(src, vmin=1400, vmax=2500) mlab.show() -- 2.44.2