[ome-users] intensity scaling problem when saving a .dv file

Kai Schleicher kai.schleicher at unibas.ch
Wed Dec 14 15:22:49 GMT 2016


Hi Melissa,

thanks for your swift reply and the pull request.

> selectWindow("resaved_data.tif");
> run("Calibrate...", "function=[Straight Line] unit=[Gray Value]
> text1=[32768 65535] text2=[0 32767] show");
works, but when I wish to save the now calibrated image it changes the 
calibration back once again, i.e. a workaround using the macro language 
seems not possible.

> Alternatively, the 'bfconvert' command is not affected by this
> problem,
I am now using that and bfconvert works fine. Thanks!

Cheers,
Kai


On 12/13/2016 10:41 PM, Melissa Linkert wrote:
> Hi Kai,
>
>> I am having a curious problem when saving a 16-bit *.dv file (ID 17471 on
>> your sever). Please find below the code to see what exactly I did.
>>
>> In brief I open the raw data with the BF-importer, split the two channels,
>> close channel 0 and export channel 1 using the BF-exporter.
>>
>> When I then open the just saved image using the BF-importer, it appears to
>> be on a different intensity-scale (see attached screenshot).
> Thank you for the detailed report - I can reproduce this problem with
> Bio-Formats 5.3.0.
>
> The issue is that the original file has pixel type int16 (signed
> 16-bit), which is transformed to uint16 (unsigned 16-bit) during
> export.  We have a proposed fix here:
>
> https://github.com/openmicroscopy/bioformats/pull/2696
>
> but until there is a released fix you may be able to work around the
> problem by adding this to the macro after the exporter plugin is run:
>
> selectWindow("resaved_data.tif");
> run("Calibrate...", "function=[Straight Line] unit=[Gray Value]
> text1=[32768 65535] text2=[0 32767] show");
>
> Alternatively, the 'bfconvert' command is not affected by this
> problem, so you could instead convert the file to TIFF like this:
>
> bfconvert -range 1 1 raw_data.dv resaved_data.tif
>
> Regards,
> -Melissa
>
> On Tue, Dec 13, 2016 at 5:14 AM, Kai Schleicher
> <kai.schleicher at unibas.ch> wrote:
>> Hi,
>>
>> I am having a curious problem when saving a 16-bit *.dv file (ID 17471 on
>> your sever). Please find below the code to see what exactly I did.
>>
>> In brief I open the raw data with the BF-importer, split the two channels,
>> close channel 0 and export channel 1 using the BF-exporter.
>>
>> When I then open the just saved image using the BF-importer, it appears to
>> be on a different intensity-scale (see attached screenshot).
>>
>> My guess is that there's something wrong with the raw data since this
>> problem appears when using the BF-exporter as well as when using FIJIs own
>> "save as -> tiff". The problem also appears when exporting as ome-tiff
>> rather then tif.
>>
>> Thanks for your help and cheers,
>> Kai
>>
>> -------
>> run("Bio-Formats Importer", "open=/home/kai/DATA/IMCF/raw/raw_data.dv
>> autoscale color_mode=Default rois_import=[ROI manager] split_channels
>> view=Hyperstack stack_order=XYCZT");
>> selectWindow("raw_data.dv - C=0");
>> close();
>> wait(1000); // imagej-voodoo
>> selectWindow("raw_data.dv - C=1");
>> run("Bio-Formats Exporter", "save=/home/kai/DATA/IMCF/raw/resaved_data.tif
>> compression=Uncompressed");
>> run("Bio-Formats Importer", "open=/home/kai/DATA/IMCF/raw/resaved_data.tif
>> autoscale color_mode=Default rois_import=[ROI manager] view=Hyperstack
>> stack_order=XYCZT");
>> selectWindow("raw_data.dv - C=1");
>> run("Histogram");
>> selectWindow("resaved_data.tif");
>> run("Histogram");
>> selectWindow("raw_data.dv - C=1");
>> resetMinAndMax();
>>
>>
>>
>> --
>>
>>>> Please note my NEW PHONE NUMBERS: +41 61 207 57 31 (direct) +41 61 207 22
>>>> 50 (central)<<
>> Kai Schleicher, PhD | Research Associate in Advanced Light Microscopy |
>> Biozentrum, University of Basel | Klingelbergstrasse 50/70 | CH-4056 Basel |
>> Phone: +41 61 207 57 31 (direct) +41 61 207 22 50 (central) |
>> kai.schleicher at unibas.ch | www.biozentrum.unibas.ch |
>> www.microscopynetwork.unibas.ch
>>
>>
>> _______________________________________________
>> ome-users mailing list
>> ome-users at lists.openmicroscopy.org.uk
>> http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users
>>



More information about the ome-users mailing list