Image Processing and Analysis

"Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearIM
Nikon Small World 2023 Photomicrography Competition
www.nikonsmallworld.com
11
0
"Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearIM
What are the best tools for debugging ImageJ Javascript macros?

Hi! I'm a self-taught novice programmer trying to write a macro in javascript for ImageJ. I've built a program that I think works, but trying to debug it without a proper debugger has been hell. I'm a hair away from just giving up and rewriting the whole thing in the macro language. I looked online and it seems like I should be able to set up a debugging environment in Visual Studio Code, but I couldn't find any guide for doing that specifically for ImageJ. I use Visual Studio Code to write my javascript, but any advice on any platform would be helpful. Thank you!

4
2
"Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearIM
Anybody know of a way to undo all transformations on QuPath?

I don't really use QuPath, I don't like it. But the person before me used it to annotate images and now I need to transfer these ROIs/Annotations to ImageJ where my pipeline is. Managed to find a good script for exporting with annotations, but it seems this person transformed the images (differently each time fml), and I need them to be the right orientation because I'm transferring those annotations to another set of images of the same samples from another microscope. Needless to say, I need to do some image registration, a very easy task /s. So is there any way to at least revert back to the initial orientation before export so I make the registration easier? I'm using SIFT which isn't really capable of accounting for mirroring/flipping, so that step really needs to be fixed beforehand. Any ideas? Or at the very least, is there a way to extract transformation history from the Metadata or so such that I can at least use that info to programmatically revert in ImageJ?

4
0
"Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearIM
What’s next for bioimage analysis? [Nature Methods]
doi.org

The July 11th editorial in the journal, Nature Methods offers an overview of a suite of articles focused on the future of image analysis. The editorial and the technology feature are both available to read for free, while the other articles are paywalled. Here's an index of the articles for anyone who might be interested: - [What’s next for bioimage analysis?](https://doi.org/10.1038/s41592-023-01950-8), Nature Methods, 2023 [Editorial] - Loïc A. Royer, [The future of bioimage analysis: a dialog between mind and machine](https://doi.org/10.1038/s41592-023-01930-y). Nature Methods 20, 951–952 (2023). - Jun Ma & Bo Wan, [Towards foundation models of biological image segmentation](https://doi.org/10.1038/s41592-023-01885-0). Nature Methods 20, 953–955 (2023). - "Deep Cell team", [Scaling biological discovery at the interface of deep learning and cellular imaging](https://doi.org/10.1038/s41592-023-01931-x). Nature Methods 20, 956–957 (2023). - [Challenges and opportunities in bioimage analysis](). - Carpenter, A.E., Cimini, B.A. & Eliceiri, K.W. [Smart microscopes of the future](https://doi.org/10.1038/s41592-023-01912-0). Nature Methods 20, 962–964 (2023). - Malacrida, L. [Phasor plots and the future of spectral and lifetime imaging](https://doi.org/10.1038/s41592-023-01906-y). Nature Methods 20, 965–967 (2023). - Chen, J., Viana, M.P. & Rafelski, S.M. [When seeing is not believing: application-appropriate validation matters for quantitative bioimage analysis](https://doi.org/10.1038/s41592-023-01881-4). Nature Methods 20, 968–970 (2023). - Lambert, T., Waters, J. [Towards effective adoption of novel image analysis methods](https://doi.org/10.1038/s41592-023-01910-2). Nature Methods 20, 971–972 (2023). - Nogare, D.D., Hartley, M., Deschamps, J. _et al._ [Using AI in bioimage analysis to elevate the rate of scientific discovery as a community](https://doi.org/10.1038/s41592-023-01929-5). Nature Methods 20, 973–975 (2023). - Cimini, B.A., Eliceiri, K.W. [The Twenty Questions of bioimage object analysis](https://doi.org/10.1038/s41592-023-01919-7). Nature Methods 20, 976–978 (2023). - Rahmoon, M.A., Simegn, G.L., William, W. et al. [Unveiling the vision: exploring the potential of image analysis in Africa](https://doi.org/10.1038/s41592-023-01907-x). Nat Methods 20, 979–981 (2023). - Marx, V. [To share is to be a scientist](https://doi.org/10.1038/s41592-023-01927-7). Nature Methods 20, 984–989 (2023). [Technology Feature]

1
4
"Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearIM
Have a long-running ImageJ macro and want to see its progress?

I came across a small script that opens a window with a progress bar that increases after the completion of every iteration in a for loop. It's pretty useful in a big macro cycling through many images. Sometimes you just want to know your progress in batch mode. So here is the helpful script (from https://imagej.nih.gov/ij/macros/ProgressBar.txt): ``` // Progress Bar // // This macro demonstrates how to display status // information and a progress bar in a text window. // It uses the Plugins>New>Text Window command // to open a text window without a menu bar. title = "[Progress]"; run("Text Window...", "name="+ title +" width=25 height=2 monospaced"); for (i=0; i<100; i++) { print(title, "\\Update:"+i+"/"+100+" ("+(i*100)/100+"%)\n"+getBar(i, 100)); wait(200); } print(title, "\\Close"); function getBar(p1, p2) { n = 20; bar1 = "--------------------"; bar2 = "********************"; index = round(n*(p1/p2)); if (index<1) index = 1; if (index>n-1) index = n-1; return substring(bar2, 0, index) + substring(bar1, index+1, n); } ``` Note: if you using other nested for loops, ensure that the variable you choose isn't the same as the one here (i), except of course the for loop you're actually trying to find track the process of. Happy macroing!

1
0
"Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearIM
Plugin for Coords of nearest neighbor in ImageJ?

First of all, I am so happy that we're getting more and more members. Thank you all for joining! I'm going to post the first question on here. Ideally, we should always try to post example images when asking a question, but I'm hypocritically not doing it mainly because I think it's a straightforward question. I'm trying to do some analysis on histology images using ImageJ macro scripting (IJM language), and at some point in the script I have the coordinates of an approximate center of a cell, derived from it's cell body center of mass. However, my downstream quantification requires that I skeletonize. But now the coords may or may not fall on the 1-pixel wide skeleton. I need it to fall on it for subsequent analysis, so I want to find the nearest non-zero pixel to these coords on the skeleton image. I did come up with an approach, and the script is enclosed below. But.. it's a bit slow, and it needs to be much faster because the script is gigantic. The approach simply makes a circle centered on the coords I have, and the circle is only 10 pixels in radius, because it appears that's enough to capture the skeleton's nearest white pixel in all cases. Then I iterate through every pixel in this circular ROI computing its euclidean distance from my coords only if it's non-zero (white). **Question**: So you see how it's not a quick approach, and if there is a plugin to do this instead, it would be so much faster because it's skipping the wrapping. For context, this is part of a nested for loop for many many objects in many many regions in hundreds of images. Here is the code: ``` // Making a circular 10-px radius ROI centered on coords makeEllipse(CoordX-10, CoordY, CoordX+10, CoordY, 1); Roi.getContainedPoints(containedX, containedY); // Iterating through all pixels contained in the search circle // Euclidean distance is calculated for non-zero pixels and tabulated Table.create("Non-Zero Contained Pixels"); for (p = 0; p < containedX.length; p++) { value = getPixel(containedX[p], containedY[p]); selectWindow("Non-Zero Contained Pixels"); // Keeping indexing for the table independent of the loop as many pixels will be skipped outOfLoopSize = Table.size; if (value == 255) { distance = sqrt(pow(containedX[p]-CoordX, 2)+pow(containedY[p]-CoordY, 2)); Table.set("CoordIndex", outOfLoopSize, p); Table.set("Distance", outOfLoopSize, distance);  } } selectWindow("Non-Zero Contained Pixels"); // Sorting by distance and setting new coordinates Table.sort("Distance"); Table.update; nearestNeighbor = Table.get("CoordIndex", 0); // Setting the new seed pixel for downstream quantification seedX = containedX[nearestNeighbor]; seedY = containedY[nearestNeighbor]; close("Non-Zero Contained Pixels"); // Add computed seed for Sholl analysis // i refers to a much larger for loop, just writing this for contextual information for this script excerpt selectWindow("Skeleton" + i); run("Select None"); Overlay.clear updateDisplay(); makePoint(seedX, seedY, "small yellow hybrid"); ``` Thanks a lot! And keep spreading the word :D

1
0
"Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearIM
Haven't forgotten about this community

I know I'm not posting anything, but I didn't abandon the place lol. I'm just waiting to have at least ten or so members, because it's a problem-solution oriented community, so we need someone to come in and drop a problem so people can offer solutions. I'm very inexperienced in these things, so I have no idea how to promote this place to grow it, any ideas?

1
0
"Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearIM
Welcome to the community! (if you're reading this lol)

Kinda sad, I'm the only one here lol. But given the beginning of the downfall of Reddit, I thought I'd migrate here and make a community about my interests. I hope whoever joins spreads the word and we can make this a lively, informative, and helpful community for all image analysts out there. I mostly work with FIJI (ImageJ) and ilastik, and I hope all the new joiners have other expertise that can diversify this community more and more.

1
0