[ome-devel] BioFormats Export/Import of Composite Images
Sebastien Besson (Staff)
s.besson at dundee.ac.uk
Wed Jun 28 10:09:51 BST 2017
For cross-references purposes,
following the initial exchange on the Pull Request [1], this RFE has now been migrated
to the following card [2] for discussion and investigation of potential solutions.
Sebastien
[1] https://github.com/openmicroscopy/bioformats/pull/2670#issuecomment-310636698
[2] https://trello.com/c/KHxM1IIe/14-imagej-imageplus-slicelabel-modification
On 23 Jun 2017, at 12:01, Michael Ellis <michael.ellis at dsuk.biz<mailto:michael.ellis at dsuk.biz>> wrote:
Dear Bioformats folk,
Re: Pull Request #2670 https://github.com/openmicroscopy/bioformats/pull/2670
Back on November 22nd 2016 I submitted a pull request for a change to be made to the BioFormats ImageJ ImageReader plugin. It seems to have been closed and as far as I can see… forgotten.
The change requested is important to me but also, I believe, is in the best interest of the community at large. Even considering the backwards compatibility issues raised with the suggested change (1), iIstill believe the change is in the interest for all who may use the BioFormats ImageJ ImageReader plugin.
Since the change was rejected for the release of the 5.x release can anyone tell me where and how I can track the progress of this PR in the context of 6.x project.
— Michael Ellis
On 23 Nov 2016, at 20:38, Sebastien Besson (Staff) <s.besson at dundee.ac.uk<mailto:s.besson at dundee.ac.uk>> wrote:
Hi Michael,
thanks for submitting your proposed contribution. We will be reviewing it and will get back
to you directly via the Pull Request.
As we are currently focused on our API additions to Bio-Formats 5.3.0 [1], please bear with
us if our answer takes a few days.
Best regards,
Sebastien
[1] http://blog.openmicroscopy.org/data-model/future-plans/2016/11/01/bf-status/
On 22 Nov 2016, at 13:46, Michael Ellis <michael.ellis at dsuk.biz<mailto:michael.ellis at dsuk.biz>> wrote:
Thanks for the information. I think I have complied with the necessary instructions and now generated a pull request
https://github.com/openmicroscopy/bioformats/pull/2670
And it looks like some further automated tests are now running
https://travis-ci.org/openmicroscopy/bioformats/builds/177969138
What happens next?
For the record my commit text is as follows:
———————————————————————————————————
Include BioFormats channel name, where present, into the ImagePlus slice label.
constructSliceLabel() previously created the slice label based upon the BioFormats time, position, z position and channel position and then appended the image name, where present. For example a generated slice name might look like:
"c:1/4 z:2/3 t:1/3 - ExImageName"
This meant that the image name was replicated for every channel and in any case is redundant since the image name is also present in the ImagePlus image title (displayed in the ImagePlus window title).
Additionally any channel names specified in the BioFormats file was simply ignored.
This fix does two things
1. If the BioFormat image file has a non empty channel name defined for a channel, the slice label uses this in preference to the c:i/j channel position specifier. This seems reasonable as it provides extra information and ImageJ displays the relative channel position anyway.
2. Omits the appending of the image name to every image slice (avoiding needless replication of information that is already present with ImagePlus.getTitle().
———————————————————————————————————
On 21 Nov 2016, at 15:00, Sebastien Besson (Staff) <s.besson at dundee.ac.uk<mailto:s.besson at dundee.ac.uk>> wrote:
Dear Michael,
the way to propose changes against Bio-Formats is to open a Pull Request against the development
line - see the CONTRIBUTING [1] file at the top-level of the Bio-Formats source code repository for
more information.
You can also find general information in the OME Contributing Developer documentation [2].
Best regards,
Sebastien
[1] https://github.com/openmicroscopy/bioformats/blob/develop/CONTRIBUTING.md
[2] https://www.openmicroscopy.org/site/support/contributing/
On 18 Nov 2016, at 17:45, Michael Ellis <michael.ellis at dsuk.biz<mailto:michael.ellis at dsuk.biz>> wrote:
Having managed to build and test the BioFormat Image plugins now I put forward the following as a fix so the Import imports BioFormats channel names:
In particular, I put forward that line 625
String imageName = meta.getChannelName(series,zct[1]);
This seems to do the trick!
Is there a way to submit this fix for consideration in the inclusion of the BioFormats project and if so how do I do that?
— Michael Ellis
On 18 Nov 2016, at 17:01, Michael Ellis <michael.ellis at dsuk.biz<mailto:michael.ellis at dsuk.biz>> wrote:
Further to this reported problem with Bio-Formats importer failing to populate the ImagePlus object with a slice name based on the BioFormats channel name (see https://trac.openmicroscopy.org/ome/ticket/13306) I put forward the following:
The code for setting the line label is to be found in the function constructSliceLabel() in the file:
https://github.com/openmicroscopy/bioformats/blob/develop/components/bio-formats-plugins/src/loci/plugins/in/ImagePlusReader.java
In particular, I put forward that line 625
String imageName = meta.getImageName(series);
Should be changed to
String imageName = meta.getChannelName(ndx, cCount);
That is to say, the BioFormats channel name (where present), will be happened to the constructed slice name, rather than appending the BioFormats image name.
I have tried to build my own copy of the BioFormats ImageJ plugins but have so far failed.
Is there any way this one line fix could incorporated?
I really think this is probably what was intended in the first place as it would seem to be of little value to repeat the image name for every slice when the image name is already present in the ImagePlus as the image title.
— Michael Ellis
On 19 Oct 2016, at 10:52, Balaji Ramalingam (Staff) <b.ramalingam at dundee.ac.uk<mailto:b.ramalingam at dundee.ac.uk>> wrote:
Hi,
Thank you for the update again.
We have been reviewing the body of work on the Bio-Formats import/export front, which includes populating the ImagePlus object appropriately.
I have updated the ticket again, with your latest comments.
This will get looked into at the earliest.
Thanks again,
Best,
Balaji
__________________
Mr Balaji Ramalingam
Software Developer
OME Team
School of Life Sciences
University of Dundee
From: ome-devel <ome-devel-bounces at lists.openmicroscopy.org.uk<mailto:ome-devel-bounces at lists.openmicroscopy.org.uk>> on behalf of Michael Ellis <michael.ellis at dsuk.biz<mailto:michael.ellis at dsuk.biz>>
Reply-To: OME External Developer List <ome-devel at lists.openmicroscopy.org.uk<mailto:ome-devel at lists.openmicroscopy.org.uk>>
Date: Tuesday, 18 October 2016 at 15:50
To: OME External Developer List <ome-devel at lists.openmicroscopy.org.uk<mailto:ome-devel at lists.openmicroscopy.org.uk>>
Cc: ImageJ Interest Group <IMAGEJ at LIST.NIH.GOV<mailto:IMAGEJ at LIST.NIH.GOV>>
Subject: Re: [ome-devel] BioFormats Export/Import of Composite Images
Dear Balaji,
Thank you for the update. It seems the the ImageJ BioFormats Importer also fails to set the ImageJ pixel size in accordance with the metadata physicalSizeX/YZ parameters.
Unit<Length> unit = UNITS.MICROMETER;
Length physicalSizeX = new Length(1.0, unit);
Length physicalSizeY = new Length(1.5, unit);
Length physicalSizeZ = new Length(2, unit);
— Michael Ellis
On 18 Oct 2016, at 15:25, Balaji Ramalingam (Staff) <b.ramalingam at dundee.ac.uk<mailto:b.ramalingam at dundee.ac.uk>> wrote:
Hi,
Thank you for sharing your issue and the code as well.
We were able to reproduce the issue and I have added a reference to an
existing ticket (to handle the slice labels appropriately in the
Bio-Formats Exporter as well),
https://trac.openmicroscopy.org/ome/ticket/13306
This will get looked into at the earliest, and since you are already part
of the cc list, you will get notified when there is a status change on the
ticket.
Hope that helps.
Best,
Balaji
__________________
Mr Balaji Ramalingam
Software Developer
OME Team
School of Life Sciences
University of Dundee
On 13/10/2016, 15:43, "ome-devel on behalf of Michael Ellis"
<ome-devel-bounces at lists.openmicroscopy.org.uk<mailto:ome-devel-bounces at lists.openmicroscopy.org.uk> on behalf of
michael.ellis at dsuk.biz<mailto:michael.ellis at dsuk.biz>> wrote:
Is it possible to use the BioFormat Exporter to save a multi-slice
composite images, and then have the BioFormats Importer import that image
restoring the ImageJ slice names and slice LUTS?
This ImageJ script creates a 4 channel composite image, with channel
names and luts specified.
newImage("MyStack", "8-bit random", 256, 256, 4);
run("Make Composite", "display=Composite");
setSlice(1);
run("Set Label...", "label=Dapi");
run("Blue");
setSlice(2);
run("Set Label...", "label=Fitc");
run("Green");
setSlice(3);
run("Set Label...", "label=TxRed");
run("Red");
setSlice(4);
run("Set Label...", "label=Aqua");
run("Cyan");
If I use BioFormats Exporter/Importer on this image, the slice labels and
slice LUTS are not restored.
The created file certainly has the slice name information as can be seen
from the .ome.tif header
<OME UUID="urn:uuid:9ac10dd4-2ed8-4a6e-a5ec-8a7a8309f327"
xmlns="http://www.openmicroscopy.org/Schemas/OME/2015-01"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.openmicroscopy.org/Schemas/OME/2015-01
http://www.openmicroscopy.org/Schemas/OME/2015-01/ome.xsd">
<Image ID="Image:0">
<Pixels BigEndian="false" DimensionOrder="XYCZT" ID="Pixels:0"
Interleaved="false" PhysicalSizeX="1.0" PhysicalSizeXUnit="μm"
PhysicalSizeY="1.0" PhysicalSizeYUnit="μm" PhysicalSizeZ="1.0"
PhysicalSizeZUnit="μm" SignificantBits="8" SizeC="4" SizeT="1"
SizeX="256" SizeY="256" SizeZ="1" TimeIncrement="0.0"
TimeIncrementUnit="s" Type="uint8">
<Channel Color="-16776961" ID="Channel:0:0" Name="Dapi"
SamplesPerPixel="1">
<LightPath/>
<Channel Color="-16711936" ID="Channel:0:1" Name="Fitc"
SamplesPerPixel="1">
<LightPath/>
<Channel Color="-65536" ID="Channel:0:2" Name="TxRed" SamplesPerPixel="1">
<LightPath/>
<Channel Color="-16711681" ID="Channel:0:3" Name="Aqua"
SamplesPerPixel="1">
<LightPath/>
<TiffData FirstC="0" FirstT="0" FirstZ="0" IFD="0" PlaneCount="1">
<UUID
FileName="FromImageJ.ome.tif">urn:uuid:9ac10dd4-2ed8-4a6e-a5ec-8a7a8309f32
7</UUID>
<TiffData FirstC="1" FirstT="0" FirstZ="0" IFD="1" PlaneCount="1">
<UUID
FileName="FromImageJ.ome.tif">urn:uuid:9ac10dd4-2ed8-4a6e-a5ec-8a7a8309f32
7</UUID>
<TiffData FirstC="2" FirstT="0" FirstZ="0" IFD="2" PlaneCount="1">
<UUID
FileName="FromImageJ.ome.tif">urn:uuid:9ac10dd4-2ed8-4a6e-a5ec-8a7a8309f32
7</UUID>
<TiffData FirstC="3" FirstT="0" FirstZ="0" IFD="3" PlaneCount="1">
<UUID
FileName=³FromImageJ.ome.tif">urn:uuid:9ac10dd4-2ed8-4a6e-a5ec-8a7a8309f32
7</UUID>
_______________________________________________
ome-devel mailing list
ome-devel at lists.openmicroscopy.org.uk<mailto:ome-devel at lists.openmicroscopy.org.uk>
http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel
The University of Dundee is a registered Scottish Charity, No: SC015096
_______________________________________________
ome-devel mailing list
ome-devel at lists.openmicroscopy.org.uk<mailto:ome-devel at lists.openmicroscopy.org.uk>
http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel
Michael Ellis (Managing Director)
Digital Scientific UK Ltd.
http://www.dsuk.biz<http://www.dsuk.biz/>
michael.ellis at dsuk.biz<mailto:michael.ellis at dsuk.biz>
tel: +44(0)1223 911215
The Commercial Centre
6 Green End
Cambridge
CB23 7DY
The University of Dundee is a registered Scottish Charity, No: SC015096
_______________________________________________
ome-devel mailing list
ome-devel at lists.openmicroscopy.org.uk<mailto:ome-devel at lists.openmicroscopy.org.uk>
http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel
Michael Ellis (Managing Director)
Digital Scientific UK Ltd.
http://www.dsuk.biz<http://www.dsuk.biz/>
michael.ellis at dsuk.biz<mailto:michael.ellis at dsuk.biz>
tel: +44(0)1223 911215
The Commercial Centre
6 Green End
Cambridge
CB23 7DY
_______________________________________________
ome-devel mailing list
ome-devel at lists.openmicroscopy.org.uk<mailto:ome-devel at lists.openmicroscopy.org.uk>
http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel
Michael Ellis (Managing Director)
Digital Scientific UK Ltd.
http://www.dsuk.biz<http://www.dsuk.biz/>
michael.ellis at dsuk.biz<mailto:michael.ellis at dsuk.biz>
tel: +44(0)1223 911215
The Commercial Centre
6 Green End
Cambridge
CB23 7DY
_______________________________________________
ome-devel mailing list
ome-devel at lists.openmicroscopy.org.uk<mailto:ome-devel at lists.openmicroscopy.org.uk>
http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel
The University of Dundee is a registered Scottish Charity, No: SC015096
_______________________________________________
ome-devel mailing list
ome-devel at lists.openmicroscopy.org.uk<mailto:ome-devel at lists.openmicroscopy.org.uk>
http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel
Michael Ellis (Managing Director)
Digital Scientific UK Ltd.
http://www.dsuk.biz<http://www.dsuk.biz/>
michael.ellis at dsuk.biz<mailto:michael.ellis at dsuk.biz>
tel: +44(0)1223 911215
The Commercial Centre
6 Green End
Cambridge
CB23 7DY
_______________________________________________
ome-devel mailing list
ome-devel at lists.openmicroscopy.org.uk<mailto:ome-devel at lists.openmicroscopy.org.uk>
http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel
The University of Dundee is a registered Scottish Charity, No: SC015096
_______________________________________________
ome-devel mailing list
ome-devel at lists.openmicroscopy.org.uk<mailto:ome-devel at lists.openmicroscopy.org.uk>
http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel
_______________________________________________
ome-devel mailing list
ome-devel at lists.openmicroscopy.org.uk<mailto:ome-devel at lists.openmicroscopy.org.uk>
http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel
The University of Dundee is a registered Scottish Charity, No: SC015096
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openmicroscopy.org.uk/pipermail/ome-devel/attachments/20170628/1920d8b0/attachment.html>
More information about the ome-devel
mailing list