large-image-converter 1.32.12.dev31__py3-none-any.whl → 1.32.12.dev35__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of large-image-converter might be problematic. Click here for more details.
- large_image_converter/__init__.py +8 -2
- {large_image_converter-1.32.12.dev31.dist-info → large_image_converter-1.32.12.dev35.dist-info}/METADATA +4 -4
- large_image_converter-1.32.12.dev35.dist-info/RECORD +9 -0
- large_image_converter-1.32.12.dev31.dist-info/RECORD +0 -9
- {large_image_converter-1.32.12.dev31.dist-info → large_image_converter-1.32.12.dev35.dist-info}/WHEEL +0 -0
- {large_image_converter-1.32.12.dev31.dist-info → large_image_converter-1.32.12.dev35.dist-info}/entry_points.txt +0 -0
- {large_image_converter-1.32.12.dev31.dist-info → large_image_converter-1.32.12.dev35.dist-info}/licenses/LICENSE +0 -0
- {large_image_converter-1.32.12.dev31.dist-info → large_image_converter-1.32.12.dev35.dist-info}/top_level.txt +0 -0
|
@@ -589,7 +589,7 @@ def _convert_large_image_frame(
|
|
|
589
589
|
preferredVipsCast=preferredVipsCast, **kwargs)
|
|
590
590
|
|
|
591
591
|
|
|
592
|
-
def _output_type(lidata): # noqa
|
|
592
|
+
def _output_type(lidata, keepFloat=False): # noqa
|
|
593
593
|
"""
|
|
594
594
|
Determine how to cast and scale vips data based on actual image contents.
|
|
595
595
|
"""
|
|
@@ -599,6 +599,10 @@ def _output_type(lidata): # noqa
|
|
|
599
599
|
return None
|
|
600
600
|
if intype == np.uint8 or intype == np.uint16:
|
|
601
601
|
return None
|
|
602
|
+
if keepFloat and np.issubdtype(intype, np.floating):
|
|
603
|
+
if intype == np.float16 or intype == np.float32:
|
|
604
|
+
return (pyvips.BandFormat.FLOAT, 0, 1)
|
|
605
|
+
return (pyvips.BandFormat.DOUBLE, 0, 1)
|
|
602
606
|
logger.debug('Checking data range')
|
|
603
607
|
minval = maxval = None
|
|
604
608
|
for frame in range(len(lidata['metadata'].get('frames', [0]))):
|
|
@@ -657,7 +661,7 @@ def _convert_large_image(inputPath, outputPath, tempPath, lidata, **kwargs):
|
|
|
657
661
|
images.
|
|
658
662
|
"""
|
|
659
663
|
ts = lidata['tilesource']
|
|
660
|
-
lidata['_vips_cast'] = _output_type(lidata)
|
|
664
|
+
lidata['_vips_cast'] = _output_type(lidata, kwargs.get('keepFloat', False))
|
|
661
665
|
numFrames = len(lidata['metadata'].get('frames', [0]))
|
|
662
666
|
outputList = []
|
|
663
667
|
tasks = []
|
|
@@ -986,6 +990,8 @@ def convert(inputPath, outputPath=None, **kwargs): # noqa: C901
|
|
|
986
990
|
primary ifds.
|
|
987
991
|
:param overwrite: if not True, throw an exception if the output path
|
|
988
992
|
already exists.
|
|
993
|
+
:param keepFloat: if True, keep float or double data types as they are, if
|
|
994
|
+
possible.
|
|
989
995
|
|
|
990
996
|
Additional optional parameters:
|
|
991
997
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: large-image-converter
|
|
3
|
-
Version: 1.32.12.
|
|
3
|
+
Version: 1.32.12.dev35
|
|
4
4
|
Summary: Converter for Large Image.
|
|
5
5
|
Author: Kitware Inc
|
|
6
6
|
Author-email: kitware@kitware.com
|
|
@@ -17,7 +17,7 @@ Classifier: Programming Language :: Python :: 3.13
|
|
|
17
17
|
Requires-Python: >=3.9
|
|
18
18
|
Description-Content-Type: text/x-rst
|
|
19
19
|
License-File: LICENSE
|
|
20
|
-
Requires-Dist: large-image-source-tiff>=1.32.12.
|
|
20
|
+
Requires-Dist: large-image-source-tiff>=1.32.12.dev35
|
|
21
21
|
Requires-Dist: numpy
|
|
22
22
|
Requires-Dist: psutil
|
|
23
23
|
Requires-Dist: pyvips
|
|
@@ -27,14 +27,14 @@ Requires-Dist: glymur; extra == "jp2k"
|
|
|
27
27
|
Provides-Extra: geospatial
|
|
28
28
|
Requires-Dist: gdal; extra == "geospatial"
|
|
29
29
|
Provides-Extra: sources
|
|
30
|
-
Requires-Dist: large-image[sources]>=1.32.12.
|
|
30
|
+
Requires-Dist: large-image[sources]>=1.32.12.dev35; extra == "sources"
|
|
31
31
|
Provides-Extra: stats
|
|
32
32
|
Requires-Dist: packaging; extra == "stats"
|
|
33
33
|
Requires-Dist: scikit-image; extra == "stats"
|
|
34
34
|
Provides-Extra: all
|
|
35
35
|
Requires-Dist: glymur; extra == "all"
|
|
36
36
|
Requires-Dist: gdal; extra == "all"
|
|
37
|
-
Requires-Dist: large-image[sources]>=1.32.12.
|
|
37
|
+
Requires-Dist: large-image[sources]>=1.32.12.dev35; extra == "all"
|
|
38
38
|
Requires-Dist: packaging; extra == "all"
|
|
39
39
|
Requires-Dist: scikit-image; extra == "all"
|
|
40
40
|
Dynamic: author
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
large_image_converter/__init__.py,sha256=QDgaRu4vS_bvlVtCKKwTpKEvm8aflOoBlX3uOBerqUU,44954
|
|
2
|
+
large_image_converter/__main__.py,sha256=SZOjDmX42vH4GcKB_5wdDHyB-aOy9LCx4_J97vQEjug,13358
|
|
3
|
+
large_image_converter/format_aperio.py,sha256=NkKY3gaSjPlfxvcTQgFiMADdq_mkdpKjGQ7WT_QsvaM,11761
|
|
4
|
+
large_image_converter-1.32.12.dev35.dist-info/licenses/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
|
|
5
|
+
large_image_converter-1.32.12.dev35.dist-info/METADATA,sha256=pHZflx0wFSpwvabNXtKHOKqkybs0wJEbgVkduyyLUQM,4799
|
|
6
|
+
large_image_converter-1.32.12.dev35.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
7
|
+
large_image_converter-1.32.12.dev35.dist-info/entry_points.txt,sha256=TkXGWAaHgquk_ZXfqHTjQLjv8RZriv6ioiJd7JL6UIs,78
|
|
8
|
+
large_image_converter-1.32.12.dev35.dist-info/top_level.txt,sha256=cdRa-ZWWKzVHFsjK1Aq1f4bzAMPc3sgCpprmvpYczKg,22
|
|
9
|
+
large_image_converter-1.32.12.dev35.dist-info/RECORD,,
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
large_image_converter/__init__.py,sha256=8HscZ_keOmia7JafR33ZSLIY8uXMplobg_nNE4gCN9E,44595
|
|
2
|
-
large_image_converter/__main__.py,sha256=SZOjDmX42vH4GcKB_5wdDHyB-aOy9LCx4_J97vQEjug,13358
|
|
3
|
-
large_image_converter/format_aperio.py,sha256=NkKY3gaSjPlfxvcTQgFiMADdq_mkdpKjGQ7WT_QsvaM,11761
|
|
4
|
-
large_image_converter-1.32.12.dev31.dist-info/licenses/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
|
|
5
|
-
large_image_converter-1.32.12.dev31.dist-info/METADATA,sha256=HYHNC_ffzXHIoA8P_yyQk4OyAxCyFjA-AzBcbO_2bGg,4799
|
|
6
|
-
large_image_converter-1.32.12.dev31.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
7
|
-
large_image_converter-1.32.12.dev31.dist-info/entry_points.txt,sha256=TkXGWAaHgquk_ZXfqHTjQLjv8RZriv6ioiJd7JL6UIs,78
|
|
8
|
-
large_image_converter-1.32.12.dev31.dist-info/top_level.txt,sha256=cdRa-ZWWKzVHFsjK1Aq1f4bzAMPc3sgCpprmvpYczKg,22
|
|
9
|
-
large_image_converter-1.32.12.dev31.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|