MPI-Dortmund / tomotwin-cryoet

cryo-ET particle picking by representation and metric learning
Mozilla Public License 2.0
32 stars 6 forks source link

Making turning a segmentation into a binary mask #106

Closed hamid13r closed 1 month ago

hamid13r commented 3 months ago

Hi,

I have a tomogram that tomotwin model does a great job of separating the feature I am interested it. My question is is there a way of turning these labels into a binary mask?

Best, Hamid

thorstenwagner commented 1 month ago

Hi @hamid13r ,

sorry that it took me so long. You can save the label mask with napari. To do so:

  1. In the layer list right click on cluster_ids_in_space -> Duplicate layer
  2. Right click on the copy and Convert data type -> Convert to 8 bit
  3. Now save it as tif via File -> Save selected layers

Now you can open it for example with ImageJ :-)

Have fun!