{"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"name":"python","version":"3.10.13","mimetype":"text/x-python","codemirror_mode":{"name":"ipython","version":3},"pygments_lexer":"ipython3","nbconvert_exporter":"python","file_extension":".py"},"kaggle":{"accelerator":"none","dataSources":[{"sourceId":37333,"databundleVersionId":3949526,"sourceType":"competition"},{"sourceId":7703860,"sourceType":"datasetVersion","datasetId":4468228}],"dockerImageVersionId":30646,"isInternetEnabled":true,"language":"python","sourceType":"notebook","isGpuEnabled":false}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"code","source":"!apt -y update && apt -y upgrade","metadata":{"_uuid":"5dbbca4e-8a76-4f50-a89f-9b3a080da72b","_cell_guid":"68b32583-77c9-4dca-88b2-2a63034eda14","_kg_hide-input":false,"_kg_hide-output":false,"execution":{"iopub.status.busy":"2024-02-26T12:28:16.877223Z","iopub.execute_input":"2024-02-26T12:28:16.877545Z","iopub.status.idle":"2024-02-26T12:33:02.162503Z","shell.execute_reply.started":"2024-02-26T12:28:16.87752Z","shell.execute_reply":"2024-02-26T12:33:02.161514Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"!apt -y install -d -o=dir::cache=/kaggle/working libvips libvips-dev libvips-tools","metadata":{"_uuid":"5c59a829-12b2-473b-9363-11a533a23cdb","_cell_guid":"ad69f1a1-32bd-4fe3-8584-4235075aa1bc","execution":{"iopub.status.busy":"2024-02-26T12:33:02.164153Z","iopub.execute_input":"2024-02-26T12:33:02.164488Z","iopub.status.idle":"2024-02-26T12:33:35.255392Z","shell.execute_reply.started":"2024-02-26T12:33:02.164461Z","shell.execute_reply":"2024-02-26T12:33:35.254523Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"!pip3 install --upgrade pip\n!pip3 download -d /kaggle/working pyvips","metadata":{"_uuid":"8f008194-acb2-44e1-ae15-55ea095ed8f6","_cell_guid":"af9232cc-9853-4e69-a653-8a8473a94319","execution":{"iopub.status.busy":"2024-02-26T12:33:35.256409Z","iopub.execute_input":"2024-02-26T12:33:35.256829Z","iopub.status.idle":"2024-02-26T12:34:05.422855Z","shell.execute_reply.started":"2024-02-26T12:33:35.256807Z","shell.execute_reply":"2024-02-26T12:34:05.422088Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"!pip install pyvips","metadata":{"execution":{"iopub.status.busy":"2024-02-26T12:34:05.424663Z","iopub.execute_input":"2024-02-26T12:34:05.425571Z","iopub.status.idle":"2024-02-26T12:34:19.762525Z","shell.execute_reply.started":"2024-02-26T12:34:05.425541Z","shell.execute_reply":"2024-02-26T12:34:19.761468Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"!dpkg -i --force-depends ./archives/*.deb >/dev/null 2>&1\n# !pip3 install --quiet ./pycparser-2.21-py2.py3-none-any.whl\n# !pip3 install --quiet ./pyvips-2.2.1.tar.gz","metadata":{"execution":{"iopub.status.busy":"2024-02-26T12:34:19.76455Z","iopub.execute_input":"2024-02-26T12:34:19.764916Z","iopub.status.idle":"2024-02-26T12:35:00.849863Z","shell.execute_reply.started":"2024-02-26T12:34:19.764886Z","shell.execute_reply":"2024-02-26T12:35:00.848821Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"!pip install /kaggle/working/cffi-1.16.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl\n!pip install /kaggle/working/pyvips-2.2.2.tar.gz\n!pip install /kaggle/working/pycparser-2.21-py2.py3-none-any.whl","metadata":{"execution":{"iopub.status.busy":"2024-02-26T12:35:00.850956Z","iopub.execute_input":"2024-02-26T12:35:00.851212Z","iopub.status.idle":"2024-02-26T12:35:35.215005Z","shell.execute_reply.started":"2024-02-26T12:35:00.851186Z","shell.execute_reply":"2024-02-26T12:35:35.210576Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"import pyvips\nimport os\nimport cv2\nimport sys\nfrom PIL import Image\nimport numpy as np\nimport pandas as pd\nimport tensorflow as tf\nimport zipfile\nfrom IPython.display import FileLink\nfrom pathlib import Path\nimport matplotlib.pyplot as plt\nimport tensorflow.keras.layers as l\nimport albumentations as A\nfrom sklearn.model_selection import train_test_split\nfrom tensorflow.keras.preprocessing.image import ImageDataGenerator","metadata":{"_uuid":"b0f1850d-6943-46e9-b9a4-62bb8798ffd2","_cell_guid":"32d83000-de5f-48ac-8ce9-b77203d05498","collapsed":false,"jupyter":{"outputs_hidden":false},"execution":{"iopub.status.busy":"2024-02-26T12:35:35.220671Z","iopub.execute_input":"2024-02-26T12:35:35.221517Z","iopub.status.idle":"2024-02-26T12:35:51.175979Z","shell.execute_reply.started":"2024-02-26T12:35:35.221403Z","shell.execute_reply":"2024-02-26T12:35:51.175019Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"def read_and_resize_image(image_path):\n    # check if image is less than limit\n    if os.path.getsize(image_path) < 178956970:\n        scale_factor = 1.0\n    \n    else:\n        # Calculate the scale factor needed to achieve the target size\n        scale_factor = np.sqrt(178956970 / os.path.getsize(image_path))\n    \n    img = pyvips.Image.new_from_file(image_path, access='sequential')\n    resized_img = img.resize(1.0 / scale_factor)\n    \n    return resized_img","metadata":{"_uuid":"32663662-4baf-4949-bf17-f123ef295662","_cell_guid":"342b74a6-1265-4be8-a15b-86319f9ee70f","collapsed":false,"jupyter":{"outputs_hidden":false},"execution":{"iopub.status.busy":"2024-02-26T12:35:51.177228Z","iopub.execute_input":"2024-02-26T12:35:51.178854Z","iopub.status.idle":"2024-02-26T12:35:51.184739Z","shell.execute_reply.started":"2024-02-26T12:35:51.178819Z","shell.execute_reply":"2024-02-26T12:35:51.183965Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"def divide_tiff_into_tiles(input_path, tile_size):\n    img = read_and_resize_image(input_path)\n\n    # Get the size of the input image\n    img_width = img.width\n    img_height = img.height\n\n    # Calculate the number of tiles in the x and y directions\n    num_tiles_x = img_width // tile_size[0]\n    num_tiles_y = img_height // tile_size[1]\n\n    # Initialize an empty list to store the tiles\n    tiles = []\n\n    # Iterate over each tile and append it to the list\n    for y in range(num_tiles_y):\n        for x in range(num_tiles_x):\n            # Define the region for the current tile\n            left = x * tile_size[0]\n            upper = y * tile_size[1]\n            width = tile_size[0]\n            height = tile_size[1]\n\n            # Crop the image to the current tile\n            tile = img.crop(left, upper, width, height)\n\n            # Remove tiles with average intensity less than threshold\n            if tile.avg() < 185:\n                # Append the tile to the list\n                tiles.append(tile)\n\n    return tiles","metadata":{"_uuid":"7199eb12-f086-4d7e-b19e-bf32c9e1c2d9","_cell_guid":"d2e7b6fa-de5b-4038-8ee8-b261db354cda","collapsed":false,"jupyter":{"outputs_hidden":false},"execution":{"iopub.status.busy":"2024-02-26T12:35:51.185987Z","iopub.execute_input":"2024-02-26T12:35:51.186669Z","iopub.status.idle":"2024-02-26T12:35:51.199027Z","shell.execute_reply.started":"2024-02-26T12:35:51.186638Z","shell.execute_reply":"2024-02-26T12:35:51.197879Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"def parse_images(folder):\n    # get the full paths of the images\n    imgs = [os.path.join(folder, f) for f in os.listdir(folder)]\n\n    df = pd.DataFrame()\n    df['image_path'] = imgs\n    # remove extension, and have the id as first and last component, eg: 006388_0\n    df['image_id'] = df['image_path'].apply(lambda x: '_'.join(x.split('/')[-1].replace('.jpg', '').split('_')[:2]))\n    # remove extension, and have the instance_id as last component only, eg: 0, 1, ...\n    df['instance_id'] = df['image_path'].apply(lambda x: int(x.split('_')[-1].replace('.jpg', '')))\n\n    df = df.sort_values(['image_id', 'instance_id']).reset_index(drop=True)\n\n    return df\n\ndef merge_image_info(image_df, info_df):\n    return image_df.merge(info_df, on='image_id', how='left').reset_index(drop=True)","metadata":{"execution":{"iopub.status.busy":"2024-02-26T12:35:51.202702Z","iopub.execute_input":"2024-02-26T12:35:51.203002Z","iopub.status.idle":"2024-02-26T12:35:51.214887Z","shell.execute_reply.started":"2024-02-26T12:35:51.20298Z","shell.execute_reply":"2024-02-26T12:35:51.214045Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df_other = pd.read_csv(\"/kaggle/input/mayo-clinic-strip-ai/other.csv\")","metadata":{"execution":{"iopub.status.busy":"2024-02-26T12:35:51.216404Z","iopub.execute_input":"2024-02-26T12:35:51.217297Z","iopub.status.idle":"2024-02-26T12:35:51.248247Z","shell.execute_reply.started":"2024-02-26T12:35:51.217254Z","shell.execute_reply":"2024-02-26T12:35:51.247497Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train_csv = pd.read_csv('/kaggle/input/mayo-clinic-strip-ai/train.csv')\n# train_csv[\"label\"] = train_csv[\"label\"].map({'CE': 0, 'LAA': 1})","metadata":{"execution":{"iopub.status.busy":"2024-02-26T12:35:51.25021Z","iopub.execute_input":"2024-02-26T12:35:51.250692Z","iopub.status.idle":"2024-02-26T12:35:51.263675Z","shell.execute_reply.started":"2024-02-26T12:35:51.250653Z","shell.execute_reply":"2024-02-26T12:35:51.262566Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# train_csv","metadata":{"execution":{"iopub.status.busy":"2024-02-26T12:35:51.264909Z","iopub.execute_input":"2024-02-26T12:35:51.265723Z","iopub.status.idle":"2024-02-26T12:35:51.269924Z","shell.execute_reply.started":"2024-02-26T12:35:51.26569Z","shell.execute_reply":"2024-02-26T12:35:51.268915Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# lookup_dic = {}\n# for i in range(len(train_csv)):\n#     lookup_dic[train_csv[\"image_id\"].iloc[i]] = train_csv[\"label\"].iloc[i]","metadata":{"execution":{"iopub.status.busy":"2024-02-26T12:35:51.270953Z","iopub.execute_input":"2024-02-26T12:35:51.271207Z","iopub.status.idle":"2024-02-26T12:35:51.280824Z","shell.execute_reply.started":"2024-02-26T12:35:51.271186Z","shell.execute_reply":"2024-02-26T12:35:51.280014Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df = merge_image_info(parse_images('/kaggle/input/6809-mayo-tiles/test'), train_csv)","metadata":{"execution":{"iopub.status.busy":"2024-02-26T12:35:51.281821Z","iopub.execute_input":"2024-02-26T12:35:51.282493Z","iopub.status.idle":"2024-02-26T12:35:51.796528Z","shell.execute_reply.started":"2024-02-26T12:35:51.282464Z","shell.execute_reply":"2024-02-26T12:35:51.795528Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"len(df)","metadata":{"execution":{"iopub.status.busy":"2024-02-26T12:35:51.797855Z","iopub.execute_input":"2024-02-26T12:35:51.798091Z","iopub.status.idle":"2024-02-26T12:35:51.803744Z","shell.execute_reply.started":"2024-02-26T12:35:51.79807Z","shell.execute_reply":"2024-02-26T12:35:51.802722Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df = df[~df['image_id'].isin(df_other['image_id'])]","metadata":{"execution":{"iopub.status.busy":"2024-02-24T20:59:56.405762Z","iopub.execute_input":"2024-02-24T20:59:56.406559Z","iopub.status.idle":"2024-02-24T20:59:56.417956Z","shell.execute_reply.started":"2024-02-24T20:59:56.406491Z","shell.execute_reply":"2024-02-24T20:59:56.416774Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"","metadata":{},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df[\"label\"] = df[\"label\"].map({'CE': 0, 'LAA': 1})\ndf.tail(16)","metadata":{"execution":{"iopub.status.busy":"2024-02-24T20:59:58.719398Z","iopub.execute_input":"2024-02-24T20:59:58.719806Z","iopub.status.idle":"2024-02-24T20:59:58.743291Z","shell.execute_reply.started":"2024-02-24T20:59:58.719778Z","shell.execute_reply":"2024-02-24T20:59:58.741993Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"len(df)","metadata":{"execution":{"iopub.status.busy":"2024-02-24T20:54:41.122873Z","iopub.execute_input":"2024-02-24T20:54:41.123347Z","iopub.status.idle":"2024-02-24T20:54:41.13056Z","shell.execute_reply.started":"2024-02-24T20:54:41.123312Z","shell.execute_reply":"2024-02-24T20:54:41.129517Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# len(RBC_ratios),len(labels),len(names), len(RBC_ratios), len(labels), len(names)","metadata":{"execution":{"iopub.status.busy":"2024-02-24T20:55:06.404663Z","iopub.execute_input":"2024-02-24T20:55:06.405067Z","iopub.status.idle":"2024-02-24T20:55:06.409705Z","shell.execute_reply.started":"2024-02-24T20:55:06.405037Z","shell.execute_reply":"2024-02-24T20:55:06.408697Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# data = {'Name': names, 'RBC_Ratio': RBC_ratios, 'Label': labels}\n# df = pd.DataFrame(data)\n# print(df)","metadata":{"execution":{"iopub.status.busy":"2024-02-24T20:55:06.638545Z","iopub.execute_input":"2024-02-24T20:55:06.638936Z","iopub.status.idle":"2024-02-24T20:55:06.643482Z","shell.execute_reply.started":"2024-02-24T20:55:06.638893Z","shell.execute_reply":"2024-02-24T20:55:06.642304Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# import pandas as pd\n# from IPython.display import FileLink\n\n# # Assuming df is your Pandas DataFrame\n\n# # Save the DataFrame to a CSV file\n# df.to_csv('/kaggle/working/my_dataframe2_100_120.csv', index=False)\n","metadata":{"execution":{"iopub.status.busy":"2024-02-24T20:55:06.817786Z","iopub.execute_input":"2024-02-24T20:55:06.818187Z","iopub.status.idle":"2024-02-24T20:55:06.823538Z","shell.execute_reply.started":"2024-02-24T20:55:06.818159Z","shell.execute_reply":"2024-02-24T20:55:06.822436Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# The End","metadata":{}},{"cell_type":"code","source":"# len(tiles)","metadata":{"execution":{"iopub.status.busy":"2024-02-24T20:55:07.214595Z","iopub.execute_input":"2024-02-24T20:55:07.214995Z","iopub.status.idle":"2024-02-24T20:55:07.219936Z","shell.execute_reply.started":"2024-02-24T20:55:07.214967Z","shell.execute_reply":"2024-02-24T20:55:07.218778Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"!pip install pillow","metadata":{"execution":{"iopub.status.busy":"2024-02-24T20:55:07.404129Z","iopub.execute_input":"2024-02-24T20:55:07.40448Z","iopub.status.idle":"2024-02-24T20:55:21.318479Z","shell.execute_reply.started":"2024-02-24T20:55:07.404456Z","shell.execute_reply":"2024-02-24T20:55:21.316822Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"!pip install pyradiomics","metadata":{"execution":{"iopub.status.busy":"2024-02-24T20:55:21.321456Z","iopub.execute_input":"2024-02-24T20:55:21.32184Z","iopub.status.idle":"2024-02-24T20:56:21.051397Z","shell.execute_reply.started":"2024-02-24T20:55:21.321807Z","shell.execute_reply":"2024-02-24T20:56:21.050214Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# np.unique(other_colors_mask)","metadata":{"execution":{"iopub.status.busy":"2024-02-24T20:56:21.053096Z","iopub.execute_input":"2024-02-24T20:56:21.053484Z","iopub.status.idle":"2024-02-24T20:56:21.058415Z","shell.execute_reply.started":"2024-02-24T20:56:21.053445Z","shell.execute_reply":"2024-02-24T20:56:21.057757Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"import cv2\nimport numpy as np\nimport SimpleITK as sitk\nfrom radiomics import featureextractor\nimport csv\nfrom radiomics import imageoperations\nimport numpy as np\nimport SimpleITK as sitk\nimport pandas as pd\nimport os","metadata":{"execution":{"iopub.status.busy":"2024-02-24T20:56:21.060321Z","iopub.execute_input":"2024-02-24T20:56:21.060578Z","iopub.status.idle":"2024-02-24T20:56:21.616964Z","shell.execute_reply.started":"2024-02-24T20:56:21.060556Z","shell.execute_reply":"2024-02-24T20:56:21.615972Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df","metadata":{"execution":{"iopub.status.busy":"2024-02-24T20:56:21.618376Z","iopub.execute_input":"2024-02-24T20:56:21.61988Z","iopub.status.idle":"2024-02-24T20:56:21.642799Z","shell.execute_reply.started":"2024-02-24T20:56:21.619837Z","shell.execute_reply":"2024-02-24T20:56:21.641896Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df[\"label\"][0]","metadata":{"execution":{"iopub.status.busy":"2024-02-24T21:00:23.636584Z","iopub.execute_input":"2024-02-24T21:00:23.637044Z","iopub.status.idle":"2024-02-24T21:00:23.645656Z","shell.execute_reply.started":"2024-02-24T21:00:23.637012Z","shell.execute_reply":"2024-02-24T21:00:23.64449Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"import os\nimport cv2\nimport pandas as pd\nimport SimpleITK as sitk\nfrom radiomics import featureextractor\nimport numpy as np\n\n# Initialize PyRadiomics feature extractor\nextractor = featureextractor.RadiomicsFeatureExtractor()\n\n# Define your lower and upper threshold values for yellow and brown\nlower_yellow = np.array([20, 100, 100])\nupper_yellow = np.array([30, 255, 255])\nlower_brown = np.array([10, 100, 20])\nupper_brown = np.array([20, 255, 200])\n\nlower_blue = np.array([90, 50, 50])\nlower_purple = np.array([120, 50, 50])\nupper_purple = np.array([150, 255, 255])\n\n# Define lower and upper threshold values for white in HSV\nlower_white = np.array([0, 0, 200])\nupper_white = np.array([179, 30, 255])\n\n# Initialize list to store PyRadiomics data for all tiles of all images\npyradiomics_data = []\n\nfor i in range(len(df)):  \n    tile = cv2.imread(df[\"image_path\"][i])\n\n    label = df[\"label\"][i]\n    print(label)\n\n    stained_image = np.array(tile)\n    hsv_image = cv2.cvtColor(stained_image, cv2.COLOR_RGB2HSV)\n\n    # RBC\n    yellow_mask = cv2.inRange(hsv_image, lower_yellow, upper_yellow)\n    brown_mask = cv2.inRange(hsv_image, lower_brown, upper_brown)\n    yellow_brown_mask = cv2.bitwise_or(yellow_mask, brown_mask)\n    rbc_mask = yellow_brown_mask.copy()\n    rbc_mask[rbc_mask > 0] = 1\n\n    # WBC\n    blue_mask = cv2.inRange(hsv_image, lower_blue, upper_purple)\n    purple_mask = cv2.inRange(hsv_image, lower_purple, upper_purple)\n    blue_purple_mask = cv2.bitwise_or(blue_mask, purple_mask)\n    wbc_mask = blue_purple_mask.copy()\n    wbc_mask[wbc_mask > 0] = 1\n\n    # Fibrin/Platelets\n    white_mask = cv2.inRange(hsv_image, lower_white, upper_white)\n    fibrin_platelets_mask = cv2.bitwise_and(cv2.bitwise_not(rbc_mask), cv2.bitwise_not(wbc_mask))\n    fibrin_platelets_mask = cv2.bitwise_and(fibrin_platelets_mask, cv2.bitwise_not(white_mask))\n    fibrin_platelets_mask[fibrin_platelets_mask > 0] = 1  # Ensure all non-zero values are set to 1\n\n    try:\n        # Read original image\n        original_image_sitk = sitk.GetImageFromArray(cv2.cvtColor(stained_image, cv2.COLOR_RGB2GRAY))\n\n        # Convert mask images to SimpleITK format\n        maskRBC_image_sitk = sitk.GetImageFromArray(rbc_mask)\n        maskWBC_image_sitk = sitk.GetImageFromArray(wbc_mask)\n        maskFP_image_sitk = sitk.GetImageFromArray(fibrin_platelets_mask)\n\n        # Extract features using PyRadiomics\n        featuresRBC = extractor.execute(original_image_sitk, maskRBC_image_sitk)\n        featuresWBC = extractor.execute(original_image_sitk, maskWBC_image_sitk)\n        featuresFP = extractor.execute(original_image_sitk, maskFP_image_sitk)\n\n        # Append data to list\n        pyradiomics_data.append({\n            'Image_ID': f\"{df['image_id'][i]}_{df['instance_id'][i]}\",\n            'Label': label,\n            **{f\"RBC_{k}\": v for k, v in featuresRBC.items()},\n            **{f\"WBC_{k}\": v for k, v in featuresWBC.items()},\n            **{f\"FP_{k}\": v for k, v in featuresFP.items()}\n        })\n    except Exception as e:\n        print(f\"{i})Error extracting features for tile {df['instance_id'][i]} of image {df['image_id'][i]}: {e}\")\n        continue\n\n# Convert list of dictionaries to DataFrame\npyradiomics_df = pd.DataFrame(pyradiomics_data)\n\n# Save DataFrame to CSV file\npyradiomics_df.to_csv(\"/kaggle/working/pyradiomics_features.csv\", index=False)\n\nprint(\"All PyRadiomics features saved successfully.\")","metadata":{"execution":{"iopub.status.busy":"2024-02-24T21:00:23.888009Z","iopub.execute_input":"2024-02-24T21:00:23.88918Z","iopub.status.idle":"2024-02-24T21:00:37.401744Z","shell.execute_reply.started":"2024-02-24T21:00:23.889144Z","shell.execute_reply":"2024-02-24T21:00:37.400643Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"pyradiomics_df","metadata":{"execution":{"iopub.status.busy":"2024-02-24T21:00:37.403425Z","iopub.execute_input":"2024-02-24T21:00:37.403733Z","iopub.status.idle":"2024-02-24T21:00:37.426954Z","shell.execute_reply.started":"2024-02-24T21:00:37.40371Z","shell.execute_reply":"2024-02-24T21:00:37.426169Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"","metadata":{},"execution_count":null,"outputs":[]}]}