When do Bioformat do auto normalization?

Dears,

Can anyone tell me when Bioformat do auto-normalization after reading .minc file ?
I have two .minc files and both are read by bioformat. Pixel values in one file is normalized while another is not. I wonder if I can control the normalization by myself ? Below is my code to read in the .minc files. Thanks.

final List<BufferedImage> bufferImageList = new ArrayList<BufferedImage>();

final IFormatReader reader = new ImageReader();
 
reader.setId(filePath);

final BufferedImageReader buffReader = new BufferedImageReader(reader);

		for (int i = 0; i < buffReader.getSizeZ(); i++)
		{
			bufferImageList.add(buffReader.openImage(i));
		}

		buffReader.close();

P.S. I used BufferedImageReader instead of BF.openImagePlus() since I attempt to get the original bufferedImage instead of the normalized one by imagePlus.getBufferedImage(). It is the right way to do so? Thanks

Hi @blueclowd,

it might be worth a try to explicitly disable autoscaling by passing an ImporterOptions object of your liking:

// Adapted from http://imagej.net/Bio-Formats#Scripting
ImporterOptions options = new ImporterOptions();
options.setId(filePath);
options.setAutoscale(false);
ImagePlus[] imps = BF.openImagePlus(options);

As pointed out by @ctrueden in the other thread, the use of BufferedImageReader is in general not encouraged.

If this does not solve your issue, you can always post to the OME developer mailinglist at http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel/

All the best,
Stefan

1 Like

Hi @stelfrich

Thanks again for your help. I modified my program and it still did the auto scale. I will try to consult with the OME developer as you suggested. Further progress will be updated here. Thanks

Note that “autoscale” is not pixel normalization. The Autoscale option only affects the display min and max. Your data should be unchanged either way. If your pixels are being normalized somehow, that must be a function of the MINC reader itself. Definitely ask the OME team, or better yet, peruse the source.

2 Likes