Improve the resolution of segment for "import a model"

What I am doing is to have a boolean opertation between two cylinder created by MakerupToModel.
But the segment resolution seems not very well even after “crop volume wih 0.01 spacing scale” just as suggestion: Segmentation resolution.

The orange contour seems to be sufficiently high resolution. If you do not wish to see the underlying labelmap representation (that is always made up of rectangular voxels) then you can choose to view the closed surface representation (Segmentations module / Display / Advanced / Representation in 2D views: Closed surface). If that is still not smooth enough then you can reduce the spacing even further.

Note that in recent nightly builds, you can adjust voxel size in an existing segmentation (in Segment editor, click on the icon on the right side of Master volume selector). You still need to re-import the model but you don’t need to create a new segmentation each time you change the resolution.

Thank you Professor Lassoan.
The segment become rough after a boolean operation just like the Ring structure showed in the pictures.
The ring stucture created from a empty volume with little spacing and the other were copied from other segmentation.

360%E6%88%AA%E5%9B%BE-100573046

Can I have a boolean operation between segments by python script?
And who can help me complete the code.
Thanks!

The resolution change that you described is a bug. Logical operator effect assumes all segments have the same resolution, but resolution of imported segments are not changed until the segments are modified. You can enforce resampling by clicking on the box icon on the right side of Master volume selector in Segment editor, then clicking on OK.

See how to run an effect from script here. You can find Logical operator effect parameters in implementation of the effect.

Can I open the “overwrite other segments” as Visible segments with code?

effect.actor.VisibilityOff(1)?

image

You can set overwrite mode in the segment editor widget node’s SetOverwriteMode() method.