This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
plt.imshow(patient6.windowed(l=100, w=700), cmap=plt.cm.bone); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
plt.imshow(patient6.windowed(*dicom_windows.mediastinum), cmap=plt.cm.bone); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
plt.imshow(patient6.windowed(*dicom_windows.lungs), cmap=plt.cm.bone); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
high_level = patient6.windowed(w=200, l=200) | |
low_level = patient6.windowed(w=200, l=-200) | |
show_images([high_level, low_level], titles=['high window level', 'low window level'], figsize=(7,7)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
high_width = patient6.windowed(w=1000, l=40) | |
low_width = patient6.windowed(w=100, l=40) | |
show_images([high_width, low_width], titles=['high window width', 'low window width'], figsize=(7,7)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
windowed_image = cropped.windowed(*dicom_windows.lungs) | |
show_image(windowed_image, cmap=plt.cm.bone); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dfs = pd.DataFrame(windowed_image) | |
#uncomment below to view locally | |
#dfs.style.set_properties(**{'font-size':'6pt'}).background_gradient('bone').format("{:.1f}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
df = pd.DataFrame(cropped) | |
#uncomment below to view locally | |
#df.style.set_properties(**{'font-size':'8pt'}).background_gradient('bone').format("{:.1f}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cropped = scaled[340:385,300:350] | |
show_image(cropped, cmap='bone'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from fastai.vision.all import * | |
from fastai.medical.imaging import * | |
import matplotlib.pyplot as plt | |
plt.rcParams["figure.figsize"] = (7,7) | |
source = 'D:/Datasets/rsna_pulmonary' | |
files = get_dicom_files(source) | |
patient6 = files[6].dcmread() |
NewerOlder