Interpolation when segmenting stacks

Hi,

I am using BiofilmQ to analyse z-stacks from confocal microscopy. Each z-stack is 30 slices. When I segment the image (both with or without the cubes method), and display the segmentation overlay over the image, there are now 67 slices in the stack and not 30. It seems to have interpolated to create new slices in between the raw data ones. Why is this, and is there a way I can stop it from doing this? I only want to analyse the original slices.

Many thanks
Domi

Hi Domi,

thank you for bringing up this important topic. The interpolation is intentional, it ensures that the scaling in the directions dxy and dz is identical, which is necessary for some of our parameter calculation procedures. To avoid issues with the downstream analysis, we chose the interpolation to be mandatory, so unfortunately, you cannot avoid it without skewing your quantification results.

That being said, if you do not care so much about the quantification, or you´re willing to work through the details of which parameters are affected by the scaling, you can trick BiofilmQ into using the raw data. If you set the dz scaling equal to the dxy, there will be no need for interpolation. However, note that any scaling-related parameter - volumina, distances, range-depended parameters - will not be correctly calculated. Some are just off by a factor, but there are also a few that cannot be recovered. If you choose this work-around, I would be happy to assist you in making sure that you don´t introduce errors into your analysis, but I do not recommend that you try this by yourself.

I would also like to learn more about the reasons, why would prefer to not apply the interpolation. As you might know, BiofilmQ is still in its beta, and we are constantly working on improvements, so your feedback is very helpful to us.

So, what are the main issues you see with the interpolation? And would you, for example, like to be able to switch it off, even if that would result in less parameters being available for calculation for this particular data set?

I apologize for not being able to help more and am very much looking forward to your reply. Thank you for helping us improve our software :smiley:

Best,

Hannah

Hi Hannah,

Thank you so much for your detailed response :slight_smile: - I understand now why the interpolation is important.

I am studying how an extracellular protein is distributed throughout the extracellular matrix of S. aureus biofilms. It exists throughout the whole matrix, but in some strains it localizes to the surface of cells, whereas in others, it does not attach to cells. I would like to use the fluorescence intensity parameters (intensity mean and intensity shells mean) to characterize this. Will these be affected by interpolation?

The reason why I asked about interpolation is actually because prior to discovering BiofilmQ, I had some code written by my colleague to perform this analysis already (that needed a few small tweaks). I am trying to find out if I can use BiofilmQ instead, and I thought the best way to do so was to directly compare the analysis from both programs. To do this I wanted the segmentation to be the same between the two, and the code from my colleague does not have any interpolation.

Best,
Domi

Hi Domi,

I see now why you wanted to avoid the interpolation. Especially for the shell parameters, however, the equal scaling in dxy and dz is critical, otherwise the shell would be thicker in one direction than in the other. So you´ll need to keep the interpolation and yes, then the results from your colleague´s code will not be perfectly identical to the ones you get with BiofilmQ. They should be very similar, though, so you can still compare them. When it comes to identifying trends or differences between various data sets, both analyses should yield the same result.

I hope this helps. Let me know if you run into further questions during your analysis.

Best,

Hannah