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

code for generating simulated data #66

Closed
zcq0730 opened this issue May 19, 2019 · 6 comments
Closed

code for generating simulated data #66

zcq0730 opened this issue May 19, 2019 · 6 comments
Assignees

Comments

@zcq0730
Copy link

zcq0730 commented May 19, 2019

Would you please include the code for generating simulated data into the fissa toolbox?
Thanks a lot!

@swkeemink swkeemink self-assigned this May 23, 2019
@swkeemink
Copy link
Member

Working on this, will update here.

@zcq0730
Copy link
Author

zcq0730 commented May 23, 2019

Thanks a lot! Looking forward.

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.

@swkeemink
Copy link
Member

The simulation code is now available in our SimCalc repository.

@zcq0730 Sorry for the delay, hopefully it is still useful! Any bugs and oddities you might run into are best asked in the SimCalc repository itself.

@zcq0730
Copy link
Author

zcq0730 commented Jun 27, 2019

Thanks a lot! Definitely, it will be very useful!

@swkeemink
Copy link
Member

@zcq0730 I also opened an issue about composite ROI types. Would it be possible to add a few more details about composite ROI types to that issue? See #68 . Thanks both for your help and interest!

@zcq0730
Copy link
Author

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!

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