You can do a quick fix for the per_sample_scale_range.ijm macro where it checks if the image if its RGB. You can use eval() in ImageJ Macro to run the javascript code for checking if its RGB. I know flag is supposed to be 1 or 0 :), but I just kept it the same for simplicity.
Let me know if you want me to send a pull request or anything. I'm not sure where to though.
//script returns 4 if its rgb: https://imagej.nih.gov/ij/developer/api/ij/ij/ImagePlus.html#getType()
flag_rgb=eval("script", "importClass(Packages.ij.IJ);\nIJ.getImage().getType()");
// Convert the RGB image as a stack of slices so it processes the intensity of each slice.
if (flag_rgb==4){
run("Make Composite");
run("Stack to Images");
run("Concatenate...", " title=stack image1=[Red] image2=[Green] image3=[Blue]");
}
At line 102:
// EXECUTE THE FUNCTION TO THE WHOLE IMAGE
percentile_normalization(min_percentile, max_percentile, nBins);
// Convert the slices into channel to avoid confussion between 3D and multichannel images.
if (flag_rgb==4){
run("Properties...", "channels=3 slices=1 frames=1 pixel_width=1.0000 pixel_height=1.0000 voxel_depth=1.0000");
}
Hi @esgomezm
You can do a quick fix for the per_sample_scale_range.ijm macro where it checks if the image if its RGB. You can use
eval()
in ImageJ Macro to run the javascript code for checking if its RGB. I know flag is supposed to be 1 or 0 :), but I just kept it the same for simplicity. Let me know if you want me to send a pull request or anything. I'm not sure where to though.At line 102:
Cheers Pradeep