Skip to content

Commit 712c446

Browse files
authored
Merge pull request #23 from nipy/bugfix/sagitall-orientation
Added flipping to the left for sagittal view
2 parents 7acad1c + 22d39eb commit 712c446

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

niwidgets/niwidget_volume.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@ def _default_plotter(self, mask_background=False, **kwargs):
105105
Plot three orthogonal views.
106106
107107
This is called by nifti_plotter, you shouldn't call it directly.
108-
109108
"""
110109
plt.gcf().clear()
111110
plt.ioff() # disable interactive mode
@@ -193,7 +192,11 @@ def _plot_slices(self, data, x, y, z, t,
193192
slice_obj[ii] = coords[ii]
194193

195194
# update the image
196-
imh.set_data(np.flipud(np.rot90(data[slice_obj], k=1)))
195+
imh.set_data(
196+
np.flipud(np.rot90(data[slice_obj], k=1))
197+
if views[ii] != 'Sagittal' else
198+
np.fliplr(np.flipud(np.rot90(data[slice_obj], k=1)))
199+
)
197200

198201
# draw guides to show selected coordinates
199202
guide_positions = [val for jj, val in enumerate(coords)

0 commit comments

Comments
 (0)