On May 23, 2014, at 4:57 PM, Kurt Thorn wrote:
> I'm using Micro-mananger to acquire RGB images by taking three sequential images with a red, green, and blue LED. Our camera is 16-bit, so I'd like to be able to export these as 16-bit RGB tiffs for downstream processing (specifically, color correction) but this doesn't appear to be supported by ImageJ. Is 16bit RGB tiff support planned for ImageJ ever? Alternatively, does anyone have suggestions for an easy way to convert these 16-bit 3-channel tiffs to 16-bit RGB tiffs?
ImageJ saves 3 slice, 16-bit stacks as 48-bit RGB TIFFs if the label of the first slice is "Red". The images in the stack need to be in the range 0-65535 or other applications will not display the exported TIFF correctly. Here is a macro that adds the "Red" label and scales the images to 0-65535.
-wayne
if (bitDepth!=16 || nSlices!=3)
exit("3 slice, 16-bit stack required");
Stack.getStatistics(count, mean, min, stackMax, stdDev);
labels = newArray("Red", "Green", "Blue");
for (i=0; i<3; i++) {
setSlice(i+1);
setMetadata("label", labels[i]);
getRawStatistics(nPixels, mean, min, max);
scale = 65535/max * (max/stackMax);
run("Multiply...", "value=&scale slice");
setMinAndMax(0, 65535);
}
saveAs("tif", "");
> Thanks,
> Kurt
>
> --
> Kurt Thorn
> Director, Nikon Imaging Center
>
http://nic.ucsf.edu/blog/--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html