Skip to content

Commit 3e58906

Browse files
authored
Merge pull request #103 from imcf/issues/101
Add methods to access units for physical pixel sizes
2 parents 4ca7b3c + 4ab9f38 commit 3e58906

1 file changed

Lines changed: 23 additions & 2 deletions

File tree

bioformats/omexml.py

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -608,15 +608,36 @@ def get_PixelType(self):
608608
'''
609609
return self.node.get("Type")
610610

611+
def get_PhysicalSizeXUnit(self):
612+
'''The unit of length of a pixel in X direction.'''
613+
return self.node.get("PhysicalSizeXUnit")
614+
def set_PhysicalSizeXUnit(self, value):
615+
self.node.set("PhysicalSizeXUnit", str(value))
616+
PhysicalSizeXUnit = property(get_PhysicalSizeXUnit, set_PhysicalSizeXUnit)
617+
618+
def get_PhysicalSizeYUnit(self):
619+
'''The unit of length of a pixel in Y direction.'''
620+
return self.node.get("PhysicalSizeYUnit")
621+
def set_PhysicalSizeYUnit(self, value):
622+
self.node.set("PhysicalSizeYUnit", str(value))
623+
PhysicalSizeYUnit = property(get_PhysicalSizeYUnit, set_PhysicalSizeYUnit)
624+
625+
def get_PhysicalSizeZUnit(self):
626+
'''The unit of length of a voxel in Z direction.'''
627+
return self.node.get("PhysicalSizeZUnit")
628+
def set_PhysicalSizeZUnit(self, value):
629+
self.node.set("PhysicalSizeZUnit", str(value))
630+
PhysicalSizeZUnit = property(get_PhysicalSizeZUnit, set_PhysicalSizeZUnit)
631+
611632
def get_PhysicalSizeX(self):
612-
'''The length of a single pixel in microns in X direction'''
633+
'''The length of a single pixel in X direction.'''
613634
return get_float_attr(self.node, "PhysicalSizeX")
614635
def set_PhysicalSizeX(self, value):
615636
self.node.set("PhysicalSizeX", str(value))
616637
PhysicalSizeX = property(get_PhysicalSizeX, set_PhysicalSizeX)
617638

618639
def get_PhysicalSizeY(self):
619-
'''The length of a single pixel in microns in Y direction'''
640+
'''The length of a single pixel in Y direction.'''
620641
return get_float_attr(self.node, "PhysicalSizeY")
621642
def set_PhysicalSizeY(self, value):
622643
self.node.set("PhysicalSizeY", str(value))

0 commit comments

Comments
 (0)