ariel-waisman / labelstorois Goto Github PK
View Code? Open in Web Editor NEWA Fiji/ImageJ plugin to generate ROIs from label images, allowing ROI erosion and quantification
License: GNU General Public License v3.0
A Fiji/ImageJ plugin to generate ROIs from label images, allowing ROI erosion and quantification
License: GNU General Public License v3.0
Hi,
I went ahead and put the plugin into the imageJ plugin folder and when I try to run it I get the error below. Any idea what I am doing wrong?
Thanks,
David
SyntaxError: ("mismatched input ',' expecting COLON", ('', 309, 73, " with open(full_table_path, 'a') as full_table_file, open(path_to_multiple_Tables, 'r') as current_table:\n"))
This is not an issue rather asking for a suggestion!!
This plugin is super useful. I used it to creat .roi files from my mask images predicted by the deep learning model. However, when I get the rois using this plugin , I can not edit/adjust them. As you know deep learning models are not 100 accurate. Therefore, I would like to know from the author/authors who implemented this plugin - if it is possible to get the editable ROIs (polygons) so that ROIs can be adjusted manually if required.
I will highly appreciate your suggestion on this.
Hi there,
thanks a lot for your useful plugin. Instead of saving a JPG image with the original image and the outlined ROIs, I'd rather only store the outlined ROIs (aka skeleton/binary image) to be able to further process these skeleton images in another software. I will look into your python script ( # Section Save jpg with outlines
) whether I can modify it accordingly. But any suggestions would be much appreciated.
Opens bioformats dialogue which subsequently causes loop to quit.
When I try to load the plugin, I get the error message SyntaxError: ("mismatched input ',' expecting COLON", ('', 309, 73, " with open(full_table_path, 'a') as full_table_file, open(path_to_multiple_Tables, 'r') as current_table:\n")). I saw other people were having this same issue and to update their version of ImageJ. I went to the Help->update ImageJ and it says I am running the most recent version yet am still having the same error message. Thanks
Hello,
Is it possible to run this directly in python? In headless mode or perhaps being called as a macro like here:
https://forum.image.sc/t/accessing-adding-to-roi-manager-with-pyimagej-script/41505
Cheers,
Ricardo
Hi! Great plugin. Would love to use it with the multi-measure function in imageJ to get measurements from all channels of the files to be measured.
Thanks!
On my Mac (MacOS Catalina 10.15.7) the file selection always hangs/is unresponsive. I think this is related to general issues with javax.swing JFileChooser on MacOS.
As a workaround, I simplified the script for single image selection and added macros for file section:
https://github.com/heckern/LabelsToROIs/blob/master/Labels_To_Rois_simple.py
Hi,
I am facing some issues with the multiple image measurement module on LabestoROI. After specifying the path when I am hitting on run, the FIJI completely shuts down.
Can you please help me with this?
Hi,
For my cellpose segmentation, I wanted to try out the labelsToRois plugin, but it doesn't want to start, raising a java exception.
Warning AbstractCLIJ2Plugin.setCLIJ is deprecated. Use setCLIJ2 instead.
[ERROR] java.io.IOException: Mark invalid
at java.io.BufferedReader.reset(BufferedReader.java:512)
at org.python.core.ParserFacade.parseExpressionOrModule(ParserFacade.java:133)
at org.python.util.PythonInterpreter.compile(PythonInterpreter.java:321)
at org.python.util.PythonInterpreter.compile(PythonInterpreter.java:317)
at org.python.jsr223.PyScriptEngine.compileScript(PyScriptEngine.java:90)
at org.python.jsr223.PyScriptEngine.eval(PyScriptEngine.java:31)
at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:264)
at org.scijava.script.ScriptModule.run(ScriptModule.java:164)
at org.scijava.module.ModuleRunner.run(ModuleRunner.java:163)
at org.scijava.module.ModuleRunner.call(ModuleRunner.java:124)
at org.scijava.module.ModuleRunner.call(ModuleRunner.java:63)
at org.scijava.thread.DefaultThreadService.lambda$wrap$2(DefaultThreadService.java:225)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
java.io.IOException: java.io.IOException: Mark invalid
at org.python.core.Py.JavaError(Py.java:547)
at org.python.core.ParserFacade.fixParseError(ParserFacade.java:107)
at org.python.core.ParserFacade.parseExpressionOrModule(ParserFacade.java:136)
at org.python.util.PythonInterpreter.compile(PythonInterpreter.java:321)
at org.python.util.PythonInterpreter.compile(PythonInterpreter.java:317)
at org.python.jsr223.PyScriptEngine.compileScript(PyScriptEngine.java:90)
at org.python.jsr223.PyScriptEngine.eval(PyScriptEngine.java:31)
at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:264)
at org.scijava.script.ScriptModule.run(ScriptModule.java:164)
at org.scijava.module.ModuleRunner.run(ModuleRunner.java:163)
at org.scijava.module.ModuleRunner.call(ModuleRunner.java:124)
at org.scijava.module.ModuleRunner.call(ModuleRunner.java:63)
at org.scijava.thread.DefaultThreadService.lambda$wrap$2(DefaultThreadService.java:225)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.io.IOException: Mark invalid
at java.io.BufferedReader.reset(BufferedReader.java:512)
at org.python.core.ParserFacade.parseExpressionOrModule(ParserFacade.java:133)
... 14 more
'''
I'm running
Fiji (IJ 1.52t Java 1.8.0_172 64-bit) on Windows 11
I copied Labels_To_Rois.py to my plugin folder.
This is not a CLIJ vs CLIJ2 error is it?
Thanks!
I add in my ROI's in celllpose. I save the file as 'save masks as PNG/tif'.
In FIJI I select single image supply image that I uploaded to cellpose as well as the new saved file (mask file) in the path to label image. When I click next nothing shows up only the original image I uploaded to cellpose. No regions of interest whatsoever. Or data, etc.
Any advice?
I get an instant crash (takes all of Fiji down with it) with a 32-bit label image. Mesmer segmentation outputs 32-bit images by default.
Hi everyone,
I'm trying to obtain the ROI from a mask image (8bit) generated with cellpose.
thank you!!
I am working on a project for some cell segmentation, and I need intensity from the original image without enhancement. Is this possible?
Happy New Year to everyone! We are aware of a couple of issues, which are due to some recent updates in some of the axillary dependencies. See below for more details. Happy segmenting!
1) Runtime error
As you can see below on the screenshot, when installing Cellpose a runtime error occurs. Just click "restart runtime" and then confirm in the pop window, will resolve the issue.
2) ImportError ‘_registerMatType’
A newer version of open cv got installed, which was incompatible.
Just running the command line below right before "!pip install Cellpose" will resolve the issue!
!pip install "opencv-python-headless<4.3" --copy/paste into your notebook. Feel free to contact me and I can also send you an updated Colab file (dkopinke at ufl dot edu).
3) Value Error
After running the "import numpy" box, we do notice a value error (see below). However, this does not affect segmentation.
We sometimes encounter issues where if we do multiple image analysis with the original image plus label images in the folder, the "area" doesn't get calculated correctly. We found out that depends on which software we exported the images to be analyzed (before Cellpose). If we just perform the label images "single" without using the original image, the area calculation is fine.
We've always exported the images in Tiff so not sure why it works sometimes and but not other times and it only gives us problem when we try to do 'original' plus "label" images. Have you seen this problem before?
Hi there,
When I process polygonal cells and calculate their cell area, I want to exclude the cells on edges, like this image:
Because these cell margins are tightly linked, so I can not exclude the outlines on edges by dilate, which will affect cell size.
Is there any idea to solve this issue?
Thanks a lot!
Justine Jiao at hzau.edu
Greeting,
I would love to use this amazing tool LOIStoROI to segment and quantify sections of myofiber. I followed the steps one by one (cellpose and Lois to Roi plugin on Fiji, both on windows and on mac) but it doesn't work.
First : the label png image that I got from cellpose was just a black image : is that normal ? (I don't know how should the image look like). I attach herein the two images, the original and the label output image.
Second, (I assumed the black label image is normal so I proceed to the Lois to Roi plugin on Fiji (updated to the last version). I choose single image, and load the original TIF and the label image PNG. when I click GO two windows appear but they are blank nothing is going on (I tried again and again but invane, I also wated two hours, thought maybe it's a processor thing but also invane). When I tried that on windows, the Fiji app closes abruptly when I click on GO.
Please help me resolve this issue please.
Thank you all in advance !!!!!
Here is the label image i got from the Colab-Cellpose
and I converted the TIF image to JPEG so I can upload it here.
HI, set measurements do you know the generated CSV files are background substracted and the false positive signal is also corrected in the meantime? Thanks!
Hi, when I use the multiple images option, it sometimes will randomly miss out files in a folder of images. I can't figure out why this is an issue as I label all of my label images using the same python script, and it is able to recognise that there is x number of images in the folder, yet it skips over a random number of images.
Hi there, It's me again^_^
I tried to precess labeled images generated by Cellpose with LabelsToROIs, but I constantly found some small labels/particles that equels to 1 pixel, which affect cell size calculation.
When I "Analyze Regions" in MorpholibJ, there is no such small labels shown, so I suspect that this is caused by LabelsToROIs.
Do you have any idea to remove these small lables?
Thanks a lot!
Justine
hI, I trying multiple times under single image category but it failed to complete this step and somehow froze/ not able to enter the next erosion step.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.