Masking every Z-level in multiple Z-stacks

z-stack
maskimage

#1

Hey!

I have acquired confocal Z-stack images of skin where I would like to analyze only cells that are located in the stroma, but not in the epidermis and the hair follicles. To do this, I have made a binary mask for every Z-stack image, which I would like to use to mask every Z level of the specific Z-stack.

I have already managed to do this with one Z-stack and its mask by using the NamesAndTypes module and importing the mask as a single image. Together with extracting metadata from the image file headers, it nicely separates the different Z-levels and masks them all.

What I would like to do is to use a similar approach for about 40 Z-stacks and their masks at the same time, but I haven’t found a way of doing it in a single step.
I have tried using image rules to separate my Z-stacks and their masks (file ends with mask), but this results in the output of a single image.

Is there a way I could import all of my Z-stacks and masks in one step and then use the masks for every Z-level?

The representative pipeline where I get this problem and a couple of sample images and masks can be found here (for some reason I wasn’t able to upload them directly, even when compressed to .zip):

Thanks for the help!

Edit: I added an example pipeline to the folder that imports a single image - this works for one Z-stack, but not multiple.


#2

@Karlan I looked at your pipeline and modified the NamesAndTypes module. At the bottom of the module are options to configure how image sets are put together; here I chose the metadata that sorts the appropriate mask with each z-level of your image stacks. I hope this helps and good luck!

working_masking_Z-stacks.cppipe (5.6 KB)


#3

I tested this approach and it seems to be working perfectly for my images.

Thanks for the help!