百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
M

MedBlend

> 编程语言
开源

适用于 Blender 的医学可视化插件

100 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

适用于 Blender 的医学可视化插件

MedBlend

A medical visualisation extension for Blender.

MedBlend is under active development and is intended for research, education, and scientific communication.

Intended use

MedBlend imports DICOM images, radiotherapy dose, structure sets, and proton plans into Blender to create visualisations for research, education, presentations, and publications.

Disclaimer

MedBlend is not a medical device and must not be used for diagnosis, treatment planning, treatment delivery, or other clinical decisions. The software is provided without warranty.

Data handling and privacy

MedBlend processes DICOM files locally and makes no network requests. It reads files selected by the user and writes generated VDB volume files to Blender's temporary directory or a directory selected in the extension preferences.

DICOM data may contain identifying health information. MedBlend does not deliberately copy patient names or patient IDs into Blender, but imported voxel data, ROI and beam names, and technical DICOM identifiers can remain in generated VDB files or the saved .blend file. De-identify source data and review exported files before sharing them.

Requirements

MedBlend requires Blender 5.0 or newer. It is tested against Blender 5.x, including Blender 5.2 LTS.

The extension package includes the pydicom wheel declared in blender_manifest.toml. Blender installs this dependency into the extension's managed Python environment. NumPy and OpenVDB are supplied by supported Blender builds.

Installation

Blender Extensions platform

Once MedBlend has been approved and published:

  1. Open Edit > Preferences > Get Extensions.
  2. Search for MedBlend.
  3. Select Install.

Install a release package from disk

  1. Download the medblend-.zip asset from the latest GitHub release. Do not use GitHub's automatically generated "Source code" archives.
  2. In Blender 5.0 or newer, open Edit > Preferences > Get Extensions.
  3. Open the menu in the top-right corner and choose Install from Disk.
  4. Select the downloaded extension package.

Blender installs the bundled dependency automatically. Open the 3D viewport sidebar with N, then select the Medical tab.

How to use MedBlend

Once installed, open the 3D viewport and select the Medical category from the sidebar. Press N on the keyboard if it is not visible. The same four importers are also available from File > Import as DICOM Image Series (CT/MR), DICOM RT Dose, DICOM RT Structure Set and DICOM RT Ion Plan (proton spots).

If Blender cannot write temporary VDB files in its default temp location, open the MedBlend add-on preferences and set a VDB Temp Directory that your user account can write to.

Note on saving .blend files: Blender volume objects read their voxel data from the VDB file on disk. By default MedBlend writes VDB files to Blender's session temporary directory, which is deleted when Blender exits - so a saved .blend file will lose its volume data on the next reload. If you plan to save your scene, set a persistent VDB Temp Directory in the MedBlend preferences first. Files in that directory are never overwritten or cleaned up automatically (each import writes a new uniquely-named file), so clear it out occasionally.

MedBlend currently has 4 main functions: Load DICOM images, Load DICOM Dose, Load DICOM structures and Load Proton Plan. Each of these functions imports a specific DICOM medical file.

  • Load DICOM Images allows you to load a DICOM image sequence from a specified folder. When you press the load images button, a file dialog will appear. Select a single DICOM image from this folder. MedBlend will search through the same directory and load all DICOM images belonging to the same series (matching SeriesInstanceUID) into Blender automatically. These image slices will be imported and converted to a volume object which can be rendered in Blender. The file dialog also has a Preset dropdown, which builds the imported volume's material from one of the volume rendering presets instead of the default Image Material.

  • Load DICOM Dose imports a radiotherapy DICOM dose file and displays the dose distribution as a volume in Blender.

  • Load DICOM Structures imports a radiotherapy DICOM structure set. Each ROI is rasterised onto the referenced CT grid and imported as its own volume object, cropped to the bounding box of that structure so a single ROI does not carry the whole CT grid. Each structure gets its own copy of the structure material, tinted with the ROIDisplayColor from the planning system, so the ROIs are distinguishable as soon as they are imported.

  • Load Proton Plan imports proton scanning beams from a DICOM RT Ion plan and displays spot positions as spheres with radius proportional to relative spot weight. Non-proton ion beams are skipped. Static energy layers that share one geometry are combined into one Blender object, while stepped or arc segments with different gantry, couch, or isocentre geometry are kept in separate objects. If geometry changes during an irradiation segment, DICOM does not specify each spot's intermediate geometry, so MedBlend places that segment at its starting control point and reports a warning.

How to add Materials to the CT and dose volumes

Some default materials for CT, MRI and Dose volumes have been included in this add-on. When a DICOM image or DICOM dose volume is imported, a default material is automatically created. Select the materials menu from the menu on the right side, and select either Image Material for CT volumes or Dose Material for dose volumes.

With the CT or dose object selected in the outliner (top right), go to the shader/material menu (red icon in lower right) and select either the Image Material or Dose Material depending on what type of volume you have imported.

To change the material properties, select the Shading tab from the top edge and you should see the Material node setup shown in the bottom panel. MedBlend works with both the Eevee and Cycles render engines but Cycles generally produces better results without too many changes. You can change from Eevee to Cycles from the panel on the right. From the material nodes (shown in panel at the bottom), the brightness of the volume can be changed by increasing the "multiply" value. The pixel threshold can be adjusted by moving the slider points in the colour ramp node.

DICOM CT is stored in Hounsfield units, which typically run from about -1000 (air) through 0 (water) to well beyond 1000 (bone). MedBlend imports those values unchanged: a voxel in the VDB grid reads the same number as the DICOM file, so -1000 is air and 400 is bone in every scene, whatever else is in the scan. The range a particular series covers is recorded on the imported object as the custom properties medblend_intensity_min and medblend_intensity_max (visible in Object Properties > Custom Properties), along with medblend_modality.

Normalising is left to the shader, which is the only place that needs it. The Image Material's node group takes Min HU and Max HU inputs, and MedBlend fills them in with the range of the volume it is applied to, so a fresh import renders without hand-tuning. Narrow them to isolate a tissue: -1000 to -400 for lung, -100 to 100 for soft tissue, 200 to 1500 for bone. Because the numbers are Hounsfield units rather than a fraction of one particular scan's range, the same window means the same thing on the next patient.

Each window gets its own copy of the material (Image Material - -1024 to 3071), so retuning one volume never rewindows another that is already in the scene.

Imported dose volumes are likewise unscaled: their voxels hold absolute dose, and the maximum value and dose units are recorded on the object as medblend_dose_max and medblend_dose_units.

Volume rendering presets

MedBlend ships the 31 volume rendering presets from 3D Slicer - CT-Bone, CT-Lung, CT-Cardiac, MR-Default, MR-T2-Brain, uCT-Skull and the rest - as ready-made Blender volume materials. Each one is Slicer's own colour transfer function and scalar opacity function rebuilt as colour ramps in a Principled Volume shader, so a freshly imported CT or MR looks like the equivalent view in Slicer without hand-tuning a shader.

Apply one either way:

  • At import. Pick a preset in the Preset dropdown of the Load DICOM Images file dialog. Leaving it on Default Image Material keeps the previous behaviour.
  • Afterwards. Select one or more imported volumes, choose a preset under Image Volume Presets in the Medical sidebar, and press Apply Preset.

Three settings control how the preset lands:

  • Scalar Range decides how the preset's scalar values map onto your data. Slicer's CT- presets are keyed to Hounsfield units, which are calibrated, so on a CT a preset scalar is read against the voxel value that equals it - no conversion in between. Everything else - MR, ultrasound, micro-CT - is stored in per-scan intensities with no fixed meaning, so the preset's authored window is stretched across whatever range the volume occupies. Auto picks between the two for you; Hounsfield Units and Fit To Data force one.
  • Density is the extinction of a fully opaque voxel, in 1/m. Raise it for a more solid volume, lower it to see further inside. Blender volumes are imported in metres, so this is what converts Slicer's per-sample opacity into something Blender can integrate.
  • Emission is how brightly the volume glows on its own. The default of 1.0 means a preset reads immediately without adding a light; drop it towards zero to light the volume with scene lights and let the preset's colours act as scattering albedo instead.

Applying the same preset with the same settings reuses one material, so pushing a preset onto several volumes - or re-applying it after an edit - does not fill the file with copies. Different settings get their own material rather than changing one that another volume is already using.

Editing a preset material

Open the Shading tab with the volume selected and you get a small, editable node tree:

  • Window (a Map Range node) maps voxel values onto the 0 - 1 the colour ramps behind it are addressed by, and is the equivalent of Slicer's shift slider. From Min/From Max are in the volume's own units - Hounsfield units for a CT - so narrowing them squeezes the whole preset into a tighter part of the intensity range.
  • Color Transfer and Scalar Opacity are the two transfer functions as colour ramps. Drag the stops to retune the preset; the opacity ramp carries its value in the alpha channel, which is what the shader reads.
  • Density Scale is the multiply node that turns opacity into Blender density.

The material also records what it was built from as custom properties (medblend_preset, medblend_preset_window, medblend_preset_data_range, and Slicer's medblend_slicer_ambient/_diffuse/_specular/_specular_power/_shade), visible in Material Properties > Custom Properties.

What is and is not carried over

Colours are converted from Slicer's sRGB display values into Blender's scene-linear colour space, so hues match rather than rendering washed out. Two parts of a Slicer preset have no Blender equivalent and are not applied: the gradient opacity functions, because shader nodes cannot read a volume's gradient magnitude, and the Phong shading parameters, because Blender's volume shader is physically based - those are recorded on the material for reference instead.

The presets are reproduced from Slicer under its BSD-style licence; see THIRD_PARTY_NOTICES.md. To refresh them from a newer Slicer release, run python "development scripts/generate_preset_data.py".

Converting CT volumes into a mesh

Issues· 5 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Python

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言