{"library":"simpleitk","title":"SimpleITK","description":"SimpleITK is a simplified, open-source interface to the Insight Segmentation and Registration Toolkit (ITK) for image registration and segmentation. It supports multiple programming languages, including Python, and offers a high-level, procedural interface to ITK's extensive algorithms. It aims to make image analysis more accessible for rapid prototyping, education, and various applications, especially in medical imaging. The current version is 2.5.3, with regular releases.","language":"python","status":"active","last_verified":"Sat May 16","install":{"commands":["pip install SimpleITK"],"cli":null},"imports":["import SimpleITK as sitk"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import SimpleITK as sitk\n\n# Create a 2D image (e.g., 64x64 pixels, 16-bit integer)\nimage_size = [64, 64]\nimage = sitk.Image(image_size, sitk.sitkInt16)\n\n# Set some pixel values (e.g., a square in the middle)\n# Note: SimpleITK indexing is (x,y,z), while numpy conversion often reverses axes.\nimage[10:50, 10:50] = 100\n\n# Apply a Gaussian smoothing filter\ngaussian_filter = sitk.SmoothingRecursiveGaussianImageFilter()\ngaussian_filter.SetSigma(2.0) # Set the standard deviation of the Gaussian\nsmoothed_image = gaussian_filter.Execute(image)\n\n# Get a pixel value at a specific index\npixel_value = smoothed_image.GetPixel((32, 32))\nprint(f\"Pixel value at (32,32) after smoothing: {pixel_value}\")\n\n# Save the image (e.g., to a MetaImage file format)\nsitk.WriteImage(smoothed_image, \"smoothed_image.mha\")\nprint(\"Saved smoothed_image.mha\")\n\n# To visualize the image, you would typically use an external viewer\n# For example, if ImageJ/Fiji is installed and configured:\n# sitk.Show(smoothed_image, 'Smoothed Image')","lang":"python","description":"This quickstart demonstrates how to create a SimpleITK image, set pixel values, apply a Gaussian smoothing filter, read a pixel value, and save the resulting image to disk. For visualization, external tools like ImageJ/Fiji are typically used via `sitk.Show()`.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":{"tag":null,"tag_description":null,"last_tested":"2026-05-16","installed_version":"2.5.5","pypi_latest":"2.5.5","is_stale":false,"summary":{"python_range":"3.10–3.9","success_rate":50,"avg_install_s":3,"avg_import_s":0.18,"wheel_type":"wheel"},"results":[{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"SimpleITK","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"SimpleITK","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":2.9,"import_time_s":0.09,"mem_mb":8.3,"disk_size":"282M"},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"SimpleITK","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":"SimpleITK","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":3,"import_time_s":0.31,"mem_mb":9,"disk_size":"284M"},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"SimpleITK","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":"SimpleITK","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":2.9,"import_time_s":0.22,"mem_mb":8.9,"disk_size":"276M"},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"SimpleITK","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":"SimpleITK","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":2.8,"import_time_s":0.2,"mem_mb":8.6,"disk_size":"276M"},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"SimpleITK","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"SimpleITK","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":3.5,"import_time_s":0.1,"mem_mb":8.5,"disk_size":"282M"}]}}