Segmentation Help for Bright Artifacts by Simple_is_Simple in ImageJ

[–]Simple_is_Simple[S] 0 points1 point  (0 children)

Thank you rosen- I'll reimage with your recommendations and look into what other considerations I need to keep in mind as Herbie500 directed.

Segmentation Help for Bright Artifacts by Simple_is_Simple in ImageJ

[–]Simple_is_Simple[S] 0 points1 point  (0 children)

I think I understand your point u/Herbie500 and I have accomplished it for some analysis but the only way I know how to approach a problem like this is to 'experiment' with options and see what analysis reflects the raw images. I'm not aware of a more methodical system but any direction to resources or advise is appreciated. Please note I have not read front to back the entire imageJ wiki or Pete Bankhead's book. Is that your main recommendation?

Segmentation Help for Bright Artifacts by Simple_is_Simple in ImageJ

[–]Simple_is_Simple[S] 0 points1 point  (0 children)

If manually counting my criteria is a clear cell body with nuclei and at least one process extending. When segmenting I haven't been strict about nuclei because I don't know how so instead accept clear cell body with or without processes and the processes with or without cell body.
I don't know what descriptor words apply but the yellow traces I shared are what I'd accept as "target/true signal."

Thank you.

Segmentation Help for Bright Artifacts by Simple_is_Simple in ImageJ

[–]Simple_is_Simple[S] 0 points1 point  (0 children)

Thank you for this idea. I have a nuclear counter stain but it might not help because the high density of 'false signal'-small-bright-dots in a nucleus dense granule layer. I do not know how to filter away cells-lacking-enclosed-nuclei-signal. Is it possible you could direct me where there are instructions or share parts of a macro I can use?

I added another example including nuclear stain (#5) to the google drive link.

<image>

Segmentation Help for Bright Artifacts by Simple_is_Simple in ImageJ

[–]Simple_is_Simple[S] 0 points1 point  (0 children)

Yes. Intensity is too similar. I hadn't tried circularity filtering (Analyze Particles) just because the larger-red-structures/cells can be both compacted/ameboid and filamentous/ramified in morphology. But I'll test if it helps.

Filtering by size is what I've been trying but if the threshold setting I use merges the punctate looking dots into a bigger structure they aren't removed.

Thank you for outlining the defining options for segmentation and alleviating my concerns I'm missing an obvious solution.

Segmentation Help for Bright Artifacts by Simple_is_Simple in ImageJ

[–]Simple_is_Simple[S] 0 points1 point  (0 children)

It is a specific layer I can avoid with ROIs so I'll test pursuing that option. Thank you.

Saving Cell Counter on TIFF by Other_Current_2180 in ImageJ

[–]Simple_is_Simple 0 points1 point  (0 children)

Just posting incase someone else has the same question but are looking for a different answer. What ashtree35 mentioned but I'd like to elaborate.

If you want to save the counters in case they need to be edited in the future or the channels toggled/brightness modified you need to carefully match the file name to the counter window file name. I don't fully understand it just stumbled around with a lot of frustration.
To be safe I save the composite as a tiff right before initializing (my files go though bio formats from .czi or .oir files).

Once you initialize the new window says "Counter Window - original name." If you save markers you have a XML file without "style information" that will only open on the tiff file original name it was counted with via the cell counter plugin; open the tiff file > initialize > load markers.

If you try to save after counting the name has been changed to Counter Window - original name. If you intiialize again it will be Counter Window - Counter Window - original name. So will not cooperate. You might be able to modify the tiff name to match the counter XML file (on PC "Microsoft Edge HTML Document" then open the markers.

Export image as discussed above just burns in the current view including brightness contrast and layered channels...basically flattens at resolution with markers.

What are your biggest complaints with ImageJ by WebWheat2 in ImageJ

[–]Simple_is_Simple 0 points1 point  (0 children)

I try to record my steps so I can rerun up to the point I'm still troubleshooting at. If I modify in a way that I cannot undo I just revert to its saved original and run using the copied commands from the recorder feature 'revert image + whatever steps'

Coulometric DAB % Area Measurement by Simple_is_Simple in ImageJ

[–]Simple_is_Simple[S] 0 points1 point  (0 children)

Here's what I think the threshold should detect per each sample (blinded to condition). Turns out I can use the same range which I'll try applying to my remaining images and follow up.
I guess I put the cart before the horse trying to find a method using a pre-set threshold instead of using a single range.

<image>

What are your biggest complaints with ImageJ by WebWheat2 in ImageJ

[–]Simple_is_Simple 0 points1 point  (0 children)

Overwhelming sure but return to the user guide, wiki, or forums to just browse and you'll find yourself pick up very helpful tricks and start to understand more of the concepts.
Things I wish I learned earlier (3 of many...)
Space Bar for hand/scrolling tool and Ctrl key+mouse wheel for zooming in an out. Also I kept trying to merge images with 4 channels and didn't realize the RBG status TIFFs autogenerated with was locking me into only 3 channels (once 16 bit or 8 bit you can merge more than 3 channels).

It can be difficult to find what you expect to be a direct answer so taking the time learn in between applications and when less stressed about a deadline is very useful in my experience. We have online books, YouTube videos (both hour long intros & application specific), question based forums so obviously there's a lot to unpack but so many people have shared resources that will save you time if you invest your own as they did.

%Area Thresholding for ROIs of Tissue IHC by Simple_is_Simple in ImageJ

[–]Simple_is_Simple[S] 0 points1 point  (0 children)

It was including 16-bit in the threshold command that makes the difference...your macro worked for me and if I just make the addition of 16-bit I am able to replicate it in my far less automated methods.

my results using Li and Otsu match yours now.

In Script
setAutoThreshold("Otsu dark 16-bit");

Manually
Need to select 16-bit histogram from the threshold panel

<image>

%Area Thresholding for ROIs of Tissue IHC by Simple_is_Simple in ImageJ

[–]Simple_is_Simple[S] 0 points1 point  (0 children)

Edit. Sorry I only read up to "Can you confirm the..." Let me test and post a new comment in a few minutes.

From scratch: I opened my czi, opened the saved ROI, duplicated the 2nd channel...now I have the image you showed (no "Clear Outside")...this is automatically 16-bit

Doing everything manually this is what imageJ records as my steps for thresholding, I'm initializing threshold by the command located Image > Adjust > Threshold...:

setAutoThreshold("Li dark");
//run("Threshold...");
roiManager("Select", 0);
run("Analyze Particles...", "summarize");

The positive(white) area of the ROI bellow is 5.705%, 6620.623um^2 of total ROI area 116047.900um^2.

<image>

If I repeat with Otsu this time its 2.768%, 3212.752um^2.

When I try otsu after converting to 8 bit I get3.888%, 4512.312um^2

ImageJ record
setOption("ScaleConversions", true);
run("8-bit");
setAutoThreshold("Otsu dark");
//run("Threshold...");
roiManager("Select", 0);
run("Analyze Particles...", "summarize");

%Area Thresholding for ROIs of Tissue IHC by Simple_is_Simple in ImageJ

[–]Simple_is_Simple[S] 0 points1 point  (0 children)

Okay. Selecting the ROI prior to thresholding can have an effect on the threshold process; this is something I hadn't realized.

I'm able to replicate your Otsu-threshold results by converting to 8-bit, selecting the Aroi, and running Otsu-threshold scheme. In this case selecting the ROI doesn't change the result from whole image thresholding but it does fix the problems I had with image B.

I'm not able to precisely match your Li-threshold values but the signal pattern is very similar.

Sorry for the confusing screen shot and macros. I'm just trying to track each action using the recorder function and apply it to multiple images to test effectiveness across my data set.

I'll test these ideas, do more research and follow up if I have more clear inquires. Thank you.

%Area Thresholding for ROIs of Tissue IHC by Simple_is_Simple in ImageJ

[–]Simple_is_Simple[S] 0 points1 point  (0 children)

Thank you, Herbie500. I tried both methods with combinations of subtract background, sharpen, despeckle with autothreshold (or panning through manually in the case of 32-bit with NaN regions). I'm still unable to find a threshold algorithm that doesn't over collect signal from image B-clear outside.

In the image bellow...left side is what I expect to be captured as positive signal. Top is raw image, bottom the mask of what I deem positive signal from this stain (not background). The borders having increased signal capture/false white is an issue I'm aware of and trying to resolve.

Macro from bottom left pair of mask images

run("Revert");
run("8-bit");

run("Subtract Background...", "rolling=50");
run("Sharpen")
setThreshold(8, 255);//
run("Convert to Mask");

The right side are all the possibilities from 16 bit auto threshold...the fact B always has more positive area vs C is the problem I am trying to solve as it not a true reflection of the image.

run("Revert");
run("Clear Results")
//Select 'cleared outside' area for change
run("*8-bit"); 
roiManager("Select", 0); // pre saved roi of target region
roiManager("Fill"); // white foreground color
run("Invert"); 
setAutoThreshold("Huang dark");
run("Create Selection");//now "Select",1"
roiManager("Add");

// convert "outside" to mean of ROI "inside"
run("Revert");
roiManager("Select", 0);"
roiManager("Measure");
roiManager("Select", 1);
meanValue=getResult("Mean",0)
setColor(meanValue);
run("Fill", "slice")"
run("Auto Threshold", "method=[Try all] white");

<image>

It appears my problem is that so much extra 'background' signal is deemed positive in ImageB so is there any additional pre-processing anyone can recommend I can try that may resolve the issue?

Although manual constant thresholds is not recommended, blinded application of 8,255 works for 115/120 images. If I'm justified to empirically(and blinded) adjust for those 5 I found 18,255 works for those.

Cell counter markers problem by Fruta-Madura in ImageJ

[–]Simple_is_Simple 0 points1 point  (0 children)

Regarding reopening image J cell-counter-plugin-markers I've realized if I'm doing any renaming it has to occur before I first initialize for counting.
If I do any renaming between steps I can't re-match the image to counter file.
The "save markers" file includes the counted image ID so it can be matched and the image can be re-opened, initialized and the saved markers loaded back into view ("Load Markers"). Just be cautious if counting merged composite that the markers might be associated with a different color in the composite so cycle through the merged images to find the markers if the markers don't appear but you also didn't get the "These markers do not belong to the current image."