Open lukeb546 opened 10 years ago
@lukeb546 I explored this by looking at several images, and comparing the red channels to gray channels. I decided against doing this, as a our normal way of thresholding, as the gray outshines the red occasionally. I'll still implement this for the image stacks, where the gray cells are the cells of interest. I processed a larger image stack and it’s not as easy as just changing the image channel and processing it with our current parameters.
here are some thoughts on the cell body channel and its masking: as i think we talked about briefly, it looks like the blue channel is causing issues in the masking of the red channel. but, to be consistent with all of the gray, non-PV cells, it is actually the gray (blue in these visualized images) channel that we would use an ideal sense, due to this "glowing" problem that i describe above, which especially has the effect of making the cell look larger in Z than it really is; transitioning to the gray channel would be a good thing for the future, but it is true that using the red channel is nice because the red PV cells are sparse and we don't encounter the overlap issues that i was talking about on friday as often... -i think you could play around with some of the logical image processing tools in Fiji as pre-processing in order to both get the centers of the red cells masked and also work towards excluding the dendrites of these cells, which, because we can't see them consistently/completely, would be best to exclude so that we just look at the red cell bodies; after you get something that works from playing around with pre-processing, it could be coded into the matlab script --one strategy is to use the gray cells in C3 as a mask to segment the red cells of interest in C1 --for example, here are some things that i tried just now with the test stack we've been using: (1) separate channels, (2) convert C3 to 8bit via Image -> Type -> 8bit, (3) go to Plugins -> Process -> Bilateral Filter and try the default settings for this "edge-preserving" filter, which gets rid of high-Hz noise in areas that are not separated by high-contrast edges, (4) threshold the resulting image Image -> Adjust -> Threshold (Otsu, giving a value of around 12 for this test stack, looked good) apply it), (5) Process -> Binary -> Fill holes, (6) this is where the logical steps come in using the image calculator; you can experiment with all of these tools in steps 1-5, mainly filtering and thresholding, to clean up the results that you get with image calculator, and use clever tricks to get the operations to return what you want; Process -> Image Calculator: for image 1 select the processed & binarized version of C3 just created, for the operation pick AND, and for image 2 select the C1 channel (red with PV cells) (7) the result i get looks like this on plane 26, where the PV cells no longer have dendrites and probably have an edge that is closer to the "real" limit of the gray channel, and not that of the red channel that is a bit beyond where it should be, the dimmer cell bodies can probably be gotten rid of by different thresholding settings, or just thresholding this new image again (but just be sure not to be too aggressive with the thresholding and as a result move the edges of the mask "in" too much, shrinking the cell overall) (8) the resulting image can then be converted back into 16bits and merged into the 3-channel composite TIFF with an un-processed C2 and C3