You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
thanks for this intuitive and easy to use dicom converter. I have some data from a Zeiss scanner (I know you explicitly mention that you only provide base level compabilities). Thus I was also not surprised that the conversion did not work out of the box. I tried converting the data and got the error: ValueError: Invalid isoformat string: '2024-09-27T13:49:45.4425991Z'
Within the file #https://github.com/imi-bigpicture/wsidicomizer/blob/main/wsidicomizer/sources/czi/czi_metadata.py
added the parts in bold however solved the issue for me and the conversion produced totally fine DICOM files:
For the datetime formatting into a DICOM dataset, this is handled by pydicom's DT class, which should format a correct DICOM element for any valid datetime-object (I hope...).
Hi all,
thanks for this intuitive and easy to use dicom converter. I have some data from a Zeiss scanner (I know you explicitly mention that you only provide base level compabilities). Thus I was also not surprised that the conversion did not work out of the box. I tried converting the data and got the error:
ValueError: Invalid isoformat string: '2024-09-27T13:49:45.4425991Z'
Within the file #https://github.com/imi-bigpicture/wsidicomizer/blob/main/wsidicomizer/sources/czi/czi_metadata.py
added the parts in bold however solved the issue for me and the conversion produced totally fine DICOM files:
def aquisition_datetime(self) -> Optional[datetime]: value = self.get_value_from_element( self._metadata, "AcquisitionDateAndTime", str, nested=["Metadata", "Information", "Image"], ) **value=value.rstrip('Z') value=value[:26]** return datetime.fromisoformat(value)
Stripping the length of the time to only milliseconds was also necessary since the datetime tag in DICOM has a maximum lenght of 16.
The text was updated successfully, but these errors were encountered: