Warning: Can't synchronize with repository "(default)" (/home/git/ome.git does not appear to be a Git repository.). Look in the Trac log for more information.
Ticket #12121: 0004-specification-Add-Iris-enum.patch
File 0004-specification-Add-Iris-enum.patch,
5.6 KB
(added by rleigh, 10 years ago) |
|
-
From 67b54e0d7fa7ca17a353afa518557f00f0db5ad3 Mon Sep 17 00:00:00 2001
From: Roger Leigh <r.leigh@dundee.ac.uk>
Date: Fri, 18 Apr 2014 15:56:46 +0100
Subject: [PATCH 4/7] specification: Add Iris enum
---
.../formats-api/src/loci/formats/meta/MetadataConverter.java | 2 +-
components/formats-gpl/src/loci/formats/in/ZeissCZIReader.java | 4 +++-
components/formats-gpl/src/loci/formats/in/ZeissLSMReader.java | 6 +++++-
components/specification/released-schema/2013-10-dev-2/ome.xsd | 10 ++++++++--
.../specification/src/ome/specification/XMLMockObjects.java | 3 ++-
5 files changed, 19 insertions(+), 6 deletions(-)
diff --git a/components/formats-api/src/loci/formats/meta/MetadataConverter.java b/components/formats-api/src/loci/formats/meta/MetadataConverter.java
index a1f28b8..b3ca4cc 100644
a
|
b
|
public final class MetadataConverter { |
1552 | 1552 | catch (NullPointerException e) { } |
1553 | 1553 | |
1554 | 1554 | try { |
1555 | | Boolean iris = src.getObjectiveIris(i, q); |
| 1555 | Iris iris = src.getObjectiveIris(i, q); |
1556 | 1556 | dest.setObjectiveIris(iris, i, q); |
1557 | 1557 | } |
1558 | 1558 | catch (NullPointerException e) { } |
-
diff --git a/components/formats-gpl/src/loci/formats/in/ZeissCZIReader.java b/components/formats-gpl/src/loci/formats/in/ZeissCZIReader.java
index 3b5afd9..2c5eff3 100644
a
|
b
|
import loci.formats.meta.MetadataStore; |
55 | 55 | import ome.xml.model.enums.AcquisitionMode; |
56 | 56 | import ome.xml.model.enums.Binning; |
57 | 57 | import ome.xml.model.enums.IlluminationType; |
| 58 | import ome.xml.model.enums.Iris; |
58 | 59 | import ome.xml.model.primitives.Color; |
59 | 60 | import ome.xml.model.primitives.NonNegativeInteger; |
60 | 61 | import ome.xml.model.primitives.PercentFraction; |
… |
… |
public class ZeissCZIReader extends FormatReader { |
2301 | 2302 | } |
2302 | 2303 | String iris = getFirstNodeValue(objective, "Iris"); |
2303 | 2304 | if (iris != null) { |
2304 | | store.setObjectiveIris(new Boolean(iris), 0, i); |
| 2305 | Boolean irisValue = new Boolean(iris); |
| 2306 | store.setObjectiveIris(irisValue.booleanValue() == true ? Iris.PRESENT : Iris.ABSENT, 0, i); |
2305 | 2307 | } |
2306 | 2308 | } |
2307 | 2309 | } |
-
diff --git a/components/formats-gpl/src/loci/formats/in/ZeissLSMReader.java b/components/formats-gpl/src/loci/formats/in/ZeissLSMReader.java
index d7ffbec..257062a 100644
a
|
b
|
import loci.formats.tiff.TiffCompression; |
53 | 53 | import loci.formats.tiff.TiffConstants; |
54 | 54 | import loci.formats.tiff.TiffParser; |
55 | 55 | |
| 56 | import ome.xml.model.enums.Iris; |
56 | 57 | import ome.xml.model.primitives.Color; |
57 | 58 | import ome.xml.model.primitives.NonNegativeInteger; |
58 | 59 | import ome.xml.model.primitives.PositiveFloat; |
… |
… |
public class ZeissLSMReader extends FormatReader { |
1300 | 1301 | recording.magnification, instrument, 0); |
1301 | 1302 | } |
1302 | 1303 | store.setObjectiveLensNA(recording.lensNA, instrument, 0); |
1303 | | store.setObjectiveIris(recording.iris, instrument, 0); |
| 1304 | if (recording.iris != null) { |
| 1305 | store.setObjectiveIris(recording.iris.booleanValue() == true ? Iris.PRESENT : Iris.ABSENT, |
| 1306 | instrument, 0); |
| 1307 | } |
1304 | 1308 | store.setObjectiveID(objectiveID, instrument, 0); |
1305 | 1309 | } |
1306 | 1310 | else if (block instanceof Laser) { |
-
diff --git a/components/specification/released-schema/2013-10-dev-2/ome.xsd b/components/specification/released-schema/2013-10-dev-2/ome.xsd
index db31ccb..19d8880 100644
a
|
b
|
|
1597 | 1597 | </xsd:documentation> |
1598 | 1598 | </xsd:annotation> |
1599 | 1599 | </xsd:attribute> |
1600 | | <xsd:attribute name="Iris" use="optional" type="xsd:boolean"> |
| 1600 | <xsd:attribute name="Iris" use="optional"> |
1601 | 1601 | <xsd:annotation> |
1602 | 1602 | <xsd:documentation> |
1603 | | Records whether or not the objective was fitted with an Iris. [flag] |
| 1603 | Records whether or not the objective was fitted with an Iris. Present if an Iris is present, or else Absent. |
1604 | 1604 | </xsd:documentation> |
1605 | 1605 | </xsd:annotation> |
| 1606 | <xsd:simpleType> |
| 1607 | <xsd:restriction base="xsd:string"> |
| 1608 | <xsd:enumeration value="Absent"/> |
| 1609 | <xsd:enumeration value="Present"/> |
| 1610 | </xsd:restriction> |
| 1611 | </xsd:simpleType> |
1606 | 1612 | </xsd:attribute> |
1607 | 1613 | </xsd:extension> |
1608 | 1614 | </xsd:complexContent> |
-
diff --git a/components/specification/src/ome/specification/XMLMockObjects.java b/components/specification/src/ome/specification/XMLMockObjects.java
index 9c2afe3..3754eeb 100644
a
|
b
|
import ome.xml.model.enums.ExperimentType; |
99 | 99 | import ome.xml.model.enums.FilamentType; |
100 | 100 | import ome.xml.model.enums.FilterType; |
101 | 101 | import ome.xml.model.enums.IlluminationType; |
| 102 | import ome.xml.model.enums.Iris; |
102 | 103 | import ome.xml.model.enums.Medium; |
103 | 104 | import ome.xml.model.enums.Immersion; |
104 | 105 | import ome.xml.model.enums.LaserType; |
… |
… |
public class XMLMockObjects |
369 | 370 | objective.setCalibratedMagnification(1.0); |
370 | 371 | objective.setCorrection(CORRECTION); |
371 | 372 | objective.setImmersion(IMMERSION); |
372 | | objective.setIris(true); |
| 373 | objective.setIris(Iris.PRESENT); |
373 | 374 | objective.setLensNA(0.5); |
374 | 375 | objective.setNominalMagnification(1.5); |
375 | 376 | objective.setWorkingDistance(1.0); |
Download in other formats:
1.3.13-PRO © 2008-2011
Agilo Software all
rights reserved
(this page was served in: 0.23662 sec.)