- support for tiled images
- poetry
This commit is contained in:
@@ -1,6 +0,0 @@
|
|||||||
#!/usr/bin/env python3
|
|
||||||
|
|
||||||
from tiffexplore import main
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
main()
|
|
||||||
27
pyproject.toml
Normal file
27
pyproject.toml
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
[tool.poetry]
|
||||||
|
name = "tiffexplore"
|
||||||
|
version = "2024.10.0"
|
||||||
|
description = "Explore a tiff structure."
|
||||||
|
authors = ["Wim Pomp, <wimpomp@gmail.com>"]
|
||||||
|
license = "GPL-3.0-or-later"
|
||||||
|
readme = "README.md"
|
||||||
|
packages = [{include = "tiffexplore"}]
|
||||||
|
repository = "https://github.com/wimpomp/tiffexplore"
|
||||||
|
|
||||||
|
[tool.poetry.scripts]
|
||||||
|
tiffexplore = "tiffexplore:main"
|
||||||
|
|
||||||
|
[tool.poetry.dependencies]
|
||||||
|
python = "^3.7"
|
||||||
|
tifffile = "*"
|
||||||
|
PyQt5 = "*"
|
||||||
|
|
||||||
|
[tool.pytest.ini_options]
|
||||||
|
filterwarnings = ["ignore:::(?!tiffexplore)"]
|
||||||
|
|
||||||
|
[tool.isort]
|
||||||
|
line_length = 119
|
||||||
|
|
||||||
|
[build-system]
|
||||||
|
requires = ["poetry-core"]
|
||||||
|
build-backend = "poetry.core.masonry.api"
|
||||||
23
setup.py
23
setup.py
@@ -1,23 +0,0 @@
|
|||||||
import setuptools
|
|
||||||
|
|
||||||
with open("README.md", "r") as fh:
|
|
||||||
long_description = fh.read()
|
|
||||||
|
|
||||||
setuptools.setup(
|
|
||||||
name="tiffexplore",
|
|
||||||
packages=["tiffexplore"],
|
|
||||||
version="2021.07.1",
|
|
||||||
author="Wim Pomp",
|
|
||||||
author_email="wimpomp@gmail.com",
|
|
||||||
description="Explore a tiff structure.",
|
|
||||||
long_description=long_description,
|
|
||||||
long_description_content_type="text/markdown",
|
|
||||||
classifiers=[
|
|
||||||
"Programming Language :: Python :: 3",
|
|
||||||
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
|
|
||||||
"Operating System :: OS Independent",
|
|
||||||
],
|
|
||||||
python_requires='>=3.7',
|
|
||||||
install_requires=['numpy', 'tifffile', 'PyQt5'],
|
|
||||||
scripts=['bin/tiffexplore'],
|
|
||||||
)
|
|
||||||
@@ -220,7 +220,7 @@ class App(QtWidgets.QMainWindow, UiMainWindow):
|
|||||||
shape = im.shape
|
shape = im.shape
|
||||||
im = QtGui.QImage(im, im.shape[1], im.shape[0], QtGui.QImage.Format_Grayscale8)
|
im = QtGui.QImage(im, im.shape[1], im.shape[0], QtGui.QImage.Format_Grayscale8)
|
||||||
f = min([a / b for a, b in zip((self.image.height(), self.image.width()), shape)])
|
f = min([a / b for a, b in zip((self.image.height(), self.image.width()), shape)])
|
||||||
pix = QtGui.QPixmap(im).scaled(f * shape[1], f * shape[0])
|
pix = QtGui.QPixmap(im).scaled(int(f) * shape[1], int(f) * shape[0])
|
||||||
else:
|
else:
|
||||||
pix = QtGui.QPixmap()
|
pix = QtGui.QPixmap()
|
||||||
self.image.setPixmap(pix)
|
self.image.setPixmap(pix)
|
||||||
|
|||||||
@@ -38,6 +38,9 @@ class tiff():
|
|||||||
if 273 in tags and 279 in tags:
|
if 273 in tags and 279 in tags:
|
||||||
for i, a in enumerate(zip(tags[273][-1], tags[279][-1])):
|
for i, a in enumerate(zip(tags[273][-1], tags[279][-1])):
|
||||||
self.addresses[('image', (*idx, i))] = a
|
self.addresses[('image', (*idx, i))] = a
|
||||||
|
elif 324 in tags and 325 in tags:
|
||||||
|
for i, a in enumerate(zip(tags[324][-1], tags[325][-1])):
|
||||||
|
self.addresses[('image', (*idx, i))] = a
|
||||||
for code in (330, 400, 34665, 34853, 40965):
|
for code in (330, 400, 34665, 34853, 40965):
|
||||||
if code in tags:
|
if code in tags:
|
||||||
if len(tags[code][3]) == 1:
|
if len(tags[code][3]) == 1:
|
||||||
|
|||||||
Reference in New Issue
Block a user