Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Python/04_Image_Display.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,8 @@
" \"grey colormap,\\n scaling based on volumetric min and max values\", fontsize=10\n",
")\n",
"plt.imshow(npa_zslice, cmap=plt.cm.Greys_r, vmin=npa.min(), vmax=npa.max())\n",
"plt.axis(\"off\");"
"plt.axis(\"off\")\n",
"plt.show()"
]
},
{
Expand Down Expand Up @@ -321,6 +322,7 @@
"plt.figure(figsize=(10, 2))\n",
"plt.imshow(sitk.GetArrayViewFromImage(sitk_isotropic_xslice), cmap=plt.cm.Greys_r)\n",
"plt.axis(\"off\")\n",
"plt.show()\n",
"print(f\"Image spacing: {sitk_isotropic_xslice.GetSpacing()}\")"
]
},
Expand Down
6 changes: 4 additions & 2 deletions Python/69_x-ray-panorama.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,8 @@
"source": [
"intensity_profile_image = knee_image\n",
"fig = plt.figure()\n",
"plt.hist(sitk.GetArrayViewFromImage(intensity_profile_image).flatten(), bins=100);"
"plt.hist(sitk.GetArrayViewFromImage(intensity_profile_image).flatten(), bins=100)\n",
"plt.show()"
]
},
{
Expand Down Expand Up @@ -180,7 +181,8 @@
"axes[1].plot(intensities.mean(axis=1), range(intensities.shape[0]))\n",
"axes[1].get_yaxis().set_visible(False)\n",
"axes[1].tick_params(axis=\"x\", rotation=-90)\n",
"plt.box(on=None)"
"plt.box(on=None)\n",
"plt.show()"
]
},
{
Expand Down
6 changes: 6 additions & 0 deletions Python/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ def __init__(
vmax=self.moving_max_intensity,
)
self.update_display()
plt.show()

def create_ui(self):
# Create the active UI components. Height and width are specified in 'em' units. This is
Expand Down Expand Up @@ -414,6 +415,7 @@ def __init__(self, image, window_level=None, figure_size=(10, 8)):
vmax=self.max_intensity,
)
self.update_display()
plt.show()

def create_ui(self):
# Create the active UI components. Height and width are specified in 'em' units. This is
Expand Down Expand Up @@ -624,6 +626,7 @@ def multi_image_display2D(
ax.set_title(title)
ax.set_axis_off()
fig.tight_layout()
plt.show()
return (fig, axes)


Expand Down Expand Up @@ -693,6 +696,7 @@ def __init__(
)
self.update_display()
plt.tight_layout()
plt.show()

def create_ui(self, shared_slider, wl_range, wl_init):
# Create the active UI components. Height and width are specified in 'em' units. This is
Expand Down Expand Up @@ -877,6 +881,7 @@ def __init__(self, image, window_level=None, figure_size=(10, 8)):
vmax=self.max_intensity,
)
self.update_display()
plt.show()

def create_ui(self):
# Create the active UI components. Height and width are specified in 'em' units. This is
Expand Down Expand Up @@ -1176,6 +1181,7 @@ def __init__(
self.fig.canvas.mpl_connect("button_release_event", self.on_release)

self.update_display()
plt.show()

def create_ui(self):
# Create the active UI components. Height and width are specified in 'em' units. This is
Expand Down