{ "cells": [ { "cell_type": "markdown", "id": "2e3ef9ca-39d2-4c2b-b742-6d287698ccb9", "metadata": {}, "source": [ "# Statistics using Scikit-image" ] }, { "cell_type": "markdown", "id": "72e582f6-d043-46f9-84c7-043817d71c58", "metadata": {}, "source": [ "We can use scikit-image for extracting features from label images. For convenience reasons we use the [napari-skimage-regionprops](https://github.com/haesleinhuepf/napari-skimage-regionprops) library. " ] }, { "cell_type": "markdown", "id": "1c6ba347-663f-42f8-b42a-e7b03a4e5de6", "metadata": {}, "source": [ "Before we can do measurements, we need an `image` and a corresponding `label_image`. Therefore, we recapitulate filtering, thresholding and labeling:" ] }, { "cell_type": "code", "execution_count": 1, "id": "9c73c156-0d06-4321-98d6-e1c49fafb596", "metadata": { "tags": [] }, "outputs": [], "source": [ "from skimage.io import imread\n", "from skimage import filters\n", "from skimage import measure\n", "from napari_skimage_regionprops import regionprops_table\n", "import pandas as pd \n", "import numpy as np\n", "import stackview" ] }, { "cell_type": "code", "execution_count": 2, "id": "ccede3f1-4f7e-4b41-b22e-1185b6633c47", "metadata": { "tags": [] }, "outputs": [ { "data": { "text/html": [ "\n", "\n", "\n", "\n", "\n", "
\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "
shape(254, 256)
dtypeuint8
size63.5 kB
min8
max248
\n", "\n", "
" ], "text/plain": [ "StackViewNDArray([[ 40, 32, 24, ..., 216, 200, 200],\n", " [ 56, 40, 24, ..., 232, 216, 216],\n", " [ 64, 48, 24, ..., 240, 232, 232],\n", " ...,\n", " [ 72, 80, 80, ..., 48, 48, 48],\n", " [ 80, 80, 80, ..., 48, 48, 48],\n", " [ 96, 88, 80, ..., 48, 48, 48]], dtype=uint8)" ] }, "execution_count": 2, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# load image\n", "image = imread(\"data/blobs.tif\")\n", "\n", "stackview.insight(image)" ] }, { "cell_type": "code", "execution_count": 3, "id": "2de0ee95-1bc5-46fb-9e66-8b59efa7549e", "metadata": { "tags": [] }, "outputs": [ { "data": { "text/html": [ "\n", "\n", "\n", "\n", "\n", "
\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "
shape(254, 256)
dtypeint32
size254.0 kB
min0
max62
\n", "\n", "
" ], "text/plain": [ "StackViewNDArray([[0, 0, 0, ..., 5, 5, 5],\n", " [0, 0, 0, ..., 5, 5, 5],\n", " [0, 0, 0, ..., 5, 5, 5],\n", " ...,\n", " [0, 0, 0, ..., 0, 0, 0],\n", " [0, 0, 0, ..., 0, 0, 0],\n", " [0, 0, 0, ..., 0, 0, 0]])" ] }, "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# denoising\n", "blurred_image = filters.gaussian(image, sigma=1)\n", "\n", "# binarization\n", "threshold = filters.threshold_otsu(blurred_image)\n", "thresholded_image = blurred_image >= threshold\n", "\n", "# labeling\n", "label_image = measure.label(thresholded_image)\n", "\n", "# visualization\n", "stackview.insight(label_image)" ] }, { "cell_type": "markdown", "id": "6854864d-4a5b-4360-ac2a-6372c4a3e985", "metadata": {}, "source": [ "## Measurements / region properties" ] }, { "cell_type": "markdown", "id": "2a635e37-dc47-4db8-bced-1548818da3f6", "metadata": {}, "source": [ "We are now using the very handy function `regionprops_table`. It provides features based on the scikit-image [regionprops list of measurements](https://scikit-image.org/docs/dev/api/skimage.measure.html#skimage.measure.regionprops) library. Let us check first what we need to provide for this function:" ] }, { "cell_type": "code", "execution_count": 4, "id": "60132254-3109-4d4c-9b40-fa4548ee9b8f", "metadata": { "tags": [] }, "outputs": [ { "data": { "text/plain": [ "\u001b[1;31mSignature:\u001b[0m\n", "\u001b[0mregionprops_table\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m\n", "\u001b[0m \u001b[0mimage\u001b[0m\u001b[1;33m:\u001b[0m \u001b[1;34m'napari.types.ImageData'\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\n", "\u001b[0m \u001b[0mlabels\u001b[0m\u001b[1;33m:\u001b[0m \u001b[1;34m'napari.types.LabelsData'\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\n", "\u001b[0m \u001b[0msize\u001b[0m\u001b[1;33m:\u001b[0m \u001b[0mbool\u001b[0m \u001b[1;33m=\u001b[0m \u001b[1;32mTrue\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\n", "\u001b[0m \u001b[0mintensity\u001b[0m\u001b[1;33m:\u001b[0m \u001b[0mbool\u001b[0m \u001b[1;33m=\u001b[0m \u001b[1;32mTrue\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\n", "\u001b[0m \u001b[0mperimeter\u001b[0m\u001b[1;33m:\u001b[0m \u001b[0mbool\u001b[0m \u001b[1;33m=\u001b[0m \u001b[1;32mFalse\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\n", "\u001b[0m \u001b[0mshape\u001b[0m\u001b[1;33m:\u001b[0m \u001b[0mbool\u001b[0m \u001b[1;33m=\u001b[0m \u001b[1;32mFalse\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\n", "\u001b[0m \u001b[0mposition\u001b[0m\u001b[1;33m:\u001b[0m \u001b[0mbool\u001b[0m \u001b[1;33m=\u001b[0m \u001b[1;32mFalse\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\n", "\u001b[0m \u001b[0mmoments\u001b[0m\u001b[1;33m:\u001b[0m \u001b[0mbool\u001b[0m \u001b[1;33m=\u001b[0m \u001b[1;32mFalse\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\n", "\u001b[0m \u001b[0mnapari_viewer\u001b[0m\u001b[1;33m:\u001b[0m \u001b[1;34m'napari.Viewer'\u001b[0m \u001b[1;33m=\u001b[0m \u001b[1;32mNone\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\n", "\u001b[0m\u001b[1;33m)\u001b[0m \u001b[1;33m->\u001b[0m \u001b[1;34m'pandas.DataFrame'\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n", "\u001b[1;31mDocstring:\u001b[0m Adds a table widget to a given napari viewer with quantitative analysis results derived from an image-label pair.\n", "\u001b[1;31mFile:\u001b[0m c:\\users\\haase\\mambaforge\\envs\\tea2024\\lib\\site-packages\\napari_skimage_regionprops\\_regionprops.py\n", "\u001b[1;31mType:\u001b[0m function" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "regionprops_table?" ] }, { "cell_type": "code", "execution_count": 5, "id": "8d70c8cf-a622-4c78-ac13-85851dead81b", "metadata": { "tags": [] }, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
labelareabbox_areaequivalent_diameterconvex_areamax_intensitymean_intensitymin_intensityperimeterperimeter_crofton...bbox-0bbox-1bbox-2bbox-3weighted_centroid-0weighted_centroid-1standard_deviation_intensityaspect_ratioroundnesscircularity
01429.0750.023.371345479.0232.0191.440559128.089.01219387.070368...010303513.13072319.98753229.7931382.0882490.4515720.680406
12183.0231.015.264430190.0224.0179.846995128.053.55634953.456120...05311744.15605363.17890121.2705341.7821680.5308490.801750
23658.0756.028.944630673.0248.0205.604863120.095.69848593.409370...0952812212.485897108.43031229.3922551.0677340.9186830.902871
34433.0529.023.480049445.0248.0217.515012120.077.45584476.114262...0144231679.630850154.40873235.8523451.0619420.9178130.906963
45472.0551.024.514670486.0248.0213.033898128.083.79899082.127941...02372925613.051158247.17073828.7410801.5794150.6219520.844645
..................................................................
5758213.0285.016.468152221.0224.0184.525822120.052.28427152.250114...2323925154240.56320046.03460228.2554671.2961430.7710940.979146
585979.0108.010.02925384.0248.0184.810127128.039.31370839.953250...248170254188251.276164178.37315133.7399123.1735400.3007660.642316
596088.0110.010.58513592.0216.0182.727273128.045.69238846.196967...249117254139251.403483127.71741324.4171734.0211930.2385210.529669
606152.075.08.13685856.0248.0189.538462128.030.69238832.924135...249227254242251.671266234.20292237.8674112.8398250.3221900.693668
616248.068.07.81764053.0224.0173.833333128.033.07106835.375614...2506625483252.03835173.57047027.9875964.4172970.2133340.551512
\n", "

62 rows × 31 columns

\n", "
" ], "text/plain": [ " label area bbox_area equivalent_diameter convex_area max_intensity \\\n", "0 1 429.0 750.0 23.371345 479.0 232.0 \n", "1 2 183.0 231.0 15.264430 190.0 224.0 \n", "2 3 658.0 756.0 28.944630 673.0 248.0 \n", "3 4 433.0 529.0 23.480049 445.0 248.0 \n", "4 5 472.0 551.0 24.514670 486.0 248.0 \n", ".. ... ... ... ... ... ... \n", "57 58 213.0 285.0 16.468152 221.0 224.0 \n", "58 59 79.0 108.0 10.029253 84.0 248.0 \n", "59 60 88.0 110.0 10.585135 92.0 216.0 \n", "60 61 52.0 75.0 8.136858 56.0 248.0 \n", "61 62 48.0 68.0 7.817640 53.0 224.0 \n", "\n", " mean_intensity min_intensity perimeter perimeter_crofton ... bbox-0 \\\n", "0 191.440559 128.0 89.012193 87.070368 ... 0 \n", "1 179.846995 128.0 53.556349 53.456120 ... 0 \n", "2 205.604863 120.0 95.698485 93.409370 ... 0 \n", "3 217.515012 120.0 77.455844 76.114262 ... 0 \n", "4 213.033898 128.0 83.798990 82.127941 ... 0 \n", ".. ... ... ... ... ... ... \n", "57 184.525822 120.0 52.284271 52.250114 ... 232 \n", "58 184.810127 128.0 39.313708 39.953250 ... 248 \n", "59 182.727273 128.0 45.692388 46.196967 ... 249 \n", "60 189.538462 128.0 30.692388 32.924135 ... 249 \n", "61 173.833333 128.0 33.071068 35.375614 ... 250 \n", "\n", " bbox-1 bbox-2 bbox-3 weighted_centroid-0 weighted_centroid-1 \\\n", "0 10 30 35 13.130723 19.987532 \n", "1 53 11 74 4.156053 63.178901 \n", "2 95 28 122 12.485897 108.430312 \n", "3 144 23 167 9.630850 154.408732 \n", "4 237 29 256 13.051158 247.170738 \n", ".. ... ... ... ... ... \n", "57 39 251 54 240.563200 46.034602 \n", "58 170 254 188 251.276164 178.373151 \n", "59 117 254 139 251.403483 127.717413 \n", "60 227 254 242 251.671266 234.202922 \n", "61 66 254 83 252.038351 73.570470 \n", "\n", " standard_deviation_intensity aspect_ratio roundness circularity \n", "0 29.793138 2.088249 0.451572 0.680406 \n", "1 21.270534 1.782168 0.530849 0.801750 \n", "2 29.392255 1.067734 0.918683 0.902871 \n", "3 35.852345 1.061942 0.917813 0.906963 \n", "4 28.741080 1.579415 0.621952 0.844645 \n", ".. ... ... ... ... \n", "57 28.255467 1.296143 0.771094 0.979146 \n", "58 33.739912 3.173540 0.300766 0.642316 \n", "59 24.417173 4.021193 0.238521 0.529669 \n", "60 37.867411 2.839825 0.322190 0.693668 \n", "61 27.987596 4.417297 0.213334 0.551512 \n", "\n", "[62 rows x 31 columns]" ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df = pd.DataFrame(regionprops_table(image , label_image, \n", " perimeter = True, \n", " shape = True, \n", " position=True))\n", "df" ] }, { "cell_type": "markdown", "id": "dd93772c-adec-4492-a267-95005e32ca29", "metadata": {}, "source": [ "As you can see, we have now plenty of features to investigate. We can print out all feature names with the `keys` function:" ] }, { "cell_type": "code", "execution_count": 6, "id": "13f4b644-0e01-4f4e-8601-42e5ee5a07d9", "metadata": { "tags": [] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Index(['label', 'area', 'bbox_area', 'equivalent_diameter', 'convex_area',\n", " 'max_intensity', 'mean_intensity', 'min_intensity', 'perimeter',\n", " 'perimeter_crofton', 'extent', 'local_centroid-0', 'local_centroid-1',\n", " 'solidity', 'feret_diameter_max', 'major_axis_length',\n", " 'minor_axis_length', 'orientation', 'eccentricity', 'centroid-0',\n", " 'centroid-1', 'bbox-0', 'bbox-1', 'bbox-2', 'bbox-3',\n", " 'weighted_centroid-0', 'weighted_centroid-1',\n", " 'standard_deviation_intensity', 'aspect_ratio', 'roundness',\n", " 'circularity'],\n", " dtype='object')\n" ] } ], "source": [ "print(df.keys())" ] }, { "cell_type": "markdown", "id": "173c1e46-04d7-4019-97b6-ada6bb159742", "metadata": {}, "source": [ "We can select some columns that we want to focus on like this:" ] }, { "cell_type": "code", "execution_count": 7, "id": "b108a94d-cd64-4c9a-8348-8ca23a1c5d6e", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
labelareaextentaspect_ratioroundnesscircularity
01429.00.5720002.0882490.4515720.680406
12183.00.7922081.7821680.5308490.801750
23658.00.8703701.0677340.9186830.902871
34433.00.8185261.0619420.9178130.906963
45472.00.8566241.5794150.6219520.844645
.....................
5758213.00.7473681.2961430.7710940.979146
585979.00.7314813.1735400.3007660.642316
596088.00.8000004.0211930.2385210.529669
606152.00.6933332.8398250.3221900.693668
616248.00.7058824.4172970.2133340.551512
\n", "

62 rows × 6 columns

\n", "
" ], "text/plain": [ " label area extent aspect_ratio roundness circularity\n", "0 1 429.0 0.572000 2.088249 0.451572 0.680406\n", "1 2 183.0 0.792208 1.782168 0.530849 0.801750\n", "2 3 658.0 0.870370 1.067734 0.918683 0.902871\n", "3 4 433.0 0.818526 1.061942 0.917813 0.906963\n", "4 5 472.0 0.856624 1.579415 0.621952 0.844645\n", ".. ... ... ... ... ... ...\n", "57 58 213.0 0.747368 1.296143 0.771094 0.979146\n", "58 59 79.0 0.731481 3.173540 0.300766 0.642316\n", "59 60 88.0 0.800000 4.021193 0.238521 0.529669\n", "60 61 52.0 0.693333 2.839825 0.322190 0.693668\n", "61 62 48.0 0.705882 4.417297 0.213334 0.551512\n", "\n", "[62 rows x 6 columns]" ] }, "execution_count": 7, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df_selection = df[['label', 'area', 'extent', 'aspect_ratio', 'roundness', 'circularity']]\n", "df_selection" ] }, { "cell_type": "markdown", "id": "e1eedb4d-c27d-41ae-bc73-ef5273d48caf", "metadata": {}, "source": [ "And `describe` gives us basic statistics like `max`, `mean`, `min` and `std` of each feature:" ] }, { "cell_type": "code", "execution_count": 8, "id": "98aeb67d-206d-4749-85e7-e6038fa5ac79", "metadata": { "tags": [] }, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
labelareaextentaspect_ratioroundnesscircularity
count62.00000062.00000062.00000062.00000062.00000062.000000
mean31.500000355.3709680.7613631.6379910.6924180.894101
std18.041619211.3673850.0652080.7943660.2109730.183024
min1.0000007.0000000.5411021.0480530.2133340.529669
25%16.250000194.7500000.7443291.1684510.5386160.805774
50%31.500000366.0000000.7810761.3160030.7574850.925560
75%46.750000500.7500000.7995191.7699760.8514630.966037
max62.000000896.0000000.8703704.4172970.9748241.886542
\n", "
" ], "text/plain": [ " label area extent aspect_ratio roundness circularity\n", "count 62.000000 62.000000 62.000000 62.000000 62.000000 62.000000\n", "mean 31.500000 355.370968 0.761363 1.637991 0.692418 0.894101\n", "std 18.041619 211.367385 0.065208 0.794366 0.210973 0.183024\n", "min 1.000000 7.000000 0.541102 1.048053 0.213334 0.529669\n", "25% 16.250000 194.750000 0.744329 1.168451 0.538616 0.805774\n", "50% 31.500000 366.000000 0.781076 1.316003 0.757485 0.925560\n", "75% 46.750000 500.750000 0.799519 1.769976 0.851463 0.966037\n", "max 62.000000 896.000000 0.870370 4.417297 0.974824 1.886542" ] }, "execution_count": 8, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df_selection.describe()" ] }, { "cell_type": "markdown", "id": "afc86efe-da9d-40db-aaae-68e77280bd54", "metadata": {}, "source": [ "If we're interested in specific descriptive statistics, we can derive them directly from the columns." ] }, { "cell_type": "code", "execution_count": 9, "id": "578c48ab-9d69-40b3-8d55-3a2cc4c58e5d", "metadata": { "tags": [] }, "outputs": [ { "data": { "text/plain": [ "355.3709677419355" ] }, "execution_count": 9, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df_selection['area'].mean()" ] }, { "cell_type": "markdown", "id": "8f9062ac-9397-4542-8847-18ef303bccf1", "metadata": {}, "source": [ "## Exercises" ] }, { "cell_type": "markdown", "id": "f8ea0021-8273-4b38-af0a-afea8ccace53", "metadata": {}, "source": [ "Make a table with only `area`, `mean_intensity`, `standard_deviation_intensity` and `label`." ] }, { "cell_type": "code", "execution_count": null, "id": "b26716e9-4b78-46d6-b0ec-77cfc28188e9", "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "markdown", "id": "1f3c93d1-2488-4e0d-8d83-f5c85ac19c63", "metadata": {}, "source": [ "How many object are in the dataframe?" ] }, { "cell_type": "code", "execution_count": null, "id": "6047d3af-adcc-4424-9da1-2da52b4030b9", "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "markdown", "id": "069ce8f5-c157-4301-a220-2ee812520a03", "metadata": {}, "source": [ "How large is the largest object?" ] }, { "cell_type": "code", "execution_count": null, "id": "32856292-6fea-49e2-a024-a71a320291c8", "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "markdown", "id": "f08e83ff-46bd-4763-96b5-47d761c7f2c2", "metadata": {}, "source": [ "What is the mean intensity of the brightest object?" ] }, { "cell_type": "code", "execution_count": null, "id": "a2831915-9c91-459f-8679-3dc6543048c3", "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "markdown", "id": "0dd1865b-fff2-40d5-a902-0401d934ea08", "metadata": { "tags": [] }, "source": [ "What are mean and standard deviation intensity of the image?" ] }, { "cell_type": "code", "execution_count": null, "id": "0c6de947-8b2e-466d-a4a1-a65467057674", "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.11.9" } }, "nbformat": 4, "nbformat_minor": 5 }