Export Binary Stack from ilastik carving

Dear all, Dear @ilastik_team,

After using ilastik for pixel/object classification for some projects, it’s my first time using the carving workflow! and I have to say it’s really amazing !

Next step, would be to overlay in FIJI the result of the “segmentation” with the original image.
(or to import into TrakEM2 via the “import labels as arealists” as suggested here : Import masks into TrakEM2 )

So far, from carving in ilastik I could only export a mesh (as obj file)
I tried using 3D viewer. I can import the obj file but 3Dviewer doesn’t allow to export the mesh as a binary mask.

I tried using Sciview :

-I can’t import the obj file, it can’t be read because it contains “nan”

-I converted the obj file to an stl file (using designspark mechanical)
I can import the stl in Sciview (and after I played a bit with the scale I could make it visible)
I can export the mesh as a binary image stack (specifying the dimension of the ouput image).
but the export is limited to the object, so it can’t be overlayed to the original image.

Do you have any similar experience ? or can you propose a work-around ?

Ideally, I would get a mask of the object for each slice of the stack, a binary stack with same dimensions as the original image.

I guess that a “simple” approach would be that ilastik allow us to export a binary mask of the carved object (the mask being overlaid in ilastik when you clic on Segment would be perfect, cf image ).

Thank you for your suggestions,

Best,

Romain

1 Like

Hi Romain,

The simplest way would be to right-click the segmentation layer in the layer stack widget (the list of layers on the lower left). A little context menu should come up, including an option to export the layer. The layer is, in essence, a binary mask. If you want to export all segmented objects simultaneously, try the “completed segments” layer.

Hope this helps, let us know if it doesn’t work to your satisfaction!

3 Likes

that’s exactly what I was looking for ! Awesome !
I think I wouldn’t have try to right click in this list without your advice!

Maybe, a new section can be added within the documentation page https://www.ilastik.org/documentation/carving/carving.html

Thanks ,

Romain

1 Like