Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Composite ROI type #68

Open
swkeemink opened this issue Jun 27, 2019 · 4 comments
Open

Composite ROI type #68

swkeemink opened this issue Jun 27, 2019 · 4 comments

Comments

@swkeemink
Copy link
Member

By the way, we noticed that the roi type must be polygon.
While when the roi type is composite type, fissa runs as well. (but resulting roi region is incorrect.)
I just think might be needed to emphasize the expected roi input type, by adding a warning message.
The best would be also support for composite type roi input, if can be easily done.

Originally posted by @zcq0730 in #66 (comment)

@swkeemink
Copy link
Member Author

@zcq0730 : would it be possible to give a few more details about what a 'composite' roi type is?

@zcq0730
Copy link

zcq0730 commented Jun 28, 2019

Sorry for the delayed reply. Thank you very much for opening an issue on this!
In our lab, we use “brush selection tool” in ImageJ in order to precisely select ROI of individual neurons. With this tool by holding shift key we could easily draw or select an ROI that best represents the neuron(even can create a doughnut-shaped ROI, which best fit for GCaMP expression).
Details please see: https://imagej.nih.gov/ij/docs/guide/146-19.html#sub:Brush-Selection-Tool
and https://imagej.nih.gov/ij/docs/guide/146-10.html#sub:Composite-selections

Add the selected ROI which is created with this tool into ROI manager, from ROI manager click “More –> LIST” a pop-up window “Overlay Elements” will appear. One could from there find out the detailed properties of created ROI. As you would see, the created ROI type with brush selection tool is Composite type.
Details please see: https://imagej.nih.gov/ij/docs/guide/146-30.html#fig:The-ROI-Manager

Currently, FISSA could load these Composite type of ROIs and treat them as Polygon type. However, one could find out for some reason selected ROIs are recognized incorrectly. The selected ROIs are expanded to squared shape ROIs and passed to FISSA for further calculations (which would definitely compromise FISSA´s accuracy).

We have wrote an ImageJ Marco to rapidly convert all such selected Composite ROIs into Polygon ROIs (I don´t know if it could be easily done in python, I put the imageJ java code here for your convenience if you would like to implement this in python):

nROIs = roiManager("count");
for (i = 0; i < nROIs; i++)
{
roiManager("Select", i);
getSelectionCoordinates(x, y);
run("Select None");
makeSelection("polygon", x, y);
roiManager("Add");
}

Above code was inspired by the following Ref:
https://imagejdocu.tudor.lu/doku.php?id=wishlist:completed:freehand_and_selection_brush_roi_conversion
https://www.researchgate.net/post/ImageJ_How_to_count_number_of_ROIs_and_report_it_like_Analyze_particle_Summary

Thanks a lot both for your help and interest in this issue!

@swkeemink
Copy link
Member Author

@zcq0730 Great, thanks for the extensive explanation, as well as the in-between solution for other users. When I get a chance I will try to add explicit support for composite ROI types.

@zcq0730
Copy link

zcq0730 commented Jul 1, 2019

@swkeemink Thanks a lot! The intention was just want to express my appreciation for your work :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants