{"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"pygments_lexer":"ipython3","nbconvert_exporter":"python","version":"3.6.4","file_extension":".py","codemirror_mode":{"name":"ipython","version":3},"name":"python","mimetype":"text/x-python"}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"markdown","source":"#Published on November 29, 2022 (22:28 GMT) by Marília Prata, mpwolke","metadata":{}},{"cell_type":"code","source":"# This Python 3 environment comes with many helpful analytics libraries installed\n# It is defined by the kaggle/python Docker image: https://github.com/kaggle/docker-python\n# For example, here's several helpful packages to load\n\nimport numpy as np # linear algebra\nimport pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)\n\n# Input data files are available in the read-only \"../input/\" directory\n# For example, running this (by clicking run or pressing Shift+Enter) will list all files under the input directory\n\nimport os\nfor dirname, _, filenames in os.walk('/kaggle/input'):\n    for filename in filenames:\n        print(os.path.join(dirname, filename))\n\n# You can write up to 20GB to the current directory (/kaggle/working/) that gets preserved as output when you create a version using \"Save & Run All\" \n# You can also write temporary files to /kaggle/temp/, but they won't be saved outside of the current session","metadata":{"_kg_hide-output":true,"_kg_hide-input":true,"execution":{"iopub.status.busy":"2022-11-29T23:12:19.783941Z","iopub.execute_input":"2022-11-29T23:12:19.784331Z","iopub.status.idle":"2022-11-29T23:13:02.615169Z","shell.execute_reply.started":"2022-11-29T23:12:19.784262Z","shell.execute_reply":"2022-11-29T23:13:02.613894Z"},"collapsed":true,"jupyter":{"outputs_hidden":true},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"#“Re-Visualize” The Mammogram for Breast Cancer Detection\n\nby Fred Pennic 08/15/2019 \n\n![](https://hitconsultant.net/wp-content/uploads/2019/08/ImagoSystemsMammographyVisualIntelligence.jpg)https://hitconsultant.net/2019/08/15/mayo-clinic-backs-imago-systems-breast-cancer-detection/","metadata":{}},{"cell_type":"markdown","source":"<center style=\"font-family:verdana;\"><h1 style=\"font-size:200%; padding: 10px; background: magenta;\"><b style=\"color:white;\">Machine Learning Mammographies and High-Risk Individuals</b></h1></center>","metadata":{}},{"cell_type":"markdown","source":"An Integrated Machine Learning Scheme for Predicting Mammographic Anomalies in High-Risk Individuals Using Questionnaire-Based Predictors\n\nCitation: Sun, C.-K.; Tang, Y.-X.; Liu, T.-C.; Lu, C.-J. An Integrated Machine Learning Scheme for Predicting Mammographic Anomalies in High-Risk Individuals Using Questionnaire-Based Predictors.\nInt. J. Environ. Res. Public Health 2022, 19, 9756. https://doi.org/10.3390/ ijerph19159756\n\n\"This study aimed to investigate the important predictors related to predicting positive mammographic findings based on questionnaire-based demographic and obstetric/gynecological parameters using the proposed integrated machine learning (ML) scheme.\"\n\n\"The scheme combines the benefits of two well-known ML algorithms, namely, least absolute shrinkage and selection operator (Lasso) logistic regression and extreme gradient boosting (XGB), to provide adequate prediction for mammographic anomalies in high-risk individuals and the identification of significant risk factors.\"\n\n\"The authors collected questionnaire data on 18 breast-cancer-related risk factors from women who participated in a national mammographic screening program between January 2017 and December 2020 at a single tertiary referral hospital to correlate with their mammographic findings. The acquired data were retrospectively analyzed using the proposed integrated ML scheme.\"\n\n\"Based on the data from 21,107 valid questionnaires, the results showed that the Lasso logistic regression models with variable combinations generated by XGB could provide more effective prediction results. The top five significant predictors for positive mammography results were younger age, breast self-examination, older age at first childbirth, nulliparity, and history of mammography within 2 years, suggesting a need for timely mammographic screening for women with these risk factors.\"\n\nhttps://pubmed.ncbi.nlm.nih.gov/35955112/","metadata":{}},{"cell_type":"code","source":"#Code by Sumeet Sagar https://www.kaggle.com/code/ssagar012/siim-covid-19-novice-notebook-eda-box-detection\n\n# Installing dcm library to read Dicom Images\n!pip install python-gdcm\nprint(\"Installation Complete\")\n!pip install tensorflow-io\nprint(\" TF - io Installed Successfully\")","metadata":{"_kg_hide-output":true,"execution":{"iopub.status.busy":"2022-11-29T23:14:17.007714Z","iopub.execute_input":"2022-11-29T23:14:17.008215Z","iopub.status.idle":"2022-11-29T23:14:58.480402Z","shell.execute_reply.started":"2022-11-29T23:14:17.008188Z","shell.execute_reply":"2022-11-29T23:14:58.479211Z"},"collapsed":true,"jupyter":{"outputs_hidden":true},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"#Code by Sumeet Sagar https://www.kaggle.com/code/ssagar012/siim-covid-19-novice-notebook-eda-box-detection\n\nimport numpy as np # linear algebra\nimport pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)\nimport ast #helps to process trees of the Python abstract syntax grammar.\nimport pydicom # for working with DICOM files such as medical images, reports, and radiotherapy objects.\nimport matplotlib.pyplot as plt\n%matplotlib inline\nimport PIL # Python Imaging Library\nfrom PIL import Image, ImageDraw, ImageFont #Python Imaging Library\nimport tensorflow as tf\n\nimport tensorflow_hub as hub\nimport wandb # experiment tracking, dataset versioning, and model management\nimport seaborn as sns\nimport tqdm # visualise progress\nimport cv2 #convert dicom to png","metadata":{"execution":{"iopub.status.busy":"2022-11-29T23:19:15.470693Z","iopub.execute_input":"2022-11-29T23:19:15.471031Z","iopub.status.idle":"2022-11-29T23:19:22.40059Z","shell.execute_reply.started":"2022-11-29T23:19:15.471007Z","shell.execute_reply":"2022-11-29T23:19:22.399575Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"#Code by Sumeet Sagar https://www.kaggle.com/code/ssagar012/siim-covid-19-novice-notebook-eda-box-detection\n\n# Importing the training files names\nt_image_fnames = []\npath = \"/kaggle/input/rsna-breast-cancer-detection/train_images/\"\nimport os\nlen(os.listdir(path))\nfor root, dirs, filenames in os.walk(path):\n    for fname in filenames:\n        t_image_fnames.append(os.path.join(root,fname))\n\n#train_image_level = pd.read_csv(\"/kaggle/input/rsna-2022-cervical-spine-fracture-detection/train_bounding_boxes.csv\")\ntrain_study_level = pd.read_csv(\"/kaggle/input/rsna-breast-cancer-detection/train.csv\")    \nlen(t_image_fnames)","metadata":{"execution":{"iopub.status.busy":"2022-11-29T23:19:28.33701Z","iopub.execute_input":"2022-11-29T23:19:28.337688Z","iopub.status.idle":"2022-11-29T23:19:37.880467Z","shell.execute_reply.started":"2022-11-29T23:19:28.337664Z","shell.execute_reply":"2022-11-29T23:19:37.879563Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"<center style=\"font-family:verdana;\"><h1 style=\"font-size:200%; padding: 10px; background: magenta;\"><b style=\"color:white;\">DICOMs, NIfTI and PACs</b></h1></center>","metadata":{}},{"cell_type":"markdown","source":"Best Practice for Annotating DICOM and NIfTI Files - By Dr. Andreas Heindl • September 28, 2022\n\n\"Medical imaging and annotation is a specialized field. Perhaps more so than any others, accuracy is crucial. When we consider the end-users, such as healthcare professionals, and the ultimate outcomes, the impact on patients, we can see why accuracy is crucial.\"\n\n\"In most cases, healthcare providers use the DICOM and NIfTI imaging standards. Medical images play a role in that, as 3D and 2D scans — regardless of the imaging standard — are integral to the diagnosis doctors give patients.\"\n\n\n#What is the difference between DICOM and PACS?\n\n\"In most healthcare workplaces, doctors and specialists also use the Picture Archiving and Communication System, or PACS, alongside other imaging formats. PACS is used as a medical image storage and archive system, with images being fed into by radiologists and other medical specialists. Images usually come from X-ray machines and MRI scanners.\"\n\n\"On the other hand, the DICOM format is an international communication standard for storing, communicating and transmitting medical images with layers of metadata. Medical professionals can use both, with one format supporting the other to ensure every stakeholder involved in patient care has the necessary information.\"\n\nhttps://encord.com/blog/best-practice-for-annotating-dicom-and-nifti-files","metadata":{}},{"cell_type":"code","source":"#Code by Sumeet Sagar https://www.kaggle.com/code/ssagar012/siim-covid-19-novice-notebook-eda-box-detection\n\n# Crosschecking that the number of image file paths is same as the number of image IDs\nif len(train_study_level.image_id) == len(t_image_fnames):\n    print(\"length is almost the same\")\n    \nelse:\n    print(\"holy moly\")\n    \ntrain_study_level.head()","metadata":{"execution":{"iopub.status.busy":"2022-11-29T23:19:43.306548Z","iopub.execute_input":"2022-11-29T23:19:43.306892Z","iopub.status.idle":"2022-11-29T23:19:43.334537Z","shell.execute_reply.started":"2022-11-29T23:19:43.306868Z","shell.execute_reply":"2022-11-29T23:19:43.333145Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"#BI-RADS\n\n\"BI-RADS (Breast Imaging-Reporting and Data System) is a risk assessment and quality assurance tool developed by American College of Radiology that provides a widely accepted lexicon and reporting schema for imaging of the breast. It applies to mammography, ultrasound, and MRI. This article reflects the 5th edition, published in 2013.\"\n\n\"Classification\nBreast imaging studies are assigned one of seven assessment categories:\n\nBI-RADS 0: incomplete\nneed additional imaging evaluation (additional mammographic views or ultrasound) and/or\nfor mammography, obtaining previous images not available at the time of reading\n\nBI-RADS 1: negative\nsymmetrical and no masses, architectural distortion, or suspicious calcifications\n\nBI-RADS 2: benign\n0% probability of malignancy\n\nBI-RADS 3: probably benign\n<2% probability of malignancy\nshort interval follow-up suggested\n\nBI-RADS 4: suspicious for malignancy\n2-94% probability of malignancy\nfor mammography and ultrasound, these can be further divided:\nBI-RADS 4A: low suspicion for malignancy (2-9%)\nBI-RADS 4B: moderate suspicion for malignancy (10-49%)\nBI-RADS 4C: high suspicion for malignancy (50-94%)\nbiopsy should be considered\n\nBI-RADS 5: highly suggestive of malignancy\n>95% probability of malignancy\nappropriate action should be taken\nBI-RADS 6: known biopsy-proven malignancy \n\nhttps://radiopaedia.org/articles/breast-imaging-reporting-and-data-system-bi-rads","metadata":{}},{"cell_type":"code","source":"print(\"There are \",train_study_level.image_id.duplicated().sum(),\" Images that refer to duplicated study IDs\")","metadata":{"execution":{"iopub.status.busy":"2022-11-29T23:19:49.210529Z","iopub.execute_input":"2022-11-29T23:19:49.210883Z","iopub.status.idle":"2022-11-29T23:19:49.219491Z","shell.execute_reply.started":"2022-11-29T23:19:49.210857Z","shell.execute_reply":"2022-11-29T23:19:49.218469Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"X = t_image_fnames\ny = train_study_level[\"image_id\"]","metadata":{"execution":{"iopub.status.busy":"2022-11-29T23:19:55.125352Z","iopub.execute_input":"2022-11-29T23:19:55.125823Z","iopub.status.idle":"2022-11-29T23:19:55.129998Z","shell.execute_reply.started":"2022-11-29T23:19:55.125798Z","shell.execute_reply":"2022-11-29T23:19:55.128853Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"#Four Best Practices for Using DICOM and NIfTI File Format in Computer Vision Models\n\nDisplay the data correctly to allow for pixel-perfect annotations\n\nEnsure high levels of medical image annotation quality for computer vision models\n\nMake data audits granular: Mission-critical for healthcare regulatory compliance\n\nImprove image and video annotation efficiency with automation, to save radiologists valuable time\n\nhttps://encord.com/blog/best-practice-for-annotating-dicom-and-nifti-files","metadata":{}},{"cell_type":"code","source":"#Code by Sumeet Sagar https://www.kaggle.com/code/ssagar012/siim-covid-19-novice-notebook-eda-box-detection\n\nimport matplotlib.pyplot as plt\n\nimport pydicom\n%matplotlib inline\nplt.figure(figsize = (10,8))\nimage = pydicom.dcmread(X[21])\nplt.imshow(image.pixel_array,cmap=plt.cm.bone);","metadata":{"execution":{"iopub.status.busy":"2022-11-29T23:20:00.130897Z","iopub.execute_input":"2022-11-29T23:20:00.131272Z","iopub.status.idle":"2022-11-29T23:20:04.590404Z","shell.execute_reply.started":"2022-11-29T23:20:00.131248Z","shell.execute_reply":"2022-11-29T23:20:04.589209Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"#Code by Sumeet Sagar https://www.kaggle.com/code/ssagar012/siim-covid-19-novice-notebook-eda-box-detection\n\n## Function to Display 25 Images\ndef show_25_images(images):\n    \"\"\"\n    Displays a plot of 25 images and their labes for training images\n    \"\"\"\n    \n    # setup the figure\n    plt.figure(figsize = (10,10))\n    \n    # loop through 25 files to display 25 images\n    for i in range(25):\n        # Create subplots ( 5 rows , 5 columns)\n        ax = plt.subplot(5,5,i+1)\n        # display an image\n        image = pydicom.dcmread(images[i])\n        plt.imshow(image.pixel_array,cmap = plt.cm.bone)\n        plt.axis(\"off\")","metadata":{"execution":{"iopub.status.busy":"2022-11-29T23:20:10.398617Z","iopub.execute_input":"2022-11-29T23:20:10.398959Z","iopub.status.idle":"2022-11-29T23:20:10.4063Z","shell.execute_reply.started":"2022-11-29T23:20:10.398934Z","shell.execute_reply":"2022-11-29T23:20:10.404892Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"show_25_images(X[20:])","metadata":{"execution":{"iopub.status.busy":"2022-11-29T23:20:20.378162Z","iopub.execute_input":"2022-11-29T23:20:20.378472Z","iopub.status.idle":"2022-11-29T23:20:47.266093Z","shell.execute_reply.started":"2022-11-29T23:20:20.378449Z","shell.execute_reply":"2022-11-29T23:20:47.264955Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"#Code by _lev_lipinski https://www.kaggle.com/code/leventelippenszky/rsna-eda-dicom-segmentations-bboxes-3d-plot","metadata":{}},{"cell_type":"code","source":"#Code by _lev_lipinski https://www.kaggle.com/code/leventelippenszky/rsna-eda-dicom-segmentations-bboxes-3d-plot\n\nimport glob\nimport pydicom\nimport nibabel as nib\nfrom pydicom.pixel_data_handlers.util import apply_voi_lut\nimport matplotlib.patches as patches","metadata":{"execution":{"iopub.status.busy":"2022-11-29T23:20:59.231316Z","iopub.execute_input":"2022-11-29T23:20:59.231635Z","iopub.status.idle":"2022-11-29T23:20:59.352986Z","shell.execute_reply.started":"2022-11-29T23:20:59.23161Z","shell.execute_reply":"2022-11-29T23:20:59.351122Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"#Code by _lev_lipinski https://www.kaggle.com/code/leventelippenszky/rsna-eda-dicom-segmentations-bboxes-3d-plot\n\nDATA_DIR = \"../input/rsna-breast-cancer-detection\"\nTRAIN_DIR = os.path.join(DATA_DIR, \"train_images\")\n#SEGM_DIR = os.path.join(DATA_DIR, \"segmentations\")\n\ntrain_df = pd.read_csv(os.path.join(DATA_DIR, \"train.csv\"))\nprint(train_df.shape)\ntrain_df.head()","metadata":{"execution":{"iopub.status.busy":"2022-11-29T23:22:49.792381Z","iopub.execute_input":"2022-11-29T23:22:49.792705Z","iopub.status.idle":"2022-11-29T23:22:49.853536Z","shell.execute_reply.started":"2022-11-29T23:22:49.792681Z","shell.execute_reply":"2022-11-29T23:22:49.85165Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"#Normal Breast Implants. What We Must Know to Avoid Misinterpretations\n\nTeaching Points\n\n\"Nowadays there are many different types of breast implants and some of them with particular landmarks that could lead to misinterpretations by unexperienced radiologists.The authors selected 10 types of implants from different manufacturers commonly used in plastic surgery.The purpose of this exhibit is: To demonstrate the most common types of breast implants, especially some specific landmarks and main anatomical features that could lead to misinterpretations; To demonstrate in detail the microscopic anatomical characteristics of breast implants shell; To correlate the findings of both in vitro and in vivo through different imaging modalities: mammography, ultrasound and MRI.\"\n\nhttps://archive.rsna.org/2015/MagneticResonanceImaging.pdf","metadata":{}},{"cell_type":"code","source":"#Code by _lev_lipinski https://www.kaggle.com/code/leventelippenszky/rsna-eda-dicom-segmentations-bboxes-3d-plot\n\nexample = \"../input/rsna-breast-cancer-detection/train_images/10706/763186195.dcm\"\nexample_ds = pydicom.dcmread(example)\nexample_ds","metadata":{"execution":{"iopub.status.busy":"2022-11-29T23:33:27.287955Z","iopub.execute_input":"2022-11-29T23:33:27.288323Z","iopub.status.idle":"2022-11-29T23:33:27.368386Z","shell.execute_reply.started":"2022-11-29T23:33:27.288287Z","shell.execute_reply":"2022-11-29T23:33:27.367669Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"#What is breast implant associated cancer?\n\n\"Breast implant associated cancer, which is also known as breast implant associated anaplastic large cell lymphoma (BIA-ALCL), is a rare cancer of the immune system. It is not breast cancer, which forms from cells in the breast, but instead a cancer that grows in the fluid and scar tissue that forms around a breast implant. Less commonly, BIA-ALCL can take the form of a lump in the breast or a lump in the armpit.\"\n\n\"BIA-ALCL has been known to occur as soon as one year after the operation and as late as 37 years after the operation. The average time to diagnosis is within 8 years of the operation.\"\n\nhttps://www.tga.gov.au/breast-implant-associated-cancer-bia-alcl-information-consumers","metadata":{}},{"cell_type":"code","source":"# source: https://www.kaggle.com/code/allunia/rsna-csf-cervical-spine-fracture-eda/notebook\ndef rescale_img_to_hu(dcm_ds):\n    \"\"\"Rescales the image to Hounsfield unit.\n    \"\"\"\n    return dcm_ds.pixel_array * dcm_ds.RescaleSlope + dcm_ds.RescaleIntercept","metadata":{"execution":{"iopub.status.busy":"2022-11-29T23:34:25.546003Z","iopub.execute_input":"2022-11-29T23:34:25.546346Z","iopub.status.idle":"2022-11-29T23:34:25.551594Z","shell.execute_reply.started":"2022-11-29T23:34:25.546322Z","shell.execute_reply":"2022-11-29T23:34:25.550663Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"#Who can get breast implant associated cancer?\n\n\"All reported cases of breast implant associated cancer in Australia involve patients who have had a textured implant at some point in their life. Based on current evidence, experts do not think breast implant associated cancer is related to either the contents (saline/silicone) or shape (round/teardrop) of the implant.\"\n\n\"Breast implant associated cancer is rare. The recent review by the TGA has found between one in 2,500 and one in 25,000 people with breast implants are diagnosed with the condition in Australia; based on confirmed cases of BIA-ALCL where only one brand of implant had been used. The risk of developing BIA-ALCL increases with increasing texturing of the implant. Implants which have a smooth surfaced have not been associated with BIA-ALCL. Breast implant associated cancer can occur after either reconstruction or augmentation surgery, with 95% of cases occurring between three and 14 years after the insertion of an implant.'\n\nhttps://www.tga.gov.au/breast-implant-associated-cancer-bia-alcl-information-consumers","metadata":{}},{"cell_type":"code","source":"#Code by _lev_lipinski https://www.kaggle.com/code/leventelippenszky/rsna-eda-dicom-segmentations-bboxes-3d-plot\n\n# original image\nfig, axs = plt.subplots(2, 2, figsize=(24, 12))\naxs[0, 0].imshow(example_ds.pixel_array, cmap=\"bone\")\naxs[0, 0].axis(\"off\")\nsns.histplot(example_ds.pixel_array.flatten(), ax=axs[0, 1])\n\n# rescaled image\nrescaled_img = rescale_img_to_hu(example_ds)\naxs[1, 0].imshow(rescaled_img, cmap=\"bone\")\naxs[1, 0].axis(\"off\")\nsns.histplot(rescaled_img.flatten(), ax=axs[1, 1]);","metadata":{"execution":{"iopub.status.busy":"2022-11-29T23:35:31.456926Z","iopub.execute_input":"2022-11-29T23:35:31.457247Z","iopub.status.idle":"2022-11-29T23:35:39.810765Z","shell.execute_reply.started":"2022-11-29T23:35:31.457224Z","shell.execute_reply":"2022-11-29T23:35:39.809195Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"#How is breast implant associated cancer diagnosed?\n\n\"If you develop swelling of an implanted breast your doctor will send you for an ultrasound scan to see if this is due to a fluid collection. If fluid is present it will be removed and sent to the laboratory for analysis. Most fluid collections are not due to BIA-ALCL, but the laboratory test will be able to tell for sure.\"\n\n\"If confirmed, your specialist may also order an MRI scan or CT scan to assess the extent of local growth or distant spread of the cancer. Other tests such as a PET scan may be also used to assess spread.\"\n\n\"A mammogram will check for breast cancer, but is not useful for detecting BIA-ALCL.\"\n\nhttps://www.tga.gov.au/breast-implant-associated-cancer-bia-alcl-information-consumers","metadata":{}},{"cell_type":"markdown","source":"#Since I don't have segmentations, bboxes and slices I'm not able to go further with those codes to make 3D or anything else.","metadata":{}},{"cell_type":"code","source":"!pip install PyPDF2","metadata":{"execution":{"iopub.status.busy":"2022-11-29T23:55:16.160957Z","iopub.execute_input":"2022-11-29T23:55:16.161276Z","iopub.status.idle":"2022-11-29T23:55:24.862333Z","shell.execute_reply.started":"2022-11-29T23:55:16.161253Z","shell.execute_reply":"2022-11-29T23:55:24.86144Z"},"_kg_hide-output":true,"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"#An Integrated Machine Learning Scheme for Predicting Mammographic Anomalies in High-Risk Individuals Using Questionnaire-Based Predictors\n\nCitation: Sun, C.-K.; Tang, Y.-X.; Liu, T.-C.; Lu, C.-J. An Integrated Machine Learning Scheme for Predicting Mammographic Anomalies in High-Risk Individuals Using Questionnaire-Based Predictors.\nInt. J. Environ. Res. Public Health 2022, 19, 9756. https://doi.org/10.3390/ ijerph19159756\n\n![](https://www.mdpi.com/ijerph/ijerph-19-09756/article_deploy/html/images/ijerph-19-09756-g002.png)https://www.mdpi.com/1660-4601/19/15/9756","metadata":{}},{"cell_type":"code","source":"# importing module to read PDF\nimport PyPDF2\n  \n# creating a pdf file object\npdfFileObj = open('../input/cusersmarildownloadsijerph1909756pdf/ijerph-19-09756.pdf', 'rb')","metadata":{"execution":{"iopub.status.busy":"2022-11-30T00:00:18.596361Z","iopub.execute_input":"2022-11-30T00:00:18.596772Z","iopub.status.idle":"2022-11-30T00:00:18.648036Z","shell.execute_reply.started":"2022-11-30T00:00:18.596726Z","shell.execute_reply":"2022-11-30T00:00:18.64595Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# creating a pdf reader object\npdfReader = PyPDF2.PdfFileReader(pdfFileObj)\n  \n# printing number of pages in pdf file\nprint(pdfReader.numPages)\n  \n# creating a page object\npageObj = pdfReader.getPage(7)","metadata":{"execution":{"iopub.status.busy":"2022-11-30T00:03:04.881989Z","iopub.execute_input":"2022-11-30T00:03:04.882353Z","iopub.status.idle":"2022-11-30T00:03:04.938595Z","shell.execute_reply.started":"2022-11-30T00:03:04.882328Z","shell.execute_reply":"2022-11-30T00:03:04.937791Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"#Predicting mammographic anomalies in high-risk individuals.","metadata":{}},{"cell_type":"code","source":"# extracting text from page\nprint(pageObj.extractText())\n  \n# closing the pdf file object\n#pdfFileObj.close()","metadata":{"execution":{"iopub.status.busy":"2022-11-30T00:03:22.33293Z","iopub.execute_input":"2022-11-30T00:03:22.333221Z","iopub.status.idle":"2022-11-30T00:03:22.364632Z","shell.execute_reply.started":"2022-11-30T00:03:22.333199Z","shell.execute_reply":"2022-11-30T00:03:22.363869Z"},"_kg_hide-input":true,"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# creating a page object\npageObj = pdfReader.getPage(8)\n\n# extracting text from page\nprint(pageObj.extractText())","metadata":{"execution":{"iopub.status.busy":"2022-11-30T00:04:46.860558Z","iopub.execute_input":"2022-11-30T00:04:46.860892Z","iopub.status.idle":"2022-11-30T00:04:46.892246Z","shell.execute_reply.started":"2022-11-30T00:04:46.860868Z","shell.execute_reply":"2022-11-30T00:04:46.89064Z"},"_kg_hide-input":true,"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# closing the pdf file object\npdfFileObj.close()","metadata":{"execution":{"iopub.status.busy":"2022-11-30T00:05:40.016078Z","iopub.execute_input":"2022-11-30T00:05:40.016419Z","iopub.status.idle":"2022-11-30T00:05:40.022103Z","shell.execute_reply.started":"2022-11-30T00:05:40.016395Z","shell.execute_reply":"2022-11-30T00:05:40.020418Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"#Factors associated with the risk of positive mammography screening for breast cancer using the proposed integrated ML scheme.\n\n\"By analyzing 18 factors possibly associated with the risk of positive mammography screening for breast cancer using the proposed integrated ML scheme, the authors identified: \"\n\nyounger age,\n\nbreast self-examination,\n\nolder age at first childbirth,\n\nnulliparity \n\n\"and history of mammography within the preceding 2 years as the top five significant variables for\npredicting positive mammography results.\"\n\n\"Their findings suggested a benefit for women with the identified risk factors for timely mammographic screening.\"\n\nhttps://pubmed.ncbi.nlm.nih.gov/35955112/","metadata":{}},{"cell_type":"markdown","source":"#Conclusion\n\nA good diagnosis and its prognosis is the result of analysing all the \"features\": history, examination (physical exam), hear the patient and the complimentary exams.(e.g. Mammogram, Breast Ultrasound,MRI...) ","metadata":{}},{"cell_type":"markdown","source":"Acknowledgements:\n\nSumeet Sagar https://www.kaggle.com/code/ssagar012/siim-covid-19-novice-notebook-eda-box-detection\n\n_lev_lipinski https://www.kaggle.com/code/leventelippenszky/rsna-eda-dicom-segmentations-bboxes-3d-plot\n\nLaura Fink https://www.kaggle.com/code/allunia/rsna-csf-cervical-spine-fracture-eda/notebook\n\nPyPDF2 https://pypi.org/project/PyPDF2/\n\nVijayendra D. https://www.kaggle.com/code/vijayendrad/kaggle-ds-survey-2022/notebook","metadata":{}}]}