Changing the voxel size (resolution) and saving a new volume.

Hello.
I work with CT scans of jaw bones and teeth. The original volume was recorded with the spacing parameter = 0.2 mm. For me, this is a fairly thick slice and I was looking for ways to improve the quality of segmentation and the model. I found a topic on the forum that this can be done using:
(segment editor - segmentation geometry - oversampling factor).

This works if you do the segmentation manually, and I really get the quality and slice thickness of 0.1 mm that I need.
However, manual segmentation of jaws and teeth is very difficult.

I found the “dental segmentator” extension, which works with a neural network. So, you can load the original volume into the neural network, after which it will automatically perform segmentation.

The problem is that the neural network uses the original volume with spacing = 0.2 mm for calculations, even if I change this parameter in the segment editor.
I think for this to work correctly, you should immediately load a high-quality volume into the neural network.

Is there a way to export a modified volume to Slicer 3D? So, I could change the spacing parameter, and then overwrite the original volume. Having received a new volume, I could load it into the neural network and get the desired result.

You can use the Crop volume module or any of the resampling modules in Slicer to change the voxel size of an image.

2 Likes

If you want some interpolation on the segmentation generated by the dental segmentator, you can export the segmentation as STL and reimport it in your oversampled segmentation from STL model.

The smoothing level of the STL can be controlled directly from the segment editor module.

Best,

Thibault

Thank you very much for your help and advice!
I want to write a few words about how I solved the problem.
Let my mistakes help other beginners to understand the program faster.
Previously, I did not understand how the volume crop works. I was working on a weak computer. When I set the voxel size too small, it caused the program to freeze.
So, no matter what I did, I could not see the difference between the original segmentation and the segmentation with a potentially higher resolution. As it turned out, I overloaded the computer when forcing it to calculate such a large amount of data.
If I understand correctly, then any change in the original volume leads to an increase in its file size in cube.
In my example:
original volume = 260 MB, spacing = 0.2 mm;
Desired spacing = 0.1 mm, then I need to increase the resolution by 2 times; 2 * 2 * 2 * 260 MB = 2 GB.

Apparently, I simply didn’t have enough RAM (8GB) and the program froze. It was very careless of me that I didn’t think about the low RAM. I realized this when I started working on 16GB of RAM. Then I was able to test all the ways to increase resolutions and interpolation algorithms.
Literally every tenth share of oversampling significantly increases the load on the RAM.
The problem was complicated by the fact that for the neural network to work, it is necessary to load the entire CT - if you crop the volume, for example, leaving only one jaw, the neural network will not be able to segment correctly.

Therefore, I did not use the crop volume. Because of the freezes, it seemed to me that it was useless.

Conclusion: in any case, try to crop the model as much as possible to save RAM and check the RAM in the task manager.

In the crop volume module you can select the desired voxel size by spacing (in the picture)

When using segmentation geometry you can also easily change the voxel size, but be sure to check that you select the correct “newvolumename_cropped” so as not to accidentally freeze your computer and lose the project.

These are simple and obvious conclusions. For high quality, you need more RAM.

I consider that the neural network also spends quite a lot of RAM, so for automated segmentation of all facial bones at once using the dental segmentator with spacing = 0.1 mm, even 16 GB of RAM was not enough for me. Perhaps the problem lies in something else and I have to find a solution to this problem.