{"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"name":"python","version":"3.12.12","mimetype":"text/x-python","codemirror_mode":{"name":"ipython","version":3},"pygments_lexer":"ipython3","nbconvert_exporter":"python","file_extension":".py"},"kaggle":{"accelerator":"nvidiaTeslaT4","dataSources":[{"sourceId":129601,"databundleVersionId":15542776,"sourceType":"competition"}],"dockerImageVersionId":31260,"isInternetEnabled":true,"language":"python","sourceType":"notebook","isGpuEnabled":true}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"code","source":"import os\n\nDATA_PATH = \"/kaggle/input\"\n\nfor folder in os.listdir(DATA_PATH):\n    print(\"📁\", folder)","metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","trusted":true,"execution":{"iopub.status.busy":"2026-02-03T19:27:54.166838Z","iopub.execute_input":"2026-02-03T19:27:54.167009Z","iopub.status.idle":"2026-02-03T19:27:54.174462Z","shell.execute_reply.started":"2026-02-03T19:27:54.16699Z","shell.execute_reply":"2026-02-03T19:27:54.173746Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"import os\n\nDATASET_PATH = \"/kaggle/input/instant-odc-ai-hackathon\"\n\nfor root, dirs, files in os.walk(DATASET_PATH):\n    print(\"📂\", root)\n    print(\"📄 Files:\", files[:10])  # أول 10 ملفات\n    print(\"------\")","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2026-02-03T19:28:20.63046Z","iopub.execute_input":"2026-02-03T19:28:20.63075Z","iopub.status.idle":"2026-02-03T19:28:34.919984Z","shell.execute_reply.started":"2026-02-03T19:28:20.630725Z","shell.execute_reply":"2026-02-03T19:28:34.919304Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"!pip install nibabel ipywidgets\n!pip install nibabel ipywidgets --quiet","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2026-02-03T19:54:56.586876Z","iopub.execute_input":"2026-02-03T19:54:56.587627Z","iopub.status.idle":"2026-02-03T19:55:02.75666Z","shell.execute_reply.started":"2026-02-03T19:54:56.5876Z","shell.execute_reply":"2026-02-03T19:55:02.755868Z"}},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"# 🧠 Structural Imaging Comparison: FLAIR, T1ce, T1, and T2 Sequences","metadata":{}},{"cell_type":"code","source":"import nibabel as nib\nimport matplotlib.pyplot as plt\n\ndef plot_modalities(patient_id):\n    base_path = f'/kaggle/input/instant-odc-ai-hackathon/test/{patient_id}/{patient_id}_'\n    \n    # تحميل الـ 4 أنواع\n    flair = nib.load(base_path + 'flair.nii').get_fdata()\n    t1ce  = nib.load(base_path + 't1ce.nii').get_fdata()\n    t1    = nib.load(base_path + 't1.nii').get_fdata()\n    t2    = nib.load(base_path + 't2.nii').get_fdata()\n    \n    # هنختار شريحة في النص (مثلاً 75)\n    slice_idx = 75 \n    \n    fig, axes = plt.subplots(1, 4, figsize=(20, 5))\n    modalities = [flair, t1ce, t1, t2]\n    titles = ['FLAIR (Edema)', 'T1ce (Core)', 'T1', 'T2']\n    \n    for i in range(4):\n        axes[i].imshow(modalities[i][:, :, slice_idx], cmap='gray')\n        axes[i].set_title(titles[i])\n        axes[i].axis('off')\n    \n    plt.tight_layout()\n    plt.show()\n\n# جرب على أول مريض عندك\nplot_modalities('BraTS2021_01358')","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2026-02-03T20:11:09.170243Z","iopub.execute_input":"2026-02-03T20:11:09.170543Z","iopub.status.idle":"2026-02-03T20:11:10.54646Z","shell.execute_reply.started":"2026-02-03T20:11:09.17052Z","shell.execute_reply":"2026-02-03T20:11:10.545688Z"}},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"# Multi-Parametric Diagnostic Overlay: Tumor vs. Edema Localization","metadata":{}},{"cell_type":"code","source":"import numpy as np\n\ndef plot_fancy_overlay(patient_id, slice_idx=75):    ### Image Fusion ###\n    path = f'/kaggle/input/instant-odc-ai-hackathon/test/{patient_id}/{patient_id}_'\n    flair = nib.load(path + 'flair.nii').get_fdata()[:,:,slice_idx]\n    t1ce = nib.load(path + 't1ce.nii').get_fdata()[:,:,slice_idx]\n\n    # Normalize images for better display\n    flair = (flair - flair.min()) / (flair.max() - flair.min())\n    t1ce = (t1ce - t1ce.min()) / (t1ce.max() - t1ce.min())\n\n    # Create an RGB image: Red channel = T1ce, Green = Flair\n    overlay = np.zeros((*flair.shape, 3))\n    overlay[..., 0] = t1ce # Red\n    overlay[..., 1] = flair # Green\n    \n    plt.figure(figsize=(5,5))\n    plt.imshow(overlay)\n    plt.title(f\"Diagnostic Overlay: {patient_id} (Red: T1ce Core | Green: FLAIR Edema)\")\n    plt.axis('off')\n    plt.show()\n\nplot_fancy_overlay('BraTS2021_01358')","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2026-02-03T20:11:42.884713Z","iopub.execute_input":"2026-02-03T20:11:42.885009Z","iopub.status.idle":"2026-02-03T20:11:43.034091Z","shell.execute_reply.started":"2026-02-03T20:11:42.884984Z","shell.execute_reply":"2026-02-03T20:11:43.033349Z"}},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"# 🎯 Automated Region of Interest (ROI) Localization & Dynamic Magnification","metadata":{}},{"cell_type":"code","source":"import scipy.ndimage as ndimage\n\ndef smart_tumor_visualizer_v2(patient_id, padding=20):   ### Attention Mechanism ###\n    base_path = f'/kaggle/input/instant-odc-ai-hackathon/test/{patient_id}/{patient_id}_'\n    flair = nib.load(base_path + 'flair.nii').get_fdata()\n    t1ce = nib.load(base_path + 't1ce.nii').get_fdata()\n\n    # 1. اختيار أذكى شريحة (Smart Slice)\n    smart_slice = np.argmax(np.sum(t1ce, axis=(0, 1)))\n    slice_data = t1ce[:, :, smart_slice]\n\n    # 2. تحديد مكان الورم بدقة (Thresholding + Connected Components)\n    # بنعمل ماسك للأجزاء المنورة جداً\n    mask = slice_data > np.percentile(slice_data, 98)\n    # بنشيل النقط الصغيرة المنعزلة ونخلي الكتل الكبيرة بس\n    mask = ndimage.binary_opening(mask, structure=np.ones((3,3)))\n    \n    if not np.any(mask): # لو مفيش حاجة منورة أوي\n        mask = slice_data > np.mean(slice_data)\n\n    coords = np.argwhere(mask)\n    y_min, x_min = coords.min(axis=0)\n    y_max, x_max = coords.max(axis=0)\n\n    # 3. حساب أبعاد الـ Bounding Box الديناميكي\n    # المربع هيفضل حول الورم بالظبط مع شوية padding\n    center_y, center_x = (y_min + y_max) // 2, (x_min + x_max) // 2\n    half_width = max((x_max - x_min) // 2, (y_max - y_min) // 2) + padding\n\n    # 4. الرسم الاحترافي\n    fig, axes = plt.subplots(1, 2, figsize=(16, 8), facecolor='black')\n    \n    # الصورة الأصلية مع المربع المظبوط\n    axes[0].imshow(flair[:, :, smart_slice], cmap='bone')\n    rect = plt.Rectangle((center_x - half_width, center_y - half_width), \n                         half_width*2, half_width*2, \n                         linewidth=2, edgecolor='#FF3333', facecolor='none')\n    axes[0].add_patch(rect)\n    axes[0].set_title(f'Precise Detection: Slice {smart_slice}', color='white', pad=20)\n\n    # صورة الزووم المظبوطة (Crop)\n    zoomed_area = t1ce[center_y-half_width:center_y+half_width, \n                       center_x-half_width:center_x+half_width, smart_slice]\n    \n    # لو الزووم طلع بره حدود الصورة بنعالج ده بـ np.pad أو عرض بسيط\n    axes[1].imshow(zoomed_area, cmap='hot')\n    axes[1].set_title('High-Resolution Tumor ROI', color='white', pad=20)\n\n    for ax in axes: ax.axis('off')\n    plt.tight_layout()\n    plt.show()\n\nsmart_tumor_visualizer_v2('BraTS2021_01358')","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2026-02-03T21:05:57.243364Z","iopub.execute_input":"2026-02-03T21:05:57.243675Z","iopub.status.idle":"2026-02-03T21:05:57.543316Z","shell.execute_reply.started":"2026-02-03T21:05:57.243651Z","shell.execute_reply":"2026-02-03T21:05:57.542579Z"}},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"# 🎬 Cinematic Fly-Through: Sequential Slice Exploration (Top-Down)","metadata":{}},{"cell_type":"code","source":"import imageio\nimport numpy as np\nimport nibabel as nib\nfrom IPython.display import Image, display\n\ndef create_top_down_gif(patient_id, modality='flair', duration=0.1):\n    # مسار الملف بناءً على النوع اللي تختاره (flair, t1ce, t1, t2)\n    file_path = f'/kaggle/input/instant-odc-ai-hackathon/test/{patient_id}/{patient_id}_{modality}.nii'\n    data = nib.load(file_path).get_fdata()\n    \n    frames = []\n    # هنمشي من آخر شريحة فوق لأول شريحة تحت (Top -> Down)\n    # بنعمل Step (-2) عشان الـ GIF حجمه ميبقاش ضخم ويبقى سريع\n    for i in range(data.shape[2]-1, 0, -2):\n        frame = data[:, :, i]\n        \n        # 1. Normalization: عشان الصورة متبقاش ضلمة\n        if np.max(frame) > 0:\n            frame = ((frame - np.min(frame)) / (np.max(frame) - np.min(frame)) * 255).astype(np.uint8)\n        else:\n            frame = np.zeros_like(frame).astype(np.uint8)\n        \n        # 2. Rotatation: أحياناً ملفات الـ NIfTI بتكون محتاجة لفة 90 درجة عشان تبان صح\n        frame = np.rot90(frame)\n        \n        frames.append(frame)\n    \n    # حفظ الـ GIF في فولدر العمل الحالي بكاجل\n    output_path = f'{patient_id}_{modality}_scan.gif'\n    imageio.mimsave(output_path, frames, duration=duration)\n    return output_path\n\n# تشغيل الكود وعرض النتيجة لـ FLAIR\n# الـ FLAIR هو اللي بيبين الـ Edema (المنطقة الواسعة المحيطة بالورم)\ngif_file = create_top_down_gif('BraTS2021_0135', modality='flair')\ndisplay(Image(filename=gif_file, width=400)) # صغرنا العرض هنا برضه عشان يبقى Compact","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2026-02-03T21:30:18.068094Z","iopub.execute_input":"2026-02-03T21:30:18.068689Z","iopub.status.idle":"2026-02-03T21:30:18.272738Z","shell.execute_reply.started":"2026-02-03T21:30:18.068659Z","shell.execute_reply":"2026-02-03T21:30:18.271952Z"}},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"# Tumor Point Cloud Analysis: Hyper-Intense Cluster Mapping","metadata":{}},{"cell_type":"code","source":"import plotly.graph_objects as go # السطر ده هو اللي كان ناقصك\nimport plotly.io as pio\nimport nibabel as nib\nimport numpy as np\n\n# الحل السحري لمشكلة الصفحة البيضاء في كاجل\npio.renderers.default = 'iframe_connected' \n\ndef plot_3d_brain_volume_final(patient_id, threshold_percentile=98.5):\n    path = f'/kaggle/input/instant-odc-ai-hackathon/test/{patient_id}/{patient_id}_t1ce.nii'\n    \n    # تحميل الداتا\n    data = nib.load(path).get_fdata()\n    \n    # تقليل الحجم للسرعة\n    data_small = data[::3, ::3, ::3]\n    threshold = np.percentile(data_small, threshold_percentile)\n    z, y, x = np.where(data_small > threshold)\n    values = data_small[data_small > threshold]\n\n    # بناء الشكل\n    fig = go.Figure(data=[go.Scatter3d(\n        x=x, y=y, z=z,\n        mode='markers',\n        marker=dict(size=2, color=values, colorscale='Hot', opacity=0.8)\n    )])\n\n    fig.update_layout(\n        scene=dict(xaxis_visible=False, yaxis_visible=False, zaxis_visible=False, bgcolor='black'),\n        paper_bgcolor='black',\n        margin=dict(l=0, r=0, b=0, t=0),\n        height=500\n    )\n    \n    # الرندر\n    fig.show(renderer=\"iframe\") \n\n# التشغيل\nplot_3d_brain_volume_final('BraTS2021_01358')","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2026-02-03T23:10:44.938004Z","iopub.execute_input":"2026-02-03T23:10:44.938927Z","iopub.status.idle":"2026-02-03T23:10:45.060221Z","shell.execute_reply.started":"2026-02-03T23:10:44.938884Z","shell.execute_reply":"2026-02-03T23:10:45.059448Z"}},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"# 🌐 Advanced 3D Interactive Volume Renfering & Clinical","metadata":{}},{"cell_type":"code","source":"import plotly.graph_objects as go\nimport numpy as np\nimport nibabel as nib\n\ndef plot_final_diagnostic_3d(patient_id):\n    # 1. تحميل الداتا (T1ce هو الأفضل للـ Core)\n    path = f'/kaggle/input/instant-odc-ai-hackathon/test/{patient_id}/{patient_id}_t1ce.nii'\n    raw_data = nib.load(path).get_fdata()\n    \n    # 2. Downsampling (عشان سرعة الرندر في كاجل)\n    ds = 4 \n    data = raw_data[::ds, ::ds, ::ds]\n    \n    # 3. إعداد الإحداثيات\n    X, Y, Z = np.mgrid[0:data.shape[0], 0:data.shape[1], 0:data.shape[2]]\n    \n    # 4. حساب القيم للـ Legend (Thresholds)\n    p90 = np.percentile(data, 90)\n    p99 = np.percentile(data, 99.5)\n\n    # 5. إنشاء المجسم 3D\n    fig = go.Figure(data=go.Volume(\n        x=X.flatten(), y=Y.flatten(), z=Z.flatten(),\n        value=data.flatten(),\n        isomin=p90,          # بنخفي نسيج المخ السليم تماماً\n        isomax=data.max(),\n        opacity=0.15,        # شفافية تورينا الطبقات الداخلية\n        surface_count=25,    # كثافة الطبقات\n        colorscale='Hot',\n        colorbar=dict(\n            title=\"Tumor Activity Scale\",\n            titleside=\"top\",\n            tickvals=[p90, (p90+p99)/2, p99],\n            ticktext=[\"Peripheral/Edema\", \"Infiltrating\", \"Active Core\"],\n            thickness=15,\n            len=0.5\n        ),\n    ))\n\n    # 6. إضافة شرح (Legend) في ركن الشاشة\n    fig.add_annotation(\n        dict(\n            x=0.02, y=0.95, showarrow=False,\n            text=\"<b>Color Legend:</b><br>⚪ White/Yellow: Active Core<br>🟠 Orange: Infiltrating Tumor<br>🔴 Red: Edema / Boundary\",\n            xref=\"paper\", yref=\"paper\",\n            align=\"left\", bgcolor=\"rgba(0,0,0,0.5)\", bordercolor=\"white\", borderpad=10,\n            font=dict(color=\"white\", size=12)\n        )\n    )\n\n    # 7. تظبيط الـ Layout (Black Theme)\n    fig.update_layout(\n        title=dict(\n            text=f\"INSTANT-ODC AI Hackathon: 3D Tumor Reconstruction<br>Patient: {patient_id}\",\n            x=0.5, font=dict(color=\"white\", size=18)\n        ),\n        scene=dict(\n            xaxis=dict(visible=False),\n            yaxis=dict(visible=False),\n            zaxis=dict(visible=False),\n            bgcolor='black'\n        ),\n        paper_bgcolor='black',\n        margin=dict(l=0, r=0, b=0, t=80),\n        height=700 # حجم كبير ومناسب للعرض\n    )\n    \n    fig.show()\n\n# تشغيل الـ Masterpiece\nplot_final_diagnostic_3d('BraTS2021_01358')","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2026-02-03T20:41:36.964183Z","iopub.execute_input":"2026-02-03T20:41:36.964503Z","iopub.status.idle":"2026-02-03T20:41:37.206838Z","shell.execute_reply.started":"2026-02-03T20:41:36.964475Z","shell.execute_reply":"2026-02-03T20:41:37.205853Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"import matplotlib.pyplot as plt\nimport nibabel as nib\nimport numpy as np\nimport os\n\ndef plot_intensity_histograms(patient_id):\n    modalities = ['flair', 't1ce', 't2']\n    # التأكد من وجود المجلد أولاً\n    base_dir = f'/kaggle/input/instant-odc-ai-hackathon/test/{patient_id}'\n    \n    if not os.path.exists(base_dir):\n        print(f\"❌ Error: Path not found for {patient_id}\")\n        return\n\n    plt.figure(figsize=(15, 4), facecolor='white')\n    \n    for i, mod in enumerate(modalities):\n        path = f'{base_dir}/{patient_id}_{mod}.nii'\n        \n        if os.path.exists(path):\n            data = nib.load(path).get_fdata()\n            # نأخذ القيم اللي أكبر من المتوسط عشان نركز على نسيج المخ ونلغي السواد تماماً\n            values = data[data > np.mean(data)].flatten()\n            \n            plt.subplot(1, 3, i+1)\n            plt.hist(values, bins=50, color='orange', edgecolor='black', alpha=0.7)\n            plt.title(f'{mod.upper()} Intensity Dist.')\n            plt.xlabel('Intensity Value')\n            plt.ylabel('Frequency')\n        else:\n            print(f\"⚠️ Warning: {mod} file missing for {patient_id}\")\n            \n    plt.tight_layout()\n    plt.show() # تأكد إن دي مكتوبة صح\n\n# جربه الآن\nplot_intensity_histograms('BraTS2021_01358')","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2026-02-03T20:44:23.477972Z","iopub.execute_input":"2026-02-03T20:44:23.478309Z","iopub.status.idle":"2026-02-03T20:44:24.244548Z","shell.execute_reply.started":"2026-02-03T20:44:23.478278Z","shell.execute_reply":"2026-02-03T20:44:24.243956Z"}},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"# 📊 Quantitative Bio-Marker Analysis: Volumetric Distribution & Statistics","metadata":{}},{"cell_type":"code","source":"import seaborn as sns\nimport matplotlib.pyplot as plt\n\ndef plot_final_distribution_dashboard(df):\n    \"\"\"\n    لوحة تحليل توزيع نسب الورم: Histogram + Boxplot\n    \"\"\"\n    if df is None or df.empty:\n        print(\"⚠️ DataFrame is empty. Please provide data.\")\n        return\n\n    # تحديد ستايل اللوحة\n    sns.set_theme(style=\"whitegrid\")\n    fig, (ax_box, ax_hist) = plt.subplots(2, sharex=True, \n                                          gridspec_kw={\"height_ratios\": (.15, .85)},\n                                          figsize=(12, 8))\n    \n    # ألوان احترافية متناسقة\n    palette = {\"Edema\": \"#00CC96\", \"Core\": \"#EF553B\", \"Enhancing\": \"#AB63FA\"}\n\n    # 1. رسم الـ Boxplot (في الجزء العلوي)\n    sns.boxplot(data=df, x=\"tumor_pct\", y=\"target\", palette=palette, ax=ax_box, hue=\"target\", legend=False)\n    ax_box.set(xlabel='', ylabel='')\n    ax_box.set_title(\"Statistical Distribution of Tumor Volumes\", fontsize=16, fontweight='bold', pad=20)\n\n    # 2. رسم الـ Histogram (في الجزء السفلي)\n    sns.histplot(data=df, x=\"tumor_pct\", hue=\"target\", palette=palette, \n                 kde=True, element=\"step\", alpha=0.4, ax=ax_hist)\n    \n    # تحسين المظهر الجمالي\n    ax_hist.set_xlabel(\"Tumor Percentage per Slice (%)\", fontsize=12)\n    ax_hist.set_ylabel(\"Frequency / Count\", fontsize=12)\n    sns.despine(ax=ax_hist)\n    sns.despine(ax=ax_box, left=True, bottom=True)\n\n    plt.tight_layout()\n    plt.show()\n\n# --- تجربة الكود ببيانات افتراضية ---\nimport pandas as pd\nimport numpy as np\n\ntest_data = pd.DataFrame({\n    'tumor_pct': np.concatenate([\n        np.random.lognormal(mean=0.5, sigma=0.5, size=500), # Core (غالباً أصغر)\n        np.random.lognormal(mean=1.5, sigma=0.6, size=500), # Edema (غالباً أكبر)\n        np.random.lognormal(mean=0.8, sigma=0.4, size=500)  # Enhancing\n    ]),\n    'target': ['Core']*500 + ['Edema']*500 + ['Enhancing']*500\n})\n\nplot_final_distribution_dashboard(test_data)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2026-02-03T23:03:34.896291Z","iopub.execute_input":"2026-02-03T23:03:34.896977Z","iopub.status.idle":"2026-02-03T23:03:36.10357Z","shell.execute_reply.started":"2026-02-03T23:03:34.896945Z","shell.execute_reply":"2026-02-03T23:03:36.103006Z"}},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"# 📏 Spatial Volumetric Profiling: Tumor Localization along the Z-Axis","metadata":{}},{"cell_type":"code","source":"import nibabel as nib\nimport numpy as np\nimport matplotlib.pyplot as plt\n\ndef plot_spatial_tumor_profile(patient_id):\n    path = f'/kaggle/input/instant-odc-ai-hackathon/test/{patient_id}/{patient_id}_t1ce.nii'\n    \n    # التأكد من تحميل المكتبة داخل أو قبل الفانكشن\n    data = nib.load(path).get_fdata()\n    \n    # حساب مجموع الإضاءة في كل شريحة\n    slice_intensities = np.sum(data, axis=(0, 1))\n    \n    plt.figure(figsize=(12, 4), facecolor='white')\n    plt.plot(slice_intensities, color='#EF553B', linewidth=2, label='Tumor Signal Area')\n    plt.fill_between(range(len(slice_intensities)), slice_intensities, color='#EF553B', alpha=0.2)\n    \n    plt.title(f\"Spatial Tumor Profile: {patient_id}\", fontsize=14, fontweight='bold')\n    plt.xlabel(\"Slice Number (Bottom to Top)\")\n    plt.ylabel(\"Voxel Intensity Sum\")\n    plt.grid(True, alpha=0.2)\n    plt.legend()\n    plt.show()\n\nplot_spatial_tumor_profile('BraTS2021_01358')","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2026-02-03T23:08:23.741627Z","iopub.execute_input":"2026-02-03T23:08:23.742173Z","iopub.status.idle":"2026-02-03T23:08:24.857779Z","shell.execute_reply.started":"2026-02-03T23:08:23.742145Z","shell.execute_reply":"2026-02-03T23:08:24.857083Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"import nibabel as nib\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport plotly.graph_objects as go\nimport plotly.express as px\nimport pandas as pd\nimport os","metadata":{"trusted":true},"outputs":[],"execution_count":null}]}