need clarification about generating `roi.tif`
Thanks for making the great tool & writing the detailed tutorial!
I am now using it to help count cells. But I have a question about how to generate the roi.tif in Analyze_ROIs.m. This is the process I inferred: first I generate an ROI channel and combine it into the raw tif image as one single file. After the whole process, I will obtain the transformed tif file, then I split the roi channel out of the transformed tif file. This roi channel itself would be roi.tif. Is it correct? If so, I wonder whether there is available scripts to do this? Thank you!
https://github.com/cortex-lab/allenCCF/blob/4fa077d91051c716a76986c9deedb19b43ec15e6/SHARP-Track/Analyze_ROIs.m#L14
Yes, that is one way to do it. To merge the ROI channel with histology image, you can either use something like ImageJ or do it in matlab with something like:
multi_channel_image = zeros(dim_1_of_original_image, dim_2_of_original_image, 2);
multi_channel_image(:,:,1) = original_image;
multi_channel_image(:,:,2) = ROI_image;
If you then want to extract the roi image without the histology for analysis, it should be just one line:
roi_location = 'C:\Drive\Histology\for tutorial - sample data\SS096_1_1_ROIs.tif';
roi_location = roi_location(:,:,2)
(here, assuming 2 is the color channel that the ROI data are found on)