Giter VIP home page Giter VIP logo

labelstorois's Introduction

LabelsToROIs

LabelsToROIs is a FIJI/imageJ plugin that provides the tools to generate the regions of interest (ROIs) from label images. It also allows to adjust the size of these ROIs and to generate measurements from the original images in the different channels.

To see a full description of the plugin, the installation instructions and written as well as video tutorials, visit: https://labelstorois.github.io/

labelstorois's People

Contributors

ariel-waisman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

labelstorois's Issues

UPDATE! numerous issues solved

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.

3

2) ImportError ‘_registerMatType’
A newer version of open cv got installed, which was incompatible.

1

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).

2

3) Value Error
After running the "import numpy" box, we do notice a value error (see below). However, this does not affect segmentation.

4

Error loading plugin

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"))

Editable ROI'S

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.

java error IOException: Mark invalid

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!

remove small lables

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

CT4-1-1 1_cp_masks_Erosion_0px_Outlines

Error loading plugin

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

exclude cells on edges

Hi there,

When I process polygonal cells and calculate their cell area, I want to exclude the cells on edges, like this image:

CT4-1-1 1-1

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

Error when reading multiple images

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.

Multiple image analysis issues

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?

Crashes with 32-bit label image

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.

Fiji crashes

Hi everyone,
I'm trying to obtain the ROI from a mask image (8bit) generated with cellpose.

  • I select single image
  • Load the mask .png (8bit)
    and as soon as I click on next, fijii is crashing and closing

thank you!!

request for multi-measure

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!

generated measurements table

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!

only save outlines/overlay as skeleton?

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.

Region of Interests do not show up in FIJI.

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.