Pixel Inspection Tool - alternate ROI

Hi everyone,

I’m interested in capturing pixel values within a fixed ROI that is rectangular. I’m able to use the Pixel Inspection Tool to accomplish this in a square matrix. Is anyone aware of a way to alter the matrix or use an alternative tool that will recruit all pixel values within the ROI and allow for copy/export?

Thanks,
Mark

Hi @mprage,

not sure if ImageJ/Fiji have this functionality per default. But with CLIJ2 you can get pixel intensities of a custom rectangle into the results table by using a custom macro:

run("Blobs (25K)");
makeRectangle(78, 109, 10, 9);

// init GPU
run("CLIJ2 Macro Extensions", "cl_device=");

// push current selection to GPU memory
image = getTitle();
Ext.CLIJ2_pushCurrentSelection(image);

// pull image back to the results table
run("Clear Results");
Ext.CLIJ2_pullToResultsTable(image);

May I ask what you would do next with this table of numbers?

Cheers,
Robert

1 Like

In between the lines it reads as if you are after an irregular ROI, but in both cases, doesn’t Roi.getContainedPoints combined with a for loop over x and over y do what you want?
The even simpler solution to a rectangular region is this:

run("AuPbSn 40 (56K)");
makeRectangle(188, 43, 26, 21);
run("Duplicate...", "title=AuPbSn40-1.txt");
saveAs("Text Image",getDirectory("temp")+"AuPbSn40-1.txt");

1 Like

Many thanks for the solutions!

The purpose is to count the number of pixels within a range +/- std dev and estimate the thickness of an object of known thickness between two contrast interfaces.