Replies: 1 comment 4 replies
-
Hi, First, thanks very much for your interest and offer to contribute to pydicom - it is much appreciated. My TL;DR on initial first look would be: it depends, we could look into it a bit more. The idea of a Series class is certainly one that I think is due to be incorporated into pydicom because it is so frequently asked about and everyone needs it. The longer (initial thoughts) answer is: I was just about to put out a call for ideas on the future of pydicom, and start asking for input from various stakeholders, and try to develop a roadmap for pydicom for the next few years. So I would prefer to wait on any new major contributions until we have a better sense of what might come out of that bigger discussion. I'm quite busy this week so that process will probably start next week. Now, to get into a little more detail, I'd also like to look at your code when I can. Based on your post above, I'm not clear on how some of your type conversions are different than pydicom, e.g. pydicom does offer datetime conversion as an option, and DS as float. So again, when I have time next week I could look into that more. Also, if you haven't seen it, perhaps you could look at discussion #1742 about dict access and see if that has any relevance - I had wondered about adding a function like that to pydicom. Again, thanks for your interest and offer to contribute - this post is quite timely, as it does motivate me to put out that bigger call for ideas and a future roadmap as soon as I can. I encourage you (and anyone else interested) to watch for that discussion and contribute your thoughts. |
Beta Was this translation helpful? Give feedback.
-
Hi maintainers.
TL;DR: Would VR-informed conversion to native Python types be a welcome addition to pydicom's functionality?
A few years ago, I needed to be able to extract a lot of DICOM metadata as native Python types (e.g., DA to
datetime.date
, DS tofloat
,PersonName
todict
, etc.), and I ended up writing some code to do so. Eventually, I packaged the code and published it asdicom_parser
, and even moved it to an organizational account (“Open DICOM”), in which I had hoped to centralize some higher-level testing and parsing resources. This never really came to fruition, mostly due to a personal lack of time to push it forward in the last couple of years.I am hoping to soon have a little more time on my hands, and realized that while
dicom_parser
ended up providing some useful functionality in addition to the type conversion (such as aSeries
class to access and summarize whole series, and automatic Siemens' mosaic parsing), ideally, I actually think it would have been better if it was simply integrated into pydicom. However, I realize this might also be considered somewhat out of scope – pydicom does what it does very well, and adding type conversion heuristics, let alone vendor-specific parsing schemes, could add substantial complexity to the codebase.dicom_parser
isn't written particularly well. There are a couple of foundational mistakes in its (lack of) design that, I think, would justify a rewrite if I intend on maintaining it. Before I do so, I wanted to check what's the general feeling towards simply deprecating it and incrementally moving its functionality into pydicom. Again, I entirely understand this might be out of scope, but since it is not necessarily the case and I couldn't find any relevant statement on this matter in the docs, I thought it would be better to simply raise it here for discussion.In any case, thank you very much for all your amazing work on pydicom 🙏 ✨
Beta Was this translation helpful? Give feedback.
All reactions