Coding volume segmentation with multiple thresholds (CT data)
7 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I'm working with CT data to visualise sediment structures in 3D. I'd like to apply several masks at different CT number thresholds to create a multi-colour overlay. For example, voxels with CT numbers between 250 HU and 299 HU will have a different colour to those between 300-349 HU, 350-399 HU, etc. (This is to visualise spatial relationships between sediments of different density).
Using the Volume Segmenter app, I can run Filter & Threshold, manually adding a new label (e.g. HU250, HU300...) and colour for each threshold. I can also save these as a 3D categorical to be read back into Volume Segmenter. But with ~18 thresholds this isn't practical to do manually on several datasets. I'd like to program an equivalent to generate a set of masks for each dataset, and display the result through volshow.
I can iterate through different CT number thresholds, using a function to create a binary mask (a 3D matrix) at each. However, I'm not sure how to link these masks to labels and create a categorical that can be read back into Volume Segmenter.
It is possible to bypass masks entirely by using the normalised CT number data as OverlayData in volshow, but I would like to adjust opacity and the thresholds of what densities are shown on the CT scan (which can be done in the Volume Segmenter app), and programming an interface to do that seems far more complicated.
I would be grateful for advice either on creating the categorical set of labels and masks, or on alternative methods.
0 commentaires
Réponse acceptée
Matt J
le 25 Mai 2023
Modifié(e) : Matt J
le 25 Mai 2023
I can iterate through different CT number thresholds, using a function to create a binary mask (a 3D matrix) at each. However, I'm not sure how to link these masks to labels and create a categorical
If you have the thresholds already, you can just use,
3 commentaires
Matt J
le 25 Mai 2023
Modifié(e) : Matt J
le 25 Mai 2023
I don't think you should be making masks at all. Since you know the thresholds, you can go straight to the label map. There is nothing you can do with masks that you can't do with a label map.
CTdata=randi(200,3,3,2)
edges=(0:4)*50;
labelmap=discretize(CTdata,edges,'categorical',{'CSF', 'Adipose','Muscle','Bone'})
Plus de réponses (0)
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!