<jupyter_start><jupyter_text>LICENSE: GPL-V3Owner: <NAME> <EMAIL> Start up with Pydicom[toc]The whole DOC and project was finished in GOOGLE COLAB with MarkDown. where do i get the DICOM file?I get sample DICOM from the [Sample DICOM files](https://www.rubomedical.com/dicom_files/)I choose the third pictures as the samplewhich is: ![DICOM](https://www.rubomedical.com/dicom_files/dicom_viewer_demo04.jpg) View the filecurrent DICOM file contains 17 images,we will cut them all<jupyter_code># COLAB specific grammar for install package
!pip install pydicom matplotlib
import pydicom as dicom
import matplotlib.pyplot as plt
file_path: str = "./"
file_name: str = "0004.DCM"
dicom_file = dicom.dcmread(file_path + file_name)
print(dicom_file)
print(dicom_file.pixel_array.shape)
byte_array = dicom_file.pixel_array[:, 128:(512 - 128), 128:(512 - 128)]
for i in range(17):
  plt.subplot(4, 5, i+1)
  plt.imshow(byte_array[i])<jupyter_output>(17, 512, 512)
{'fraction_non_alphanumeric': 0.10796645702306079, 'fraction_numerical': 0.041928721174004195, 'mean_word_length': 5.920289855072464, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '133422', 'license': 'MIT', 'n_tokens_mistral': 389, 'n_tokens_neox': 349, 'n_words': 99, 'path': 'Medical/homework-1.ipynb', 'repo_name': 'lovebaihezi/lab', 'size': '972'}