Binary Labelmap Creation - Is there a systematic way to select optimal segment conversion parameters to reduce artefacting?

Hello,

I work with a lot of different dcm RTSTRUCT datasets, and often end up with weird artefacts after conversion of planar contours to a binary labelmap, such as holes, aliasing and interpolation errors creating planar artefacts where there may be a significant change in cross section between contours (sometimes, but not always).
This is what these artefacts tend to look like:

I can usually get a decent result by changing a couple of conversion parameters in the “Advanced Create” dialogue such as the spacing (voxel size) and the oversampling factor - there seems to be an optimal spacing that gets rid of artefacts and minimises aliasing while preserving detail. However I can only find this through trial and error currently.

Does anyone know of a way to select the best conversion parameters based on features of the dataset (maybe like contour spacing, contour resolution, overall size of the segment, or something else)?

Or does anyone have any links to technical resources that might help me to get a deeper understanding of the geometric/algorithmic procedure that is at play here?

Any help would be much appreciated!

Thanks,
Lauren

First of all, I think it is important to understand the way segmentations are handled in Slicer. Please see this page
https://slicer.readthedocs.io/en/latest/user_guide/image_segmentation.html
The figure about conversion shows exactly the RT use case, where you have a set of planar contours for each structure. By default Slicer converts these planar contours to closed surface models (see paper: Sunderland, K., Woo, B., Pinter, C., & Fichtinger, G. (2015, March). Reconstruction of surfaces from planar contours through contour interpolation. In Medical Imaging 2015: Image-Guided Procedures, Robotic Interventions, and Modeling (Vol. 9415, pp. 435-442). SPIE.), which are then voxelized. Once you start editing the segments, the binary labelmap becomes the source representation, and closed surface is created directly from that.

In the advance create dialog that you already found, you can define an alternate route from planar contours, which is via ribbons. It is more robust, but less accurate (no out-of-slice changes for each slice, so the slice thickness seriously limits the reconstructed details).

To me the artifacts you show seem like instances where the binary labelmap contains a connecting point between parts of the structure, which the algorithm wants to triangulate (with the included smoothing), and this is the result. Unfortunately in this single low-resolution screenshot there is not much to see.

Overall I think your approach to increase resolution via oversampling is a good way to go if your data allows this increased memory and performance demand. Every application is very different, so I think you’ll need to find an overall reasonable oversampling factor, and use that.

Maybe if you give us more information we can give you better answers.

Hi Csaba,

Thank you for that it was very helpful! I think the issue was a correspondence problem because it was primarily showing up with datasets with larger contour spacing and for thin layer segments. This was solved using the ribbon pathway when the spacing is above a certain threshold.

I have noticed though that sometimes increasing the oversampling results in what looks like aliasing - but in the xy plane (as opposed to staircasing in z). Is there any point in the conversion that interpolates between points on the contour as well as between contours? Are there any resources that you know of that might help me learn more about this?

When I was inspecting the contour points themselves I noticed that in some cases they are very unevenly spaced. I have considered reconstructing the contours by fitting a spline to the points in the RTSTRUCT dataset and then sampling that at regular spacing along the curve, creating a new dataset and then putting it into 3Dslicer to convert. Do you know if this approach is likely to affect the result?

Thank you again - I learnt a lot of useful info from the links you provided!

Out-of-plane interpolation is solved by the conversion I was talking about above. If you visualize the ribbons in 3D you’ll understand why there is no “interpolation” using those. I recommend using the default Slicer options for loading legacy RTSTRUCT files.

It is extremely hard to answer questions when the information provided is so little.

Yes, as I said, I tried the ribbon pathway and it worked well. I’m not sure what you mean by “the information you provided is so little”, my question was a general one but perhaps I didn’t explain it very well. I am looking for some more background information - (such as how 3Dslicer puts planar contours together from an RTSTRUCT dataset, as it was my understanding that RTSTRUCT just contains ordered points and doesn’t contain any edges or curves etc). Very broadly, I’m interested in gaining a better understanding of how changing conversion parameters in 3dslicer leads to different output. At this stage I’m not looking for answers on specific cases, I mainly just wanted to know if you had any more suggestions of background reading because I found the papers you mentioned in your previous reply to be very helpful.

The algorithm is explained in detail in the paper I referred to above (Sunderland et al., 2015).

The representations and conversions can be generally explored and optimized in the Segmentations module (not Segment Editor). You’ll see the representations a below the segments and the display options. This is what you see for RTSTRUCT:

If you click Update you’ll be able to choose the conversion path and change the parameters that are exposed:

This particular converter (planar contours to closed surface) has two conversion parameters. You can get more information about them in the tooltip if you hover their names. The default slice thickness parameter is typically not used, it is a fallback value when the quality of the dataset is low (you’ll get an error in the log about this if it happens).

I meant that we can help better if you explain your use case and what is bothering you exactly and what you want to achieve.