5.0 (#60)
* feat: Add Bioxel asset catalog and layer management functionality - Introduced a new asset catalog definition file for Blender to manage Bioxel assets. - Implemented layer caching and snapshot functionality in `layer.py`, allowing for VDB file generation and low-resolution snapshots. - Created node management functions in `node.py` for handling Bioxel nodes within Blender's Geometry Node Editor. - Added an operator to extract mesh data from selected nodes in `structure.py`. - Developed UI panels in `panels.py` for layer management, including import options and layer library display. * Add unit tests for bioxel module and documentation - Created README.md for test instructions and categories. - Implemented comprehensive unit tests for the Data, Layer, and utility functions in the bioxel module. - Added tests for reading NRRD and DICOM formats, data properties, and edge cases. - Included tests for real data files to ensure functionality with actual datasets. * feat: Update .gitattributes and .gitignore for improved asset management and ignore patterns chore: Add app.json and omoolab.css for Obsidian integration refactor: Clean up AGENTS.md and remove outdated test files * feat: Update .gitignore to include scipy_ndimage directory * feat: Update release workflow and manifest for improved dependency management and layer handling * feat: Update .gitignore and add binary files for scipy_ndimage across multiple platforms * feat: Add OPSX commands for archiving, exploring, and proposing changes * feat: Refactor asset library management and update manifest for improved organization * feat: Downgrade h5py version to 3.14.0 in requirements and manifest * feat: Update Help operator and panel labels to use English terminology * Translate documentation to Chinese, add support format details, and enhance styling with new fonts. Update mkdocs configuration for multilingual support and improve package dependencies. * feat: Remove default version setting from extra configuration in mkdocs.yml * fix: Update documentation links to point to the correct URLs for Chinese and English versions * Add documentation for basic usage, supported formats, and performance tips - Created English and Chinese documentation for basic usage of the add-on, including data download, import, extraction, and rendering steps. - Added support format documentation listing compatible file types for the add-on. - Included links to open databases for volumetric data. - Provided performance improvement tips for voxel reconstruction and rendering, including settings for low-resolution previews and balanced rendering configurations.
99
docs/SARS-Cov-2.en.md
Normal file
@@ -0,0 +1,99 @@
|
||||
# SARS-Cov-2
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
In this tutorial, we'll make a structural visualzation of the SARS-Cov-2 Virus. Please see [step by step](step_by_step.md) to make sure you have a basic understanding of how to use the addon, and make sure the addon version is v1.0.2 or higher!
|
||||
|
||||
Research data is from paper published in September 2020 in Cell Press ([https://www.cell.com/cell/fulltext/S0092-8674(20)31159-4](<https://www.cell.com/cell/fulltext/S0092-8674(20)31159-4>)) by Li Sai team at Tsinghua University. This research revealed the molecular assembly of the authentic SARS-CoV-2 virus using cryoelectron tomography (cryo-ET) and subtomogram averaging (STA). Here is an official video of this study
|
||||
|
||||
<iframe width="560" height="315" src="https://www.youtube.com/embed/JSKl5VY4k5w?si=t4LhrCRebxrX_Saf&controls=0" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
|
||||
|
||||
"It remains enigmatic how coronaviruses pack the ∼30-kb RNA into the ∼80-nm-diameter viral lumen. Are the RNPs ordered relative to each other to avoid RNA entangling, knotting, or even damage or are they involved in virus assembly?" Three assembly classes were proposed in the paper, we will make a visualzation of the "eggs-in-a-nest"-shaped RNPs assembly, based on real cryo-ET data.
|
||||
|
||||
## Download and import data
|
||||
|
||||
The data of this research is hosted on EMDB ([https://www.ebi.ac.uk/emdb](https://www.ebi.ac.uk/emdb)), and the website of SARS-Cov-2 virus is [here](https://www.ebi.ac.uk/emdb/EMD-30430). Open the page, find "Download" button and select the first selection "3D Volume (.map.gz)".
|
||||
|
||||
In case you can't download data, you can download here.
|
||||
|
||||
[SARS-Cov-2.map](https://drive.google.com/file/d/1LMybsmTVbwQ38_eqAx6hbZTc5p2fdcjK/view?usp=sharing)
|
||||
|
||||
After downloading, put it into any directory and import the data. In the import options, it is recommended to adjust the Bioxel Size to 5, in order to reduce the shape of the data to increase the speed of calculation and rendering. If you are confident in the performance of your hardware, you can leave the original 2.72 unchanged. After adjusting the Bioxel Size, the shape of the converted data will be calculated below based on the current bioxel size. The amount of data will increase exponentially with larger shape, and may result in OOM (out of memory).
|
||||
|
||||
## Cutout the Virus
|
||||
|
||||
After importing, you can get the virus by creating and connecting nodes and setting parameters as shown below
|
||||
|
||||

|
||||
|
||||
Place the light and the camera in the way as below. The backlight is a area light, color white, intensity 500W, spread 90°, and inside the virus, place a point light, color `FFD08D`, intensity 5W. Camera focal length is 200 mm. the background color is pure black. The Look of the color management is High Contrast.
|
||||
|
||||

|
||||
|
||||
Continue editing the node, followed by "Set Properies" and "Set Color by Ramp 4" node, the parameters of these two nodes are set as shown in the figure, where the color part, from top to bottom, is set to `E1D0FC` (1.0), `FFE42D` (0.5), `3793FF` (0.5), `FFFF8EC` (0.1) (alpha value in parentheses). Color alpha also affects density.
|
||||
|
||||

|
||||
|
||||
If you feel that rendering is too slow, see [here](improve_performance.md) for suggestions
|
||||
|
||||
## Color the RNPs alone
|
||||
|
||||
The current rendering is pretty good, but considering that my goal is to make it clear how the RNPs are arranged within the virus, the RNPs should be colored differently than the others. So how to color the RNPs alone?
|
||||
|
||||
First of all, we have to separate the RNPs. The value of RNPs is between the membrane and S protein, so it is very difficult to separate. The good thing is that the virus is spherical, we can separate the RNPs part of the virus from the rest by using a sphere cutter. To do so, in the Geometry Nodes panel menu of the container, click **Bioxel Nodes > Add a Cutter > Sphere Cutter**, and adjust the scale and position of the newly created sphere object named "Sphere_Cutter" appropriately, so that it can just separate the internal RNPs and membrane of the virus.
|
||||
|
||||

|
||||
|
||||
The process of changing the position of the "Sphere_Cutter" object can be very laggy, then you can turn off "With Surface" and do it in Slice Viewer mode. Once you are happy with it, you can restore the settings.
|
||||
|
||||
Then we turn on Invert in the "Sphere Cutter" node and you can see the opposite result. This way we've managed to separate the two, next let's color them separately and finally merge them with Join Component. Create and join the nodes as shown below, where the second Cutter node is copied and the color value in Set Color is `FFDDFE` (0.5). If all is well, the rendering should look like below.
|
||||
|
||||

|
||||
|
||||
At this point, the rendering of a SARS-Cov-2 virus is complete!
|
||||
|
||||
## Render RNPs and Membranes
|
||||
|
||||
Realistic rendering is great, but Non-photorealistic rendering (NPR) is better for presenting structural information. So I will render ultrastructure of the RNPs assembly with toon shader.
|
||||
|
||||

|
||||
|
||||
The silhouettes of RNPs uses Blender's Line Art feature, but Line Art must be based on a mesh. Select the nodes that are extruding the RNPs (i.e., the "Cut" nodes that are in charge of cutting out the RNPs), and right-click, click **Bioxel Nodes > Extract Mesh**. This gives you a new mesh object of the RNPs.
|
||||
|
||||
Extract the membrane mesh in the same way.
|
||||
|
||||
The membrane has a much higher value than the rest of the virus, so let's create a new "Cutout" node, also after the ReCenter, but with the threshold adjusted to 0.13. After the Cutout, connect to the "To Surface" node and parameterize it as shown in the figure, noting that the Remove Island Threshold is set to 1000 so that any fragments smaller than 1000 pts be eliminated. Then select the "To Surface" node, and perform the operation of extracting the mesh.
|
||||
|
||||

|
||||
|
||||
The mesh of the membrane needs to be cut in half, this can be done with the Box Trim brush in sculpt mode or with the Boolean modifier. the mesh of the RNPs may also need some repair work, I cleaned up some of the broken surfaces of the RNPs. all the meshes are now ready to be used.
|
||||
|
||||

|
||||
|
||||
For Line Art, please see the video tutorial from Blender Secrets.
|
||||
|
||||
<iframe width="560" height="315" src="https://www.youtube.com/embed/aIWdBq7-ias?si=CrcStx5VVJBwDpzu&controls=0" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
|
||||
|
||||
Finally, an infographic on the ultrastructure of RNPs is done!
|
||||
|
||||

|
||||
|
||||
If you have trouble following the docs, you can download the project files.
|
||||
|
||||
[SARS-Cov-2.zip](https://drive.google.com/file/d/15GpIoIjVAE-Jr98zWo7oupuk1KfRVPmk/view?usp=sharing)
|
||||
|
||||
## Homework
|
||||
|
||||
Other data relevant to the study are provided in the paper, you could try visualizing them.
|
||||
|
||||

|
||||
|
||||
Go to the official EMDB website https://www.ebi.ac.uk/emdb/ and enter the EMD number in the search box to get them.
|
||||
|
||||
The Electron Microscopy Data Bank (EMDB) is a public repository for cryogenic-sample Electron Microscopy (cryoEM) volumes and representative tomograms of macromolecular complexes and subcellular structures. If you want to get data on other virus, just enter their name in the search box. For example, hepatitis B virus, enter it into the search box, then select Virus in the Sample Type on the left side, and download the data you need (it is better to find the corresponding paper to clarify the data information).
|
||||
|
||||
**Try to visualize hepatitis B virus.**
|
||||
|
||||

|
||||
@@ -4,96 +4,96 @@
|
||||
|
||||

|
||||
|
||||
In this tutorial, we'll make a structural visualzation of the SARS-Cov-2 Virus. Please see [step by step](step_by_step.md) to make sure you have a basic understanding of how to use the addon, and make sure the addon version is v1.0.2 or higher!
|
||||
在本教程中,我们将制作 SARS-Cov-2 病毒的结构可视化。请确保您已阅读[分步指南](step_by_step.md)以了解插件的基本使用方法,并确保插件版本为 v1.0.2 或更高!
|
||||
|
||||
Research data is from paper published in September 2020 in Cell Press ([https://www.cell.com/cell/fulltext/S0092-8674(20)31159-4](<https://www.cell.com/cell/fulltext/S0092-8674(20)31159-4>)) by Li Sai team at Tsinghua University. This research revealed the molecular assembly of the authentic SARS-CoV-2 virus using cryoelectron tomography (cryo-ET) and subtomogram averaging (STA). Here is an official video of this study
|
||||
研究数据来自 2020 年 9 月发表在 Cell Press 的论文([https://www.cell.com/cell/fulltext/S0092-8674(20)31159-4](<https://www.cell.com/cell/fulltext/S0092-8674(20)31159-4>)),作者是清华大学李赛团队。该研究使用冷冻电子断层扫描(cryo-ET)和亚断层图平均(STA)揭示了真实 SARS-CoV-2 病毒的分子组装。以下是该研究的官方视频:
|
||||
|
||||
<iframe width="560" height="315" src="https://www.youtube.com/embed/JSKl5VY4k5w?si=t4LhrCRebxrX_Saf&controls=0" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
|
||||
|
||||
"It remains enigmatic how coronaviruses pack the ∼30-kb RNA into the ∼80-nm-diameter viral lumen. Are the RNPs ordered relative to each other to avoid RNA entangling, knotting, or even damage or are they involved in virus assembly?" Three assembly classes were proposed in the paper, we will make a visualzation of the "eggs-in-a-nest"-shaped RNPs assembly, based on real cryo-ET data.
|
||||
"冠状病毒如何将约 30kb 的 RNA 包装到约 80nm 直径的病毒腔内仍然是个谜。RNP 彼此之间是否有序以避免 RNA 缠结、打结或损坏,还是它们参与病毒组装?" 论文中提出了三类组装方式,我们将基于真实的冷冻电镜数据,制作"巢中蛋"形 RNP 组装的可视化。
|
||||
|
||||
## Download and import data
|
||||
## 下载和导入数据
|
||||
|
||||
The data of this research is hosted on EMDB ([https://www.ebi.ac.uk/emdb](https://www.ebi.ac.uk/emdb)), and the website of SARS-Cov-2 virus is [here](https://www.ebi.ac.uk/emdb/EMD-30430). Open the page, find "Download" button and select the first selection "3D Volume (.map.gz)".
|
||||
该研究的数据托管在 EMDB([https://www.ebi.ac.uk/emdb](https://www.ebi.ac.uk/emdb)),SARS-Cov-2 病毒网站是[这里](https://www.ebi.ac.uk/emdb/EMD-30430)。打开页面,找到"Download"按钮,选择第一个选项"3D Volume (.map.gz)"。
|
||||
|
||||
In case you can't download data, you can download here.
|
||||
如果您无法下载数据,可以从这里下载。
|
||||
|
||||
[SARS-Cov-2.map](https://drive.google.com/file/d/1LMybsmTVbwQ38_eqAx6hbZTc5p2fdcjK/view?usp=sharing)
|
||||
|
||||
After downloading, put it into any directory and import the data. In the import options, it is recommended to adjust the Bioxel Size to 5, in order to reduce the shape of the data to increase the speed of calculation and rendering. If you are confident in the performance of your hardware, you can leave the original 2.72 unchanged. After adjusting the Bioxel Size, the shape of the converted data will be calculated below based on the current bioxel size. The amount of data will increase exponentially with larger shape, and may result in OOM (out of memory).
|
||||
下载后,放到任意目录并导入数据。在导入选项中,建议将 Bioxel Size 调整为 5,以减小数据形状,提高计算和渲染速度。如果您对硬件性能有信心,可以保持原始的 2.72 不变。调整 Bioxel Size 后,下方会根据当前的 bioxel size 计算转换后数据的形状。数据量会随着形状增大呈指数增长,可能会导致内存不足(OOM)。
|
||||
|
||||
## Cutout the Virus
|
||||
## 切割病毒
|
||||
|
||||
After importing, you can get the virus by creating and connecting nodes and setting parameters as shown below
|
||||
导入后,您可以通过创建和连接节点并设置参数来获取病毒,如下图所示。
|
||||
|
||||

|
||||
|
||||
Place the light and the camera in the way as below. The backlight is a area light, color white, intensity 500W, spread 90°, and inside the virus, place a point light, color `FFD08D`, intensity 5W. Camera focal length is 200 mm. the background color is pure black. The Look of the color management is High Contrast.
|
||||
按下图所示放置灯光和相机。背光是区域光,白色,强度 500W,扩散 90°;在病毒内部放置一个点光源,颜色 `FFD08D`,强度 5W。相机焦距为 200mm。背景颜色为纯黑色。颜色管理的 Look 为 High Contrast。
|
||||
|
||||

|
||||
|
||||
Continue editing the node, followed by "Set Properies" and "Set Color by Ramp 4" node, the parameters of these two nodes are set as shown in the figure, where the color part, from top to bottom, is set to `E1D0FC` (1.0), `FFE42D` (0.5), `3793FF` (0.5), `FFFF8EC` (0.1) (alpha value in parentheses). Color alpha also affects density.
|
||||
继续编辑节点,接着是"Set Properties"和"Set Color by Ramp 4"节点,这两个节点的参数设置如下图,其中颜色部分,从上到下设置为 `E1D0FC`(1.0)、`FFE42D`(0.5)、`3793FF`(0.5)、`FFFF8EC`(0.1)(括号中为 alpha 值)。颜色的 alpha 值也会影响密度。
|
||||
|
||||

|
||||
|
||||
If you feel that rendering is too slow, see [here](improve_performance.md) for suggestions
|
||||
如果您觉得渲染太慢,请参阅[这里](improve_performance.md)获取建议。
|
||||
|
||||
## Color the RNPs alone
|
||||
## 单独为 RNP 着色
|
||||
|
||||
The current rendering is pretty good, but considering that my goal is to make it clear how the RNPs are arranged within the virus, the RNPs should be colored differently than the others. So how to color the RNPs alone?
|
||||
当前的渲染效果很好,但考虑到我的目标是让您清楚看到 RNP 在病毒内部的排列方式,RNP 应该与其他部分用不同颜色着色。那么如何单独为 RNP 着色呢?
|
||||
|
||||
First of all, we have to separate the RNPs. The value of RNPs is between the membrane and S protein, so it is very difficult to separate. The good thing is that the virus is spherical, we can separate the RNPs part of the virus from the rest by using a sphere cutter. To do so, in the Geometry Nodes panel menu of the container, click **Bioxel Nodes > Add a Cutter > Sphere Cutter**, and adjust the scale and position of the newly created sphere object named "Sphere_Cutter" appropriately, so that it can just separate the internal RNPs and membrane of the virus.
|
||||
首先,我们必须分离 RNP。RNP 的值介于膜和 S 蛋白之间,因此很难分离。好在病毒是球形的,我们可以使用球形切割器将病毒的 RNP 部分与其余部分分离。为此,在容器的几何节点面板菜单中,点击 **Bioxel Nodes > Add a Cutter > Sphere Cutter**,并适当调整新创建的名为"Sphere_Cutter"的球体对象的大小和位置,使其恰好能将病毒内部的 RNP 和膜分离。
|
||||
|
||||

|
||||
|
||||
The process of changing the position of the "Sphere_Cutter" object can be very laggy, then you can turn off "With Surface" and do it in Slice Viewer mode. Once you are happy with it, you can restore the settings.
|
||||
改变"Sphere_Cutter"对象的位置可能会非常卡顿,此时您可以关闭"With Surface"并在 Slice Viewer 模式下操作。满意后,恢复设置。
|
||||
|
||||
Then we turn on Invert in the "Sphere Cutter" node and you can see the opposite result. This way we've managed to separate the two, next let's color them separately and finally merge them with Join Component. Create and join the nodes as shown below, where the second Cutter node is copied and the color value in Set Color is `FFDDFE` (0.5). If all is well, the rendering should look like below.
|
||||
然后在"Sphere Cutter"节点中打开 Invert,您可以看到相反的结果。这样我们就成功将两者分离了。接下来让我们分别着色,最后用 Join Component 合并。按如下图所示创建和连接节点,其中第二个 Cutter 节点是复制的,Set Color 中的颜色值设置为 `FFDDFE`(0.5)。如果一切正常,渲染结果应该如下图所示。
|
||||
|
||||

|
||||
|
||||
At this point, the rendering of a SARS-Cov-2 virus is complete!
|
||||
此时,SARS-Cov-2 病毒的渲染完成了!
|
||||
|
||||
## Render RNPs and Membranes
|
||||
## 渲染 RNP 和膜
|
||||
|
||||
Realistic rendering is great, but Non-photorealistic rendering (NPR) is better for presenting structural information. So I will render ultrastructure of the RNPs assembly with toon shader.
|
||||
写实渲染很棒,但非写实渲染(NPR)在呈现结构信息方面更好。因此,我将使用卡通着色器来渲染 RNP 组装的首尾结构。
|
||||
|
||||

|
||||
|
||||
The silhouettes of RNPs uses Blender's Line Art feature, but Line Art must be based on a mesh. Select the nodes that are extruding the RNPs (i.e., the "Cut" nodes that are in charge of cutting out the RNPs), and right-click, click **Bioxel Nodes > Extract Mesh**. This gives you a new mesh object of the RNPs.
|
||||
RNP 的轮廓使用 Blender 的线稿(Line Art)功能,但线稿必须基于网格。选择挤出 RNP 的节点(即负责切割出 RNP 的"Cut"节点),右键点击 **Bioxel Nodes > Extract Mesh**。这将为您创建一个 RNP 的新网格对象。
|
||||
|
||||
Extract the membrane mesh in the same way.
|
||||
用同样的方式提取膜网格。
|
||||
|
||||
The membrane has a much higher value than the rest of the virus, so let's create a new "Cutout" node, also after the ReCenter, but with the threshold adjusted to 0.13. After the Cutout, connect to the "To Surface" node and parameterize it as shown in the figure, noting that the Remove Island Threshold is set to 1000 so that any fragments smaller than 1000 pts be eliminated. Then select the "To Surface" node, and perform the operation of extracting the mesh.
|
||||
膜的病毒值远高于其他部分,因此让我们创建一个新的"Cutout"节点,同样在 ReCenter 之后,但阈值调整为 0.13。Cutout 后,连接到"To Surface"节点并按如下图所示设置参数,注意 Remove Island Threshold 设置为 1000,以便消除小于 1000 pts 的任何碎片。然后选择"To Surface"节点,执行提取网格的操作。
|
||||
|
||||

|
||||
|
||||
The mesh of the membrane needs to be cut in half, this can be done with the Box Trim brush in sculpt mode or with the Boolean modifier. the mesh of the RNPs may also need some repair work, I cleaned up some of the broken surfaces of the RNPs. all the meshes are now ready to be used.
|
||||
膜的网格需要切成两半,这可以通过雕刻模式中的 Box Trim 笔刷或布尔修改器来完成。RNP 的网格也可能需要一些修复工作,我清理了一些 RNP 的破损表面。所有网格现在都可以使用了。
|
||||
|
||||

|
||||
|
||||
For Line Art, please see the video tutorial from Blender Secrets.
|
||||
关于线稿,请参阅 Blender Secrets 的视频教程。
|
||||
|
||||
<iframe width="560" height="315" src="https://www.youtube.com/embed/aIWdBq7-ias?si=CrcStx5VVJBwDpzu&controls=0" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
|
||||
|
||||
Finally, an infographic on the ultrastructure of RNPs is done!
|
||||
最后,RNP 超微结构的信息图完成了!
|
||||
|
||||

|
||||
|
||||
If you have trouble following the docs, you can download the project files.
|
||||
如果您按照文档有困难,可以下载项目文件。
|
||||
|
||||
[SARS-Cov-2.zip](https://drive.google.com/file/d/15GpIoIjVAE-Jr98zWo7oupuk1KfRVPmk/view?usp=sharing)
|
||||
|
||||
## Homework
|
||||
## 作业
|
||||
|
||||
Other data relevant to the study are provided in the paper, you could try visualizing them.
|
||||
论文中提供了其他相关数据,您可以尝试可视化它们。
|
||||
|
||||

|
||||
|
||||
Go to the official EMDB website https://www.ebi.ac.uk/emdb/ and enter the EMD number in the search box to get them.
|
||||
前往官方 EMDB 网站 https://www.ebi.ac.uk/emdb/,在搜索框中输入 EMD 编号即可获取。
|
||||
|
||||
The Electron Microscopy Data Bank (EMDB) is a public repository for cryogenic-sample Electron Microscopy (cryoEM) volumes and representative tomograms of macromolecular complexes and subcellular structures. If you want to get data on other virus, just enter their name in the search box. For example, hepatitis B virus, enter it into the search box, then select Virus in the Sample Type on the left side, and download the data you need (it is better to find the corresponding paper to clarify the data information).
|
||||
电子显微镜数据银行(EMDB)是一个公共仓库,用于存放冷冻样品的电子显微镜(cryoEM)体积和代表性断层图。如果您想获取其他病毒的数据,只需在搜索框中输入其名称即可。例如,乙型肝炎病毒,在搜索框中输入,然后选择左侧 Sample Type 中的 Virus,下载您需要的数据(最好找到相应的论文来明确数据信息)。
|
||||
|
||||
**Try to visualize hepatitis B virus.**
|
||||
**尝试可视化乙型肝炎病毒。**
|
||||
|
||||

|
||||

|
||||
46
docs/advanced.en.md
Normal file
@@ -0,0 +1,46 @@
|
||||
# Advanced Usage
|
||||
|
||||
## Cut "Structure"
|
||||
|
||||
"Structure" can be cut to show partial structure, accomplished through the O Cut series nodes. For example, add the **O Cut to Region** node as shown below and connect it. Add any object from the scene as the "Region", and input it into the node:
|
||||
|
||||

|
||||
|
||||
By properly adjusting the position and rotation of the "Region" object, you can see that the skull structure is confined within the region.
|
||||
|
||||
!!! note
|
||||
The add-on provides a function to quickly make objects phantom. In 3D Viewport mode, right-click the "Region" object and select **Bioxel Nodes > Toggle Phantom** from the menu.
|
||||
|
||||
!!! warning
|
||||
Cutting increases computation and affects real-time performance. Check Resample on O Layer to improve performance.
|
||||
|
||||
**O Cut Small Parts** node is a cleanup tool that quickly removes scattered fragments and keeps only clean, continuous large structures. However, the computation is particularly time-consuming, so be aware of performance.
|
||||
|
||||

|
||||
|
||||
If you are familiar with geometry nodes, you can also directly define the cutting execution range through **O Cut Structure**. For example, in the image below, select the part where the cutting position X is greater than 0.
|
||||
|
||||

|
||||
|
||||
## Structure Property Settings
|
||||
|
||||
Expand the Properties of **O Cutout by Threshold**, where you can directly modify various property values, but they can only be set uniformly. We can use field-type data to assign differences. Take the color property as an example: for instance, connecting a Position node directly produces the effect shown below:
|
||||
|
||||

|
||||
|
||||
We can also map layer values to color gradients, which requires the **O Scalar Layer to Color** node (such conversion function nodes are all under Add > O Bioxel > Utilities in the node menu). Adjust as follows:
|
||||
|
||||
- **O Cutout by Threshold**: Set Threshold to 20
|
||||
- **O Scalar Layer to Color**: Set From Min and From Max to 20 and 90 respectively
|
||||
|
||||

|
||||
|
||||
Since soft tissue CT values are lower than bone tissue, when the threshold is lowered, you can see that in addition to the skull, the attached soft tissue is also presented. The From Min and From Max of **O Scalar Layer to Color** define the color mapping range from 0 to 1. Therefore, low-value soft tissue appears black, and high-value bone tissue appears white.
|
||||
|
||||
We can also customize the mapping method through the **Closure** node in Blender 5.0+. For example, connect a **Color Ramp** node to change the black area belonging to soft tissue to dark red:
|
||||
|
||||

|
||||
|
||||
Ta-da! The anatomical rendering is done!
|
||||
|
||||
Other "Structure" properties can also be adjusted in this way. In addition to **O Scalar Layer to Color**, there is also **O Scalar Layer to Factor** to convert to a single value from 0 to 1.
|
||||
49
docs/advanced.md
Normal file
@@ -0,0 +1,49 @@
|
||||
# 高级玩法
|
||||
|
||||
## 切割「结构体」
|
||||
|
||||
「结构体」可以被切割,呈现部分结构,通过 O Cut 系列节点完成。比如按下图添加 **O Cut to Region** 节点并连接,添加任意来自场景的物体作为「区域」,输入到节点:
|
||||
|
||||

|
||||
|
||||
适当调整作为「区域」物体的位置旋转,可以看到头骨结构被限制在区域范围内。
|
||||
|
||||
!!! note
|
||||
插件提供快速让物体虚化的功能,在 3D 视图模式下,右键「区域」物体,菜单选择 **Bioxel Nodes > Toggle Phantom**
|
||||
|
||||
!!! warning
|
||||
切割会增加计算量,影响实时性能,勾选 O Layer 的 Resample 来提高性能
|
||||
|
||||
|
||||
|
||||
**O Cut Small Parts** 节点,是清理神器,能快速把零碎的结构删除,只干净连续的大结构。但是计算特别耗时,注意性能。
|
||||
|
||||

|
||||
|
||||
如果你对几何节点很了解,你也可以通过 **O Cut Structure** 直接定义切割的执行范围,比如下图中,选择切割位置 X 大于 0 的部分。
|
||||
|
||||

|
||||
|
||||
|
||||
## 「结构体」属性设置
|
||||
|
||||
展开 **O Cutout by Threshold** 的 Properties,你可以直接修改各项属性值,但都只能均一设置,我们可以用场类型数据赋予差异。以颜色属性为例,比如直接接入 Position 节点,效果如下:
|
||||
|
||||

|
||||
|
||||
我们还可以把数据层的值映射为颜色渐变,这里需要用到 **O Scalar Layer to Color** 节点(这类转换功能的节点都在节点菜单,Add > O Bioxel > Utilities 下)。调整如下
|
||||
|
||||
- **O Cutout by Threshold**:Threshold 设置为 20
|
||||
- **O Scalar Layer to Color**:From Min 和 From Max 分别设置为 20 和 90
|
||||
|
||||

|
||||
|
||||
由于软组织的 CT 值小于骨质,当阈值降低,可以看到除了头骨外,附着的软组织也被呈现了出来。**O Scalar Layer to Color** 的 From Min 和 From Max,定义了颜色从 0~1 的取值范围。因此低值的软组织呈现黑色,高值的骨质呈现白色
|
||||
|
||||
我们还可以通过 Blender 5.0+ 的 **Closure** 节点来自定义映射方式。比如连接 **Color Ramp** 节点,把属于软组织的黑区,改为暗红色
|
||||
|
||||

|
||||
|
||||
哒哒!解剖渲染就做好啦👍
|
||||
|
||||
其他「结构体」属性也可以按这样的方式调整,除了 **O Scalar Layer to Color**,还有 **O Scalar Layer to Factor** 来转换为 0~1 的单值
|
||||
@@ -1,118 +0,0 @@
|
||||
# Advanced Usage
|
||||
|
||||
## Concepts
|
||||
|
||||
In the previous section, I mentioned some key concepts, I'll describe them in detail so that you can better understand the following operations.
|
||||
|
||||
### Container
|
||||
|
||||
First is the **Container**, it is the easiest to describe, you can think of it as a scene, or a solver container. it is the stage that carries all stuffs.
|
||||
|
||||
### Layer
|
||||
|
||||
Second is the **Layer**, which represents different fields of data under the same location in container of the same subject. Just as view layers in any map app, one as roads, one as satellite view, while in Bioxel, one as MRI, one as CT, one as electrical signals, etc. Some layers are for material, such as color, density, etc., we call them **Material Layer**. One container contains different layers of one subject each. Any external data imported into the container is converted into the layer.
|
||||
|
||||
### Component
|
||||
|
||||
Finally, the **Component**, which is a fragment of **Material Layer**. Multiple materials (Matters) may exist within the same area with different meanings of presentation, like objects in blender, each representing a part of the scene. Bioxel Nodes provides a series of nodes and tools that allow the user to create material layers (Components) based on the other layers (serve as source data), In the previous section, we used the CT data (layer) to make the material (matter) of skull, this process known as materialization.
|
||||
|
||||
## Attache the Muscles to the Skull
|
||||
|
||||
Multiple components can exist in one container, just as multiple objects can exist in one scene. They can be controlled individually or combined with each other to build complex scenes. Next, let's try cutouting muscle from the VHP anatomical images and attaching the muscles to the skull that created in the previous section. The anatomical images are very large, so I've cropped and scaled them down to 1/4 of their original size for ease of use. Download the file and unzip it into a new directory.
|
||||
|
||||
[VHP_M_AnatomicalImages_Head.zip](https://drive.google.com/file/d/164AjQX0tmgUpWZlleJ5i1IKHco4ytDu2/view?usp=drive_link)
|
||||
|
||||
You can also download the data directly from the official website, [https://data.lhncbc.nlm.nih.gov/public/Visible-Human/Male-Images/PNG_format/head/index.html](https://data.lhncbc.nlm.nih.gov/public/Visible-Human/Male-Images/PNG_format/head/index.html)
|
||||
|
||||
First import the CT data as described in [step by step](step_by_step.md). Then import the anatomical images, but unlike before, this time from the Geometry Nodes menu of the existing container (not the top menu), click **Bioxel Nodes > Import Volumetric Data (Init) > as Color**, locate to the unzipped folder, and select any .png file (do not multi-select, and do not select the folder). This way the imported layer will be in the same container as the previous CT data. You can also import by dragging it into the container geometry node interface instead of the 3D Viewport interface. Also note that **as Color** (not as Scalar) is clicked because the anatomical images are RGB data.
|
||||
|
||||

|
||||
|
||||
Let's take more time in the import options this time 🫡, first let's talk about what the **Original Spacing** is in the options, you can simply think of it as the original "pixel size" of a image, since the volume is 3D, its pixels (i.e., voxels) are cuboids with a length, width, and height rather than 2D rectangles. And their length, width, and height size is the **Spacing**.
|
||||
|
||||
Normally, Bioxel Nodes can read the spacing from the data header, and you don't need to fill in the value, but there is no record of that in any PNG image, so you need to input it manually. in the official description of the VHP, it is mentioned that each pixel of the anatomical images corresponds to the size of .33mm, and the thickness of each slice is 1mm, so the Original Spacing of the anatomical images should be set to `(0.33, 0.33, 1)`.
|
||||
|
||||
However, the file I provided is scaled by 1/4 for each image, so the X and Y axes need to be multiplied by 4. So the final Original Spacing should be set to `(1.33, 1.33, 1)`, which should be understandable, right? (If you are importing an official file, then it should still be set to `(0.33, 0.33, 1)`)
|
||||
Layer Name should be set to "Anatomical Images", other options remain default, click Ok.
|
||||
|
||||

|
||||
|
||||
After importing, connect the "Cutout by Hue" node (Add > Bioxel Nodes > Component > Cutout by Hue) after the newly created "Fetch Layer" node, and turn on the Slice Viewer mode preview, as shown below.
|
||||
|
||||

|
||||
|
||||
In addition to spacing, the Dicom file also records the subject's position and orientation, but those information is apparently not recorded in PNG format. This results in a mismatch between the CT data and the anatomical images in position. We need to manually align this two layers: First, set the threshold of the "Cutout by Threshold" node to 0.2 so that the full head can be cutouted and displayed. Then add "ReCenter" node before "Cutout by Hue" node and "Cutout by Threshold" node each, then add Locater to the "anatomical images" workflow (see [step by step](step_by_step.md) for details), and finally add "Join Component" node (Add > Bioxel Nodes > Component > Join Component), and connect them as shown below, with the parameters set as shown.
|
||||
|
||||

|
||||
|
||||
The "Join Component" node allows you to merge two components together. Move and rotate the Locater object so that the two components are exactly the same in position. If you're having trouble matching them up, here's the exact transform values to fill in the Locater object properties.
|
||||
|
||||

|
||||
|
||||
Next let's cutout the muscles individually.
|
||||
|
||||
First let's talk about the "Cutout by Hue" node. Literally, it cutout regions by hue of color. If you select this node and press "M" key to temporarily mute it, you'll see that the data becomes a cube with blue parts in Slice Viewer mode. the default value of Hue in the "Cutout by Hue" node is red, meaning that the node retains areas of the body that are close to red, and strip out the blue, which is on the opposite side of the red in the hue ring, leaving the human body parts.
|
||||
|
||||
If you turn down the value of Sensitivity, you'll see that the visabile part is decreasing, leaving only the part more closer to red, and the muscle happens to be red, so we can easily cutout the muscle. The color of the specimen tissue is not as vibrant as it is in the live state, and we can fine-tune the color to restore the vibrancy by using the "Set Color by Color" node (Add > Bioxel Nodes > Property > Set Color by Color).
|
||||
|
||||
To finally put it all together, connect and set the nodes as shown below, where the two colors in "Set Color by Ramp 2" node are `E7D2C5` and `FFEDEC`. If everything is working correctly, you'll get the rendering below.
|
||||
|
||||

|
||||
|
||||
You can also add "Transfrom" and "Cutter" nodes at the end and all components.
|
||||
|
||||

|
||||
|
||||
The multimodal data of VHP do not have any deformation or scaling differences, but only positional differences, so all data can be aligned easily. However, in most cases, the differences of different modalities are so great that they need to be registered first, which is not possible with Bioxel Nodes at the moment (but it is in plan). Nevertheless, you can build different components based on the same layer and combine them together. For example, based on the CT data, with the "Cutout by Range" node, you can eliminate the low value regions (fat), eliminate the high value regions (bone), and you can still get the muscle. And then attach it to the skull.
|
||||
|
||||

|
||||
|
||||
However, the CT values of brain and muscle are very close to each other, so it is extremely difficult to separate the brain from the muscle by threshold. So how should cutout the brain?
|
||||
|
||||
## Cutout the Brain
|
||||
|
||||
We can use AI technology to realize the division of brain regions, this process is called Segmentation, and the brain regions are as label. There are many models and methods for medical image segmentation, here we recommend [Total Segmentator](https://github.com/wasserth/TotalSegmentator).
|
||||
|
||||
It is an out-of-the-box CT/MRI medical image segmentation Python library. You can deploy Total Segmentator locally or process your data through the official online site [https://totalsegmentator.com](https://totalsegmentator.com).
|
||||
|
||||
Let me demonstrate the operation, we are still using the CT data from VHP. Click on "Drop DICOM.zip or ..." and select the VHP_M_CT_Head.zip file. Enter "brain" below "Selected task", press Enter to confirm. Finally click "Process data" button.
|
||||
|
||||

|
||||
|
||||
Wait for the uploading and processing, after all, you will be redirected to the following page, click "Download results" button, download and unzip segmentations.zip to any folder directory.
|
||||
|
||||

|
||||
|
||||
In case you can't get the brain segment (label), you can download it directly (without unzipping it).
|
||||
|
||||
[VHP_M_CT_Head_Brain.nii.gz](https://drive.google.com/file/d/1KGiZ3G11YLXkGszSrvWQ9kTF4TMpxUPd/view?usp=drive_link)
|
||||
|
||||
Next we import the brain segment (label) into the container in the same way as we imported the anatomical imagess(under the same container), but this time selecting **as Label**, with the Layer Name set to "Brain", and leaving the other options as default. Once the import is complete, a new "Fetch Layer" node will be added. Create and set the node as shown below, and you should be able to see the surface of brain.
|
||||
|
||||

|
||||
|
||||
Do you see the "step" like shape on surface? this is due to the low precision of the AI segmentation results. So How to addressing the issue? Select the Fetch Layer node of the brain label, right-click to pop up menu, click **Bioxel Nodes > Resample Value**, in the dialog box, change the "Smooth Size" to 3 or higher (the higher it is, the slower the calculation will be), click OK and wait for the calculation to finish. When it is done, a new layer will be added, replace the original one, is it smoother? The following figure lists different levels of smoothing.
|
||||
|
||||

|
||||
|
||||
The smoother it is, the more comfortable it looks, but it also means that more details are lost and the calculation is slower.
|
||||
|
||||
But if you cut the brain, you will find that the cross-section is homogeneous, this is because the label type layer is does not contain any modality data itself. Bioxel Nodes provides a function to fill in any layer values by label, if you set the value below brain tissue in the non-brain region of CT data, then any "Cutout" node will only keep the brain region.
|
||||
|
||||
The operation is like this, select the "Fetch Layer" node of the CT data, right-click to pop up the menu, click **Bioxel Nodes > Fill Value by Label**, in the dialog box, Label is set to the newly imported brain label layer, Fill Value is set to -100 (as long as it is less than the Hu value of the brain tissue), click OK. wait for the data processing, a new data layer will be added to the container when it is finished.
|
||||
|
||||
As shown in the following figure, connect the nodes and set the node parameters, in which the two colors of "Set Color by Ramp 2" node are `B26267` and `EBC5B7`, and the "Cutout by Range" and "Set Color by Ramp 2" node are changed to "Value" mode (the default is "Factor" mode), because the maximum and minimum values of the brain are too close to each other and difficult to adjust in "Factor" mode. To make the brain tissue look more transparent, I add the "Set Properties" (Add > Bioxel Nodes > Property > Set Properties) node at the end and changed the "Density" to 0.5.
|
||||
|
||||

|
||||
|
||||
(Still feel not smooth enough? It's really hard to get rid of "step" surface completely at the moment)
|
||||
|
||||
Now the brain is done. Finally we combine all together and you get something like the following.
|
||||
|
||||

|
||||
|
||||
🤗 If you've followed the docs up to this point, give yourself a round of applause, you've mastered this addon! If you have trouble following the docs instruction, you can download the project files to understand how the nodes work.
|
||||
|
||||
[VHP.zip](https://drive.google.com/file/d/1EHB7sxNSvJNwmoTfFnpyOSsm2M_2Y0hO/view?usp=sharing)
|
||||
|
||||
AI segmentation is an essential part of volumetric data visualization. Therefore, the future Bioxel Nodes will integrate some commonly used AI segmentation models, so that users can complete the volumetric data visualization in place!
|
||||
BIN
docs/assets/add-o-layer.png
LFS
Normal file
BIN
docs/assets/adjust-nodes.png
LFS
Normal file
|
Before Width: | Height: | Size: 41 KiB |
|
Before Width: | Height: | Size: 185 KiB |
|
Before Width: | Height: | Size: 326 KiB |
|
Before Width: | Height: | Size: 288 KiB |
|
Before Width: | Height: | Size: 412 KiB |
|
Before Width: | Height: | Size: 337 KiB |
|
Before Width: | Height: | Size: 328 KiB |
|
Before Width: | Height: | Size: 505 KiB |
|
Before Width: | Height: | Size: 340 KiB |
|
Before Width: | Height: | Size: 369 KiB |
|
Before Width: | Height: | Size: 343 KiB |
|
Before Width: | Height: | Size: 338 KiB |
|
Before Width: | Height: | Size: 351 KiB |
|
Before Width: | Height: | Size: 76 KiB |
BIN
docs/assets/connect-nodes.png
LFS
Normal file
BIN
docs/assets/cut-small-parts.png
LFS
Normal file
BIN
docs/assets/cut-structure.png
LFS
Normal file
BIN
docs/assets/cut-to-region.png
LFS
Normal file
BIN
docs/assets/import-data.png
LFS
Normal file
|
Before Width: | Height: | Size: 1.3 MiB |
|
Before Width: | Height: | Size: 903 KiB |
|
Before Width: | Height: | Size: 126 KiB |
BIN
docs/assets/installation.png
LFS
Normal file
|
Before Width: | Height: | Size: 40 KiB |
BIN
docs/assets/render-performance.png
LFS
Normal file
BIN
docs/assets/scalar-to-color-ramp.png
LFS
Normal file
BIN
docs/assets/scalar-to-color.png
LFS
Normal file
BIN
docs/assets/set-color-by-pos.png
LFS
Normal file
|
Before Width: | Height: | Size: 177 KiB |
|
Before Width: | Height: | Size: 278 KiB |
|
Before Width: | Height: | Size: 284 KiB |
|
Before Width: | Height: | Size: 311 KiB |
|
Before Width: | Height: | Size: 369 KiB |
|
Before Width: | Height: | Size: 350 KiB |
|
Before Width: | Height: | Size: 320 KiB |
|
Before Width: | Height: | Size: 314 KiB |
|
Before Width: | Height: | Size: 83 KiB |
|
Before Width: | Height: | Size: 86 KiB |
50
docs/basics.en.md
Normal file
@@ -0,0 +1,50 @@
|
||||
# Bacsic Usage
|
||||
|
||||
## 1. Download Data
|
||||
|
||||
Download and unzip [VHP_M_CT_Head.zip](https://drive.google.com/file/d/1bBGpt5pQ0evr-0-f4KDNRnKPoUYj2bJ-/view?usp=drive_link) to a folder.
|
||||
The data comes from [Visible Human Project (VHP)](https://www.nlm.nih.gov/research/visible/visible_human.html), which is a CT scan image of a male head.
|
||||
|
||||
## 2. Import as "Layer"
|
||||
|
||||
Add a geometry node to the cube and open the geometry node interface sidebar. Switch to the Bioxel Nodes tab (1), click the Import Data button (2), and in the file selection dialog, choose any `.dcm` file from the data folder (3), then click the Import Data button (4).
|
||||
|
||||

|
||||
|
||||
Two dialogs will pop up in sequence, click OK for both. Wait for the data import (you can check the progress bar in the Blender interface status bar at the bottom right). After success, you will see a data preview in the Bioxel Nodes sidebar. Click the Add button at the bottom (1), move the mouse to the node panel, and place the **O Layer** node (2).
|
||||
|
||||

|
||||
|
||||
The data import is complete!
|
||||
|
||||
The data cache is saved as a link in the Blender file in the form of a "Layer", and the "Layer" is loaded into geometry nodes through the **O Layer** node. Their relationship is as follows:
|
||||
|
||||
Data Cache -> Layer -> O Layer
|
||||
|
||||
## 3. Extract and Render "Structure"
|
||||
|
||||
Operations on "Layer" are done through the O Bioxel series geometry nodes.
|
||||
|
||||
We need two additional nodes: **O Cutout by Threshold** and **O Realize Structure** nodes (both are in the node menu under Add > O Bioxel > Structure), and connect them as shown below:
|
||||
|
||||

|
||||
|
||||
If successful, you will see a gray head appear in the viewport. Now let's adjust the node parameters:
|
||||
|
||||
- **O Layer**: Check Center, uncheck Resample
|
||||
- **O Cutout by Threshold**: Set Threshold to 90
|
||||
- **O Realize Structure**: Set Density to 40, check Surface
|
||||
|
||||
Rotate the object, adjust the light position, set the renderer to Cycles, and the final effect is shown below:
|
||||
|
||||

|
||||
|
||||
Now we have completed the volumetric rendering of the head CT data!
|
||||
|
||||
Let's review the execution logic: First, cutout the "Structure" from the "Layer". As the name suggests, "Structure" is responsible for storing biological tissue structure, but its data type is volumetric and cannot be seen directly. It requires **O Realize Structure** to present the "Structure".
|
||||
|
||||
## 4. Save Data Cache (Optional)
|
||||
|
||||
Since the data cache is only saved as a link in the Blender file, passing only the Blender file to other devices will cause the "Layer" to lose its cache. Click the Save button in the Bioxel Nodes tab, and select a location to save the data cache to manage the cache resource.
|
||||
|
||||
Just like images, when sharing, send both the data cache and the Blender file together.
|
||||
51
docs/basics.md
Normal file
@@ -0,0 +1,51 @@
|
||||
# 入门
|
||||
|
||||
## 1. 下载数据
|
||||
|
||||
下载并解压到文件夹中 [VHP_M_CT_Head.zip](https://drive.google.com/file/d/1bBGpt5pQ0evr-0-f4KDNRnKPoUYj2bJ-/view?usp=drive_link)
|
||||
数据来自 [Visible Human Project (VHP)](https://www.nlm.nih.gov/research/visible/visible_human.html)这是一个男性头部的 CT 扫描图像
|
||||
|
||||
## 2. 导入为「数据层」
|
||||
|
||||
给立方体添加几何节点,并打开几何节点界面侧边栏。切换到 Bioxel Nodes 分页(1),点击 Import Data 按钮(2),在文件选择对话框中,选择数据文件夹中任意一个`.dcm`文件(3),点击 Import Data 按钮(4)
|
||||
|
||||

|
||||
|
||||
依次会弹出两个对话框,都点击 OK 按钮,等待数据导入(可查看 Blender 界面右下角状态栏的进度条)成功后可以看到 Bioxel Nodes 侧边栏多了数据预览画面。点击下方的 Add 按钮(1),鼠标移动到节点面板,放置 **O Layer** 节点(2)
|
||||
|
||||

|
||||
|
||||
数据的导入就完成啦👍
|
||||
|
||||
数据缓存在主目录里,以「数据层(Layer)」形式添加在 Blender 文件中,「数据层」通过 **O Layer** 节点装载到几何节点。它们的关系如下:
|
||||
|
||||
数据缓存 -> 数据层 -> O Layer
|
||||
|
||||
|
||||
## 3. 提取并渲染「结构体」
|
||||
|
||||
对「数据层」的操作通过 O Bioxel 系列几何节点完成。
|
||||
|
||||
我们需要额外两个节点,**O Cutout by Threshold** 和 **O Realize Structure** 节点(它们都在节点菜单,Add > O Bioxel > Structure 下),并按下图连接:
|
||||
|
||||

|
||||
|
||||
如果成功,可以看到视图中出现了灰色的头部。接下来我们调整节点参数:
|
||||
|
||||
- **O Layer**:勾选 Center,取消 Resample
|
||||
- **O Cutout by Threshold**:Threshold 设置为 90
|
||||
- **O Realize Structure**:Density 设置为 40,勾选 Surface
|
||||
|
||||
调整物体转向、灯位置,设置渲染器为 Cycles,最终效果如下图:
|
||||
|
||||

|
||||
|
||||
这样我们就完成了头部 CT 数据的体积渲染👍
|
||||
|
||||
简单捋一下执行逻辑,「数据层」先被剪出(Cutout)为「结构体」。「结构体」顾名思义就是负责储存生物组织结构的对象,但它本身数据类型是体积,并不能直接被看到。需要 **O Realize Structure** 来呈现「结构体」
|
||||
|
||||
## 4. 另存数据缓存(可选)
|
||||
|
||||
由于数据缓存只是以链接形式保存在 Blender 文件中,所以只传递 Blender 文件给其他设备,会导致「数据层」遗失缓存。点击 Bioxel Nodes 分页中 Save 按钮,选择数据缓存的另存位置来管理缓存资源。
|
||||
|
||||
就像图片一样,传递时把数据缓存和 Blender 文件一起发送。
|
||||
39
docs/dataset.md
Normal file
@@ -0,0 +1,39 @@
|
||||
# 支持的格式
|
||||
|
||||
迫不及待想使用自己的数据来体验插件了?以下是当前支持的格式列表。
|
||||
|
||||
| 格式 | 扩展名 |
|
||||
| ------ | ---------------------------------------- |
|
||||
| DICOM | .dcm, .DCM, .DICOM, .ima, .IMA |
|
||||
| BMP | .bmp, .BMP |
|
||||
| JPEG | .jpg, .JPG, .jpeg, .JPEG |
|
||||
| PNG | .png, .PNG |
|
||||
| TIFF | .tif, .TIF, .tiff, .TIFF |
|
||||
| Nifti | .nia, .nii, .nii.gz, .hdr, .img, .img.gz |
|
||||
| Nrrd | .nrrd, .nhdr |
|
||||
| HDF5 | .hdf, .h4, .hdf4, .he2, .h5, .hdf5, .he5 |
|
||||
| OME | .ome.tiff, .ome.tif |
|
||||
| MRC | .mrc, .mrc.gz, .map, .map.gz |
|
||||
|
||||
尽管我尽了最大努力,仍然无法实现对所有体数据格式的完美支持,我将持续努力改进。
|
||||
|
||||
## 公开数据库
|
||||
|
||||
如果您没有体数据,可以从一些公开数据库下载。
|
||||
|
||||
**请注意,虽然它们是公开的且可供下载,但并不意味着您可以将其用于任何目的!请务必查看网站上的可用范围说明。**
|
||||
|
||||
| 来源 | 对象 |
|
||||
| ------------------------------------------------------------------------------------ | ------------------ |
|
||||
| [MorphoSource](https://www.morphosource.org/) | 开放研究数据 |
|
||||
| [Dryad](https://datadryad.org) | 开放研究数据 |
|
||||
| [Cell Image Library](http://cellimagelibrary.org/home) | 细胞 |
|
||||
| [OpenOrganelle](https://openorganelle.janelia.org/datasets) | 细胞 |
|
||||
| [Allen Cell Explorer](https://www.allencell.org/3d-cell-viewer.html) | 细胞 |
|
||||
| [EMDB](https://www.ebi.ac.uk/emdb/) | 蛋白质、病毒 |
|
||||
| [IDC](https://portal.imaging.datacommons.cancer.gov/explore/) | 医学图像 |
|
||||
| [Embodi3D](https://www.embodi3d.com/files/category/37-medical-scans/) | 医学图像 |
|
||||
| [Github](https://github.com/sfikas/medical-imaging-datasets) | 医学图像 |
|
||||
| [NIHR](https://nhsx.github.io/open-source-imaging-data-sets/) | 医学图像 |
|
||||
| [Medical Segmentation Decathlon](http://medicaldecathlon.com/) | 医学图像 |
|
||||
| [Visible Human Project](https://www.nih.gov/research/visible/visible_human.html) | 医学图像 |
|
||||
15
docs/faq.en.md
Normal file
@@ -0,0 +1,15 @@
|
||||
# FAQ
|
||||
|
||||
## Nothing in the scene when rendering?
|
||||
|
||||
If you're using the Cycles renderer with GPU, make sure your GPU supports "Optix", as Bioxel Nodes relies on OSL (Open shader language) for volumetric rendering, otherwise you'll have to use the CPU for rendering.
|
||||
|
||||
If you're using the EEVEE renderer, this issue is due to EEVEE not loading shaders for some unknown reason, save the file and restart Blender to fix it.
|
||||
|
||||
## After updating the addon, the nodes in the file have turned red?
|
||||
|
||||
This is because the version of the nodes in the file does not match the current version of the addon after updating.
|
||||
|
||||
If you still want to edit the file with Bioxel Nodes, you can only roll back the addon version to the version that corresponds to the nodes.
|
||||
|
||||
If you just want the file to work and you won't rely on Bioxel Nodes any more, then you can just click **Bioxel Nodes > Relink Node Library >** in the top menu and select the corresponding version. Check to see if the nodes are working and rendering properly, and when everything is OK, click **Bioxel Nodes > Save Node Library** and select the save location in the dialog box.
|
||||
16
docs/faq.md
@@ -1,15 +1,15 @@
|
||||
# FAQ
|
||||
# 常见问题
|
||||
|
||||
## Nothing in the scene when rendering?
|
||||
## 渲染时场景什么都没有?
|
||||
|
||||
If you're using the Cycles renderer with GPU, make sure your GPU supports "Optix", as Bioxel Nodes relies on OSL (Open shader language) for volumetric rendering, otherwise you'll have to use the CPU for rendering.
|
||||
如果您使用 GPU 进行 Cycles 渲染,请确保您的 GPU 支持"Optix",因为 Bioxel Nodes 依赖 OSL(Open Shader Language)进行体渲染,否则您必须使用 CPU 进行渲染。
|
||||
|
||||
If you're using the EEVEE renderer, this issue is due to EEVEE not loading shaders for some unknown reason, save the file and restart Blender to fix it.
|
||||
如果您使用 EEVEE 渲染器,此问题是因为 EEVEE 出于未知原因未加载着色器,保存文件并重启 Blender 即可修复。
|
||||
|
||||
## After updating the addon, the nodes in the file have turned red?
|
||||
## 更新插件后,文件中的节点变红了?
|
||||
|
||||
This is because the version of the nodes in the file does not match the current version of the addon after updating.
|
||||
这是因为文件中节点的版本与更新后插件的版本不匹配。
|
||||
|
||||
If you still want to edit the file with Bioxel Nodes, you can only roll back the addon version to the version that corresponds to the nodes.
|
||||
如果您仍想使用 Bioxel Nodes 编辑文件,只能将插件回滚到与节点对应的版本。
|
||||
|
||||
If you just want the file to work and you won't rely on Bioxel Nodes any more, then you can just click **Bioxel Nodes > Relink Node Library >** in the top menu and select the corresponding version. Check to see if the nodes are working and rendering properly, and when everything is OK, click **Bioxel Nodes > Save Node Library** and select the save location in the dialog box.
|
||||
如果您只想让文件正常工作,不再依赖 Bioxel Nodes,那么您只需点击顶部菜单 **Bioxel Nodes > Relink Node Library >**,然后选择相应的版本。检查节点是否正常工作并正确渲染,一切正常后,点击 **Bioxel Nodes > Save Node Library**,在对话框中选择保存位置。
|
||||
0
docs/gallery.md
Normal file
@@ -1,39 +0,0 @@
|
||||
# Improve Performance
|
||||
|
||||
Volume reconstruction and volume rendering are very consuming computation, I believe that this add-on's experience is terrible on poorly hardware. here are tips to improve the add-on performance.
|
||||
|
||||
## Use Low-Res Data as Preview
|
||||
|
||||
The addon provides data resample function, the operation is as follows. First, in the container's geometry node, select the layer you need to resample, right-click **Bioxel Nodes > Resample Value**, in the dialog box, change the "Bioxel Size" value to twice or more than the current value, click OK. the addon will create a low-res version of the layer and load it into the container's geometry node.
|
||||
|
||||

|
||||
|
||||
You can see that the speed of the reconstruction has been reduced from 240 ms to 37 ms, making it possible to compute in almost real-time, and improving the speed of the feedback of the changing the parameters. Once you are satisfied with the adjustment, you can then connect the original layer to the nodes. This tip can greatly improve the operation experience of the node.
|
||||
|
||||
## Raise the Step Rate of a Container
|
||||
|
||||
Step rate is a key setting in volume rendering. The higher the step rate, the faster the rendering will be, but at the same time, the thinner the volume will look. If you want to have a very thin effect, or if you don't need to cut through component, you can always set the step rate high, you can adjust step rate in the render settings globaly. However, I recommend you to adjust the step rate of the container separately, so that it doesn't affect the rendering of the other volume in the Blender file, do as follows.
|
||||
|
||||
In the container's geometry nodes panel menu, click **Bioxel Nodes > Change Container Properties**, in the dialog box, raise the "Step Rate" value (up to 100) and click OK.
|
||||
|
||||

|
||||
|
||||
You can see that the rendering speed is much higher, but at the same time the cuts look blurry and transparent.
|
||||
|
||||
## Balance rendering settings
|
||||
|
||||
I list some of the settings that affect the volume rendering most, so you can find the most balanced settings for your needs.
|
||||
|
||||
- **Light Paths > Max Bounces > Volume** affects the number of bounces a volume has, the higher the value, the more transparent it will look.
|
||||
|
||||
- **Light Paths > Max Bounces > Transparent** affects the number of times transparent surfaces are transmitted, the higher the value, the more transparent it will look.
|
||||
|
||||
- **Volumes > Step Rate Render | Viewport** affects the volume rendering step, the smaller the value, the more detailed the volume will look
|
||||
|
||||
Bioxel Nodes provides some render setting presets for quick setup. In the top menu, click **Bioxel Nodes > Render Setting Presets**, including Performance (left), Balance (center), and Quality (right). Here is a comparison of them.
|
||||
|
||||

|
||||
|
||||
## Rendering with EEVEE
|
||||
|
||||
EEVEE doesn't render volume as well as Cycles, but it does have the advantage of rendering the volumetric data, and is even a better choice if you want to get a clear view of slice. And EEVEE's real-time rendering make it possible to create interactive stuff in Blender.
|
||||
66
docs/index.en.md
Normal file
@@ -0,0 +1,66 @@
|
||||
**v2.0.x has been released, supporting only Blender 5.0+. The usage is completely different from before and is not compatible with old version files. See http://docs.omoolab.xyz/bioxelnodes/2.0.x/en/basics/**
|
||||
|
||||
# Bioxel Nodes
|
||||
|
||||
[](https://blender.org/)
|
||||

|
||||

|
||||

|
||||
|
||||
[](https://discord.gg/pYkNyq2TjE)
|
||||
|
||||
Bioxel Nodes is a Blender addon for scientific volumetric data visualization. It using Blender's powerful **Geometry Nodes** and **Cycles** to process and render volumetric data.
|
||||
|
||||

|
||||
|
||||
- Realistic rendering result, also support EEVEE NEXT.
|
||||
- Support multiple formats.
|
||||
- Support 4D volumetric data.
|
||||
- All kinds of cutters.
|
||||
- Simple and powerful nodes.
|
||||
- Based on blender natively, can work without addon.
|
||||
|
||||
**Read the [getting started](https://docs.omoolab.xyz/bioxelnodes/latest/en/installation) to begin your journey into visualizing volumetric data!**
|
||||
|
||||
Welcome to our [discord server](https://discord.gg/pYkNyq2TjE), if you have any problems with this add-on.
|
||||
|
||||
## Support Multiple Formats
|
||||
|
||||
| Format | EXT |
|
||||
| ------ | ---------------------------------------- |
|
||||
| DICOM | .dcm, .DCM, .DICOM, .ima, .IMA |
|
||||
| BMP | .bmp, .BMP |
|
||||
| JPEG | .jpg, .JPG, .jpeg, .JPEG |
|
||||
| PNG | .png, .PNG |
|
||||
| TIFF | .tif, .TIF, .tiff, .TIFF |
|
||||
| Nifti | .nia, .nii, .nii.gz, .hdr, .img, .img.gz |
|
||||
| Nrrd | .nrrd, .nhdr |
|
||||
| HDF5 | .hdf, .h4, .hdf4, .he2, .h5, .hdf5, .he5 |
|
||||
| OME | .ome.tiff, .ome.tif |
|
||||
| MRC | .mrc, .mrc.gz, .map, .map.gz |
|
||||
|
||||
## Support 4D volumetric data
|
||||
|
||||

|
||||
|
||||
🥰 4D volumetric data can also be imported into Blender.
|
||||
|
||||
## Support EEVEE NEXT
|
||||
|
||||

|
||||
|
||||
👍 EEVEE NEXT is absolutely AWESOME! Bioxel Nodes is fully support EEVEE NEXT now! However, there are some limitations:
|
||||
|
||||
1. Only one cutter supported.
|
||||
2. EEVEE result is not that great as Cycles does.
|
||||
|
||||
## Known Limitations
|
||||
|
||||
- Only works with Cycles CPU , Cycles GPU (OptiX), EEVEE
|
||||
- Section surface cannot be generated when convert to mesh (will be supported soon)
|
||||
|
||||
## Roadmap
|
||||
|
||||
- Better multi-format import experience
|
||||
- One-click bake model with texture
|
||||
- AI Segmentation to Generate Labels
|
||||
@@ -1,4 +1,4 @@
|
||||
[中文文档](https://uj6xfhbzp0.feishu.cn/wiki/LPKEwjooSivxjskWHlCcQznjnNf?from=from_copylink)
|
||||
**v2.0.X 已发布,仅支持 Blender 5.0+,使用方式和之前截然不同,也无法兼容旧版本文件。使用方式查看 http://docs.omoolab.xyz/bioxelnodes/2.0.x/basics/**
|
||||
|
||||
# Bioxel Nodes
|
||||
|
||||
@@ -9,58 +9,58 @@
|
||||
|
||||
[](https://discord.gg/pYkNyq2TjE)
|
||||
|
||||
Bioxel Nodes is a Blender addon for scientific volumetric data visualization. It using Blender's powerful **Geometry Nodes** and **Cycles** to process and render volumetric data.
|
||||
Bioxel Nodes 是一款用于科学体数据可视化的 Blender 插件。它利用 Blender 强大的 **几何节点 (Geometry Nodes)** 和 **Cycles** 渲染器来处理和渲染体数据。
|
||||
|
||||

|
||||
|
||||
- Realistic rendering result, also support EEVEE NEXT.
|
||||
- Support multiple formats.
|
||||
- Support 4D volumetric data.
|
||||
- All kinds of cutters.
|
||||
- Simple and powerful nodes.
|
||||
- Based on blender natively, can work without addon.
|
||||
- 逼真的渲染效果,同时也支持 EEVEE NEXT
|
||||
- 支持多种数据格式
|
||||
- 支持 4D 体数据
|
||||
- 多种切割工具
|
||||
- 简洁而强大的节点系统
|
||||
- 基于 Blender 原生开发,插件卸载后仍可正常工作
|
||||
|
||||
**Read the [getting started](https://omoolab.github.io/BioxelNodes/latest/installation) to begin your journey into visualizing volumetric data!**
|
||||
**阅读[安装指南](installation.md)开始您的体数据可视化之旅!**
|
||||
|
||||
Welcome to our [discord server](https://discord.gg/pYkNyq2TjE), if you have any problems with this add-on.
|
||||
如果您在使用过程中遇到任何问题,欢迎加入我们的 [Discord 服务器](https://discord.gg/pYkNyq2TjE)。
|
||||
|
||||
## Support Multiple Formats
|
||||
## 支持多种格式
|
||||
|
||||
| Format | EXT |
|
||||
| ------ | ---------------------------------------- |
|
||||
| DICOM | .dcm, .DCM, .DICOM, .ima, .IMA |
|
||||
| BMP | .bmp, .BMP |
|
||||
| JPEG | .jpg, .JPG, .jpeg, .JPEG |
|
||||
| PNG | .png, .PNG |
|
||||
| TIFF | .tif, .TIF, .tiff, .TIFF |
|
||||
| Nifti | .nia, .nii, .nii.gz, .hdr, .img, .img.gz |
|
||||
| Nrrd | .nrrd, .nhdr |
|
||||
| HDF5 | .hdf, .h4, .hdf4, .he2, .h5, .hdf5, .he5 |
|
||||
| OME | .ome.tiff, .ome.tif |
|
||||
| MRC | .mrc, .mrc.gz, .map, .map.gz |
|
||||
| 格式 | 扩展名 |
|
||||
| ----- | ---------------------------------------- |
|
||||
| DICOM | .dcm, .DCM, .DICOM, .ima, .IMA |
|
||||
| BMP | .bmp, .BMP |
|
||||
| JPEG | .jpg, .JPG, .jpeg, .JPEG |
|
||||
| PNG | .png, .PNG |
|
||||
| TIFF | .tif, .TIF, .tiff, .TIFF |
|
||||
| Nifti | .nia, .nii, .nii.gz, .hdr, .img, .img.gz |
|
||||
| Nrrd | .nrrd, .nhdr |
|
||||
| HDF5 | .hdf, .h4, .hdf4, .he2, .h5, .hdf5, .he5 |
|
||||
| OME | .ome.tiff, .ome.tif |
|
||||
| MRC | .mrc, .mrc.gz, .map, .map.gz |
|
||||
|
||||
## Support 4D volumetric data
|
||||
## 支持 4D 体数据
|
||||
|
||||

|
||||
|
||||
🥰 4D volumetric data can also be imported into Blender.
|
||||
4D 体数据也可以导入到 Blender 中。
|
||||
|
||||
## Support EEVEE NEXT
|
||||
## 支持 EEVEE NEXT
|
||||
|
||||

|
||||
|
||||
👍 EEVEE NEXT is absolutely AWESOME! Bioxel Nodes is fully support EEVEE NEXT now! However, there are some limitations:
|
||||
EEVEE NEXT 太棒了!Bioxel Nodes 现在全面支持 EEVEE NEXT!但仍有以下限制:
|
||||
|
||||
1. Only one cutter supported.
|
||||
2. EEVEE result is not that great as Cycles does.
|
||||
1. 仅支持一个切割器
|
||||
2. EEVEE 渲染效果不如 Cycles
|
||||
|
||||
## Known Limitations
|
||||
## 已知限制
|
||||
|
||||
- Only works with Cycles CPU , Cycles GPU (OptiX), EEVEE
|
||||
- Section surface cannot be generated when convert to mesh (will be supported soon)
|
||||
- 仅支持 Cycles CPU、Cycles GPU (OptiX)、EEVEE
|
||||
- 转换为网格时无法生成剖面(即将支持)
|
||||
|
||||
## Roadmap
|
||||
## 路线图
|
||||
|
||||
- Better multi-format import experience
|
||||
- One-click bake model with texture
|
||||
- AI Segmentation to Generate Labels
|
||||
- 更完善的多格式导入体验
|
||||
- 一键烘焙带纹理模型
|
||||
- AI 分割生成标签
|
||||
|
||||
22
docs/installation.en.md
Normal file
@@ -0,0 +1,22 @@
|
||||
# Installation
|
||||
|
||||
!!! warning
|
||||
**v2.0.x only supports Blender 5.0 and above**
|
||||
|
||||
The add-on supports multiple installation methods, choose one.
|
||||
|
||||
## Blender Preferences (Recommended)
|
||||
|
||||
Click the top menu **Edit > Preferences**, search for "biox" in the "Get Extensions" area. Then click Install. Due to the large add-on size (60~100MB), you may need to wait for a while.
|
||||
|
||||

|
||||
|
||||
## Blender Official Extensions Website
|
||||
|
||||
Visit [https://extensions.blender.org/add-ons/bioxelnodes/](https://extensions.blender.org/add-ons/bioxelnodes/)
|
||||
Click Get Add-on, open Blender, drag the add-on into Blender and follow the prompts to install.
|
||||
|
||||
## Manual Installation
|
||||
|
||||
You can also download `BioxelNodes.{version}.zip` from [here](https://github.com/OmooLab/BioxelNodes/releases/latest) for manual installation.
|
||||
Click the top menu **Edit > Preferences**, select **Add-ons > Install from Disk**, then choose the Zip file you downloaded.
|
||||
@@ -1,19 +1,22 @@
|
||||
# Installation
|
||||
# 安装
|
||||
|
||||
**Currently only support Blender 4.2 or above, make sure you have the correct version of Blender.**
|
||||
!!! warning
|
||||
**v2.0.x 仅支持 Blender 5.0 及以上版本**
|
||||
|
||||
## Install in Blender (recommended)
|
||||
插件支持多种安装方式,选其中之一即可
|
||||
|
||||
This is the most recommended way, in the top menu, click **Edit > Preferences**, in "Get Extensions" Section, enter "bio" in the search box, then click Install. due to the add-on size (25MB~50MB) you may need to wait a while.
|
||||
## Blender 偏好设置(推荐)
|
||||
|
||||

|
||||
点击顶部菜单 **Edit > Preferences**,在 "Get Extensions" 区域搜索 "biox"。然后点击 Install。由于插件体积较大(60~100MB),可能需要等待一段时间。
|
||||
|
||||
## Blender Official Extensions Website
|
||||

|
||||
|
||||
Or you can visit the Blender official extensions website at [https://extensions.blender.org/add-ons/bioxelnodes/](https://extensions.blender.org/add-ons/bioxelnodes/)
|
||||
Click Get Add-on, open Blender, drag in Blender and follow the instructions to install.
|
||||
## Blender 官方扩展网站
|
||||
|
||||
## Manual Install
|
||||
访问 [https://extensions.blender.org/add-ons/bioxelnodes/](https://extensions.blender.org/add-ons/bioxelnodes/)
|
||||
点击 Get Add-on,打开 Blender,将插件拖入并按照提示安装。
|
||||
|
||||
You can also install _BioxelNodes\_{version}.zip_ manually by downloading from [bere](https://github.com/OmooLab/BioxelNodes/releases/latest).
|
||||
In the top menu, click **Edit > Preferences**, **Add-ons > Install from Disk** and select the Zip file you just downloaded.
|
||||
## 手动安装
|
||||
|
||||
您也可以从 [这里](https://github.com/OmooLab/BioxelNodes/releases/latest) 下载 `BioxelNodes.{version}.zip` 进行手动安装。
|
||||
点击顶部菜单 **Edit > Preferences**,选择 **Add-ons > Install from Disk**,然后选择您下载的 Zip 文件。
|
||||
|
||||
25
docs/performance.en.md
Normal file
@@ -0,0 +1,25 @@
|
||||
# Improve Performance
|
||||
|
||||
Voxel reconstruction and voxel rendering are very computation-intensive. Here are some tips to improve the add-on's performance.
|
||||
|
||||
## Use Low-Resolution Data as Preview
|
||||
|
||||
The resolution of voxels geometrically affects computational efficiency. Enabling Resample on O Layer can greatly improve calculation speed. You can uncheck it when you need to render for real. The Layer Nodes panel in the Bioxel Nodes tab lists all O Layers added in the current geometry nodes. You can uniformly manage whether Resample is enabled and the degree of resampling.
|
||||
|
||||
## Balanced Rendering Settings
|
||||
|
||||
I list some settings that have the greatest impact on volume rendering, so you can find the most suitable balance for your needs.
|
||||
|
||||
- **Light Paths > Max Bounces > Volume** affects the number of bounces for volume data. The higher the value, the more transparent the volume data appears.
|
||||
|
||||
- **Light Paths > Max Bounces > Transparent** affects the number of times transparent surfaces are transmitted. The higher the value, the more transparent the transparent surfaces appear.
|
||||
|
||||
- **Volumes > Step Rate Render | Viewport** affects the step size of volume rendering. The smaller the value, the more detailed the volume data appears.
|
||||
|
||||
Bioxel Nodes provides some render setting presets for quick configuration. Click the top menu **Bioxel Nodes > Render Setting Presets**, including Performance (left), Balance (center), and Quality (right). Here is a comparison:
|
||||
|
||||

|
||||
|
||||
## Rendering with EEVEE
|
||||
|
||||
EEVEE doesn't render volume as well as Cycles, but it does have the advantage of rendering volumetric data. If you want to get a clear slice view, it is even a better choice. EEVEE's real-time rendering makes it possible to create interactive content in Blender.
|
||||
25
docs/performance.md
Normal file
@@ -0,0 +1,25 @@
|
||||
# 提升性能
|
||||
|
||||
体素重建和体素渲染是非常消耗计算资源的,以下是一些提升插件性能的建议。
|
||||
|
||||
## 使用低分辨率数据作为预览
|
||||
|
||||
体素的分辨率几何倍地影响计算效率,O Layer 的 Resample 开启可以大大提高计算速度。当你需要正式渲染的时候再关闭即可。在 Bioxel Nodes 分页的 Layer Nodes 面板罗列了当前几何节点中添加的所有 O Layer,你可以统一管理是否开启 Resample,以及程度。
|
||||
|
||||
## 平衡的渲染设置
|
||||
|
||||
我列出了一些对体渲染影响最大的设置,以便您找到最适合自己的平衡点。
|
||||
|
||||
- **Light Paths > Max Bounces > Volume** 影响体数据的反弹次数,值越高,体数据看起来越透明。
|
||||
|
||||
- **Light Paths > Max Bounces > Transparent** 影响透明表面透射的次数,值越高,透明表面看起来越透明。
|
||||
|
||||
- **Volumes > Step Rate Render | Viewport** 影响体渲染的步长,值越小,体数据看起来越精细。
|
||||
|
||||
Bioxel Nodes 提供了一些渲染设置预设以便快速配置。点击顶部菜单 **Bioxel Nodes > Render Setting Presets**,包括 Performance(左侧)、Balance(中间)和 Quality(右侧)。以下是它们的比较。
|
||||
|
||||

|
||||
|
||||
## 使用 EEVEE 渲染
|
||||
|
||||
EEVEE 渲染体数据不如 Cycles,但它确实有渲染体数据的优势,如果您想获得清晰的切片视图,它甚至是更好的选择。EEVEE 的实时渲染使得在 Blender 中创建交互式内容成为可能。
|
||||
@@ -1,97 +0,0 @@
|
||||
# Step by Step
|
||||
|
||||
## Download Data
|
||||
|
||||
Here is the open data from [Visible Human Project (VHP)](https://www.nlm.nih.gov/research/visible/visible_human.html) for you to learn how to use this addon. It is a CT scan image of a male head, download and unzip it to a new directry for later usage.
|
||||
|
||||
[VHP_M_CT_Head.zip](https://drive.google.com/file/d/1bBGpt5pQ0evr-0-f4KDNRnKPoUYj2bJ-/view?usp=drive_link)
|
||||
|
||||
VHP original radiology data was shared in the proprietary format that predated DICOM, complicating its use. Now all data has been harmonized to standard DICOM and released in [NCI Imaging Data Commons (IDC)](https://portal.imaging.datacommons.cancer.gov/), you also can download data from IDC by yourself.
|
||||
|
||||
## Import Data
|
||||
|
||||
In the top menu, click **Bioxel Nodes > Import Volumetric Data (Init) > as Scalar**, locate to the unzipped folder, select any DICOM file (don't select more than one, and don't select the folder either), and click **Import as Scalar**.
|
||||
|
||||

|
||||
|
||||
You can also choose to import data by dragging one DICOM file into the 3D viewport (some DICOM files don't have extension suffix and can't be dragged in).
|
||||
|
||||
The process of reading the data may take a while, the bottom right corner of the Blender interface will show you the progress of the reading, and a dialog box will pop up when the reading is successful. Ignore all the options for now and just click OK, I will explain the purpose of these options later.
|
||||
|
||||
The import process involves data conversion, so there is more waiting time, and the progress of the import is displayed in the lower right corner of the interface. After importing, the addon will create a new object, with a new geometry nodes that will serve as a "workbench" for manipulating the data, the new object is called the **Container**. The newly imported data is stored in the Container as a **Layer**, which is loaded into the Container's Geometry node via the "Fetch Layer" node (the red one), and be converted into a **Component** that can be rendered.
|
||||
|
||||

|
||||
|
||||
Next, let's preview the data in Blender.
|
||||
|
||||
In the container's geometry nodes panel menu, click **Bioxel Nodes > Add a Slicer**. The addon will insert a node named "Slice" between the "Fetch Layer" and the "Output" and create a new plane object named "Slicer". Click the "Slice Viewer" button in the upper right corner of the 3D viewport to enter the preview mode, then move and rotate the "Slicer" object. You will see a slice image of the data, which should be familiar to anyone who has used any DICOM viewing software.
|
||||
|
||||

|
||||
|
||||
(If the volume disappears when you click the "Slice Viewer" button, save the file and restart Blender, it should be fixed, or you can turn on the Cycles rendering to see the slicer plane as well. The issue is caused by EEVEE's failure of reloading the shaders.)
|
||||
|
||||
The "Slicer" node is used to display the slices of the data, with an external object as the location of the slice plane. This step is not necessary for visualization, but it provides a quick way to preview the data in Blender for user perception. Next, let's turn the volumetric data into a renderable object.
|
||||
|
||||
## Cutout the Skull
|
||||
|
||||
Bone tends to have much higher CT values than soft tissue, so you can split bone and soft tissue by setting a threshold. In the Geometry Nodes panel menu of the container, click **Add > Bioxel Nodes > Component > Cutout by Threshold** to add a "Cutout" node and connect it between the "Fetch Layer" node and the "Output", and then set the "Threshold" parameter of the "Cutout by Threshold" node to 0.3 and turn on the "With Surface" option. Switch to viewport shading to "Render Preview". The node graph and the render result are shown below.
|
||||
|
||||

|
||||
|
||||
If you want the render result to be consistent with the above image, you also need to change the default light object type from "Point" to "Area" to increase the brightness, and change the Look in Color Management to "High Contrast".
|
||||
|
||||
You can understand the role of the "Threshold" parameter in shaping the output by changing it. If you feel very laggy while draging the parameter, you can temporarily turn off the "With Surface" option in the "Cutout" node. When you are satisfied, turn it on again. In addition, the volume rendering is very computationally intensive, which is also a major cause of the lag, so you can adjust the parameters in "Slice Viewer" mode first, and then do the Cycles rendering when you are satisfied.
|
||||
|
||||
You may consider using GPU for faster rendering, but please note that Bioxel Nodes only supports Optix GPUs due to its dependency on OSL (Open shader language), and the first time you turn on GPU rendering, you may need to wait for Blender to load the appropriate dependencies (the screen will get stuck), so please be patient.
|
||||
|
||||
Although the output component looks like a mesh object, it retains its internal information through its volume, so when you cut through the component, you should see an inhomogeneous cross-section made up of volume, rather than just an empty shell like any mesh object. Let's cut the skull to see its complex internal structure.
|
||||
|
||||
## Cut and Color
|
||||
|
||||
In the container's geometry nodes panel menu, click **Bioxel Nodes > Add a Cutter > Plane Cutter**, the addon will insert a "Cut" node and a "Object Cutter" node. Also, it will create a new plane object named "Plane Cutter" to the scene, at this point you should be able to see that the skull has been cut through as expected.
|
||||
|
||||
Just like the "Slicer" object, move and rotate the "Plane Cutter" and the position and direction of the cut will change accordingly. Please adjust the Cutter object to a vertical orientation so that it cuts the skull vertically, as shown below.
|
||||
|
||||

|
||||
|
||||
The CT value of the skull is inhomogeneous, which reflects the difference in substance density of the bone. We can enhance the display of this difference by coloring. In the Geometry Nodes panel menu of the container, click **Add > Bioxel Nodes > Propetry > Set Color by Ramp 5** to add the "Set Color" node and connect it after any node. Set the node's parameters "From Min" to 0.3 and "From Max" to 0.5, as shown below.
|
||||
|
||||

|
||||
|
||||
When rendering is turned on, you can clearly see that the calvaria and teeth are colored red, meaning that the bone in these areas is denser. You can try to adjust the parameters of the "Set Color" node to recognize their roles. If you feel laggy when draging the parameters, you can temporarily turn off "With Surface" and switch to "Slice Viewer" mode.
|
||||
|
||||
## Transformation
|
||||
|
||||
You may find that the position of the skull is a bit off the origin, this is due to the fact that the addon keeps the position information from the original data record during the import process. If you need to change the position, do not move the container (object) directly as you would in 3D viewport; the addon provides dedicated "Transform" node to handle transformations.
|
||||
|
||||
In the Geometry Nodes panel menu of the container, click **Bioxel Nodes > Add a Locator**, the addon will insert the "Transform Parent" node and create a new empty object named "Locator". If you move, rotate, or scale the "Locator", the skull will Transform as well. If you also want the origin of the rotational transformation to be set at the geometric center of the skull, just add a "ReCenter" node (Add > Bioxel Nodes > Transform > ReCenter) in front of the "Transform Parent" node, as shown below.
|
||||
|
||||

|
||||
|
||||
Being used to moving objects directly in the 3D viewport, you may find it strange to have an extra step to transform component like this. This is in consideration of the fact that there may be multiple components involved in one container with different transform needs, as well as future development plans for resampling mechanism, which I'll explain in more detail later.
|
||||
|
||||
## Surface Mesh
|
||||
|
||||
A mesh, made up of vertexs and faces, is the "greatest common" in the 3D world. Therefore, in order to be compatible with other 3D workflow, the addon provides the "To Surface" node (Add > Bioxel Nodes > Component > ToSurface), which converts the component into a mesh. Note that the surface mesh is not editable in the container's geometry node, and can only be connected to "Transform" and "Shader" nodes.
|
||||
|
||||
As shown below, you can connect "Slime Shader" node (Add > Bioxel Nodes > Surface > Slime Shader) after the "To Surface" node to give the surface a shader, or connect "Transform" nodes.
|
||||
|
||||

|
||||
|
||||
If you want to edit the mesh, in the Geometry Nodes panel menu of the container, click **Bioxel Nodes > Extract from Container > Extract Mesh**, the addon will create a new mesh model object prefixed with the container name, and then you can perform the usual 3D operations, such as digitally sculpting, animating, exporting to 3D print format stl, etc.
|
||||
|
||||
## Deliver Blender File
|
||||
|
||||
The layers cache is stored in a temporary folder, while the addon's custom nodes are linked to the node library file in addon directory. Both of them are exist locally by default, and if you only deliver the Blender file to other devices, the file will not work properly because the resources are missing.
|
||||
|
||||
Therefore, you need to save all temporary files before you deliver the Blender file. The procedure is simple:
|
||||
|
||||
1. Save the Blender file.
|
||||
2. in the top menu, click **Bioxel Nodes > Save Node Library**, and set the relative path.
|
||||
3. in the top menu, click **Bioxel Nodes > Save All Layers Cache** and set the relative path.
|
||||
|
||||
Zip the Blender file together with the local node library file and the layer cache files (there may be more than one).
|
||||
|
||||

|
||||
|
||||
🤗 If you can follow the documentation up to this point, you're already started!
|
||||
@@ -1,20 +1,28 @@
|
||||
[data-md-color-scheme="slate"] {
|
||||
@import url("https://fontsapi.zeoseven.com/292/main/result.css");
|
||||
@import url("https://fontsapi.zeoseven.com/293/main/result.css");
|
||||
|
||||
/* [data-md-color-scheme="slate"] {
|
||||
--md-code-hl-string-color: #8b8b8b;
|
||||
--md-code-hl-keyword-color: white;
|
||||
--md-code-hl-number-color: white;
|
||||
--md-typeset-a-color: white;
|
||||
--md-code-hl-keyword-color: #ffe8a3;
|
||||
--md-code-hl-number-color: #ffe8a3;
|
||||
--md-typeset-a-color: #ffe8a3;
|
||||
}
|
||||
|
||||
[data-md-color-scheme="default"] {
|
||||
--md-code-hl-string-color: #444444;
|
||||
--md-code-hl-keyword-color: black;
|
||||
--md-code-hl-number-color: black;
|
||||
--md-code-hl-keyword-color: #bd9100;
|
||||
--md-code-hl-number-color: #bd9100;
|
||||
}
|
||||
|
||||
[data-md-color-scheme=slate][data-md-color-primary=black] {
|
||||
--md-typeset-a-color: white;
|
||||
--md-typeset-a-color: #ffe8a3;
|
||||
}
|
||||
|
||||
[data-md-color-scheme=default][data-md-color-primary=black] {
|
||||
--md-typeset-a-color: black;
|
||||
--md-typeset-a-color: #bd9100;
|
||||
} */
|
||||
|
||||
:root {
|
||||
--md-text-font: "LXGW WenKai";
|
||||
--md-code-font: "LXGW WenKai Mono";
|
||||
}
|
||||