Open BrandonUL opened 1 year ago
@BrandonUL I don't have time to advise on the image analysis parts right now, but a couple of quick comments that might get you unstuck technically:
ij.py.run_macro('newImage("dummy", "8-bit", 1, 1, 1);')
Newer versions of ImageJ2 no longer require this hack. If you are using imagej.init()
(noargs) or imagej.init('2.13.1')
then you should be good to go already while running headless. :+1:
The original ImageJ is not available in this environment.
This happens when either:
A) You called imagej.init(add_legacy=False)
; or
B) You already created an ImageJ2 gateway in the current Python runtime, and are now trying to create a second one. Only one gateway at a time can have support for the original ImageJ. If you are using Jupyter, then the TL;DR: is to restart your kernel, then rerun the imagej.init
cell exactly once and do not rerun it again while developing your notebook.
@BrandonUL Were you able to make progress?
Hi @BrandonUL, just following up here. Did you make any progress or need any additional help here?
Hello! I have been playing around with
pyimagej
by completing the tutorial notebooks but I have ran into a few errors. I am reaching out for help and to see if anyone has done similar work and maybe have used different programs or code.A little background of what I am trying to do: I am currently trying to obtain the width and height of a singular object on an image, with the end goal of creating a batch system that allows me to insert the image into my code and obtain the dimensions automatically.
I have had luck using
ImageJ
by using theanalyzing particles
feature.This is my process for Image J:
Convert cropped images to a stack:
Per the tutorial I first ran:
which returns:
As per the next tutorial:
which returns:
The last tutorial I tried before reaching out had to do with analyzing particles like on
ImageJ
but it also did not work. Here is the code:Which returns:
Like I started off with, if anyone has experience with collecting width and heights of objects within an image using either
pyimagej
or other programs please let me know. Any and all help would be greatly appreciated as I am excited to use this package for my summer research project. I have also included the image of what I am trying to gather the dimensions of.