how to extract the pixel value of tumor in uint16 .mat from logical .mat?

1 visualizzazione (ultimi 30 giorni)
Hi all,
I have data uint16 .mat. then I label it into tumor and background, and save it into logical .mat. Means the background is 0, tumor is 1.
how to extract the pixel value of tumor in uint16 .mat?
the file unit16 and logical as attached.

Risposte (1)

Walter Roberson
Walter Roberson il 17 Ott 2022
uint8() the logical mask and multiply by the uint8 data. The locations where the mask is false will come out 0.
  2 Commenti
mohd akmal masud
mohd akmal masud il 17 Ott 2022
this one is for total no. of voxel.
Voxels = sum(logical(:)==1)
then how to extract the PixelIdxList?

Accedi per commentare.

Prodotti


Release

R2022a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by