Skip to content

Commit

Permalink
set fury kwargs explicity to avoid warning in newer version
Browse files Browse the repository at this point in the history
  • Loading branch information
wasserth committed Oct 10, 2024
1 parent d38d46c commit ae42537
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions totalsegmentator/preview.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,15 +197,15 @@ def plot_subject(ct_img, output_path, df=None, roi_data=None, smoothing=20,
# window_size = (1800, 1200) # if we need higher res image of single class

scene = window.Scene()
showm = window.ShowManager(scene, size=window_size, reset_camera=False)
showm = window.ShowManager(scene=scene, size=window_size, reset_camera=False)
showm.initialize()

# ct_img = nib.load(subject_path)
data = ct_img.get_fdata()
data = data.transpose(1, 2, 0) # Show sagittal view
data = data[::-1, :, :]
value_range = (-115, 225) # soft tissue window
slice_actor = actor.slicer(data, ct_img.affine, value_range)
slice_actor = actor.slicer(data=data, affine=ct_img.affine, value_range=value_range)
slice_actor.SetPosition(0, 0, 0)
scene.add(slice_actor)

Expand All @@ -231,7 +231,7 @@ def plot_subject(ct_img, output_path, df=None, roi_data=None, smoothing=20,
scene.reset_camera_tight(margin_factor=1.02) # need to do reset_camera=False in record for this to work in

output_path.parent.mkdir(parents=True, exist_ok=True)
window.record(scene, size=window_size,
window.record(scene=scene, size=window_size,
out_path=output_path, reset_camera=False) # , reset_camera=False
scene.clear()

Expand Down

0 comments on commit ae42537

Please sign in to comment.