dicube 0.2.0__cp311-cp311-macosx_11_0_arm64.whl → 0.2.2__cp311-cp311-macosx_11_0_arm64.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.
dicube/core/io.py CHANGED
@@ -239,6 +239,12 @@ class DicomCubeImageIO:
239
239
  intercept = meta.get_shared_value(CommonTags.RescaleIntercept)
240
240
  wind_center = meta.get_shared_value(CommonTags.WindowCenter)
241
241
  wind_width = meta.get_shared_value(CommonTags.WindowWidth)
242
+ try:
243
+ wind_center = float(wind_center)
244
+ wind_width = float(wind_width)
245
+ except:
246
+ wind_center = None
247
+ wind_width = None
242
248
 
243
249
  # Create pixel_header
244
250
  pixel_header = PixelDataHeader(
@@ -246,8 +252,8 @@ class DicomCubeImageIO:
246
252
  RescaleIntercept=float(intercept) if intercept is not None else 0.0,
247
253
  OriginalPixelDtype=str(images[0].dtype),
248
254
  PixelDtype=str(images[0].dtype),
249
- WindowCenter=float(wind_center) if wind_center is not None else None,
250
- WindowWidth=float(wind_width) if wind_width is not None else None,
255
+ WindowCenter=wind_center,
256
+ WindowWidth=wind_width,
251
257
  )
252
258
 
253
259
  # Validate PixelDataHeader initialization success
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: dicube
3
- Version: 0.2.0
3
+ Version: 0.2.2
4
4
  Summary: Medical Image Storage Library with DICOM compatibility
5
5
  Author: Fangzhou Liao
6
6
  License: MIT
@@ -38,6 +38,7 @@ Requires-Dist: mypy>=1.0.0; extra == "dev"
38
38
  Requires-Dist: build>=0.8.0; extra == "dev"
39
39
  Requires-Dist: pylibjpeg>=2.0; extra == "dev"
40
40
  Requires-Dist: pylibjpeg-openjpeg>=2.0; extra == "dev"
41
+ Requires-Dist: nibabel>=3.2.0; extra == "dev"
41
42
  Provides-Extra: all
42
43
  Requires-Dist: pybind11>=2.10.0; extra == "all"
43
44
  Requires-Dist: nibabel>=3.2.0; extra == "all"
@@ -1,3 +1,6 @@
1
+ dicube-0.2.2.dist-info/RECORD,,
2
+ dicube-0.2.2.dist-info/WHEEL,sha256=11XKa4Dev4vCpAj_5tDGngF8FY4Lo7Z3Hr9WVz5BJMc,114
3
+ dicube-0.2.2.dist-info/METADATA,sha256=nBhXpfkqIUhGO2LUB-HmTwmDIolxcvd-cr8tW4CJNzM,10627
1
4
  dicube/__init__.py,sha256=TK2-JGOB_aPa6ilHw4WUc9l5Whc3Fb-tlZSPzbf5HIw,4886
2
5
  dicube/exceptions.py,sha256=YrwBD93oWI4yhvFfO-SOPCNMQ4z_1FSVL2gCVSnx-LU,6689
3
6
  dicube/validation.py,sha256=Edmx3yKhRShdzvM7uRK6N9j58GNV8rUv_k9w43JcaMs,12478
@@ -12,7 +15,7 @@ dicube/codecs/jph/ojph_complete.cpython-311-darwin.so,sha256=SmXvkyjn1iCLHfLcmav
12
15
  dicube/codecs/jph/ojph_decode_complete.cpython-311-darwin.so,sha256=1aXbLZWb6nDX4e2S73dcWW8BnMUytk5AtWIzyxt4aiM,449096
13
16
  dicube/codecs/jph/ojph_decode_complete.cpython-39-darwin.so,sha256=OMAfYyAQra6xF_Zv5Y-LGBkg68MYpTK4qwB8lWqlf6U,448968
14
17
  dicube/codecs/jph/codec.py,sha256=d4bAoVAatSrWiC1k7gQLzWODZZTGo_1xeRRXO0NAtqo,5460
15
- dicube/core/io.py,sha256=WpzcjRtalIhi0P7EFwR5i2YLoZKz3_V_IlMOKvfDXFY,15514
18
+ dicube/core/io.py,sha256=g8uKbcX7zz9LCq65spBeeodZEf6l4HSF9jzl60HZVyw,15629
16
19
  dicube/core/__init__.py,sha256=tU9vaPHbTkF8V78T8D6werr0nC7k6bMPIlatEIEdHU4,656
17
20
  dicube/core/pixel_header.py,sha256=x3-gNiyL4lFRQ6c1TVdvsm2mG36xCQx78hq4vjYkqJI,4005
18
21
  dicube/core/image.py,sha256=DAyBwKlWeCU6oDWsmdSdAzVW3IieHNLUINIAhS_ZtRg,14177
@@ -28,6 +31,3 @@ dicube/dicom/__init__.py,sha256=9b7liSXx5vlpEYAr59GZGkcUw16kULELTX5SlLfcXPw,371
28
31
  dicube/dicom/merge_utils.py,sha256=6flzoK_6gzpvv4WSTaWq4SjVdr1gh3gtUPMsRfKDSNM,9312
29
32
  dicube/dicom/space_from_meta.py,sha256=__B7UTmvgV1N-LMJg9O_ObHgNWa39mbRF4ZSkQXm3Vs,2420
30
33
  dicube/dicom/dicom_tags.py,sha256=sOjrK9SoAhGqynF0e3YH70j8wbtvwGRezV-tM0wp40Q,3945
31
- dicube-0.2.0.dist-info/RECORD,,
32
- dicube-0.2.0.dist-info/WHEEL,sha256=11XKa4Dev4vCpAj_5tDGngF8FY4Lo7Z3Hr9WVz5BJMc,114
33
- dicube-0.2.0.dist-info/METADATA,sha256=xDYbYiX9NKyLH0bAbBNOsziAxvXHyyQyELP8RlGA5ys,10581
File without changes