Roadmap Request for Feedback #1759
Replies: 6 comments 31 replies
-
@darcymason thanks for opening this discussion, and for all your work building this technology and community 👍 We use pydicom in the 3D Slicer project and appreciate the reliable and pythonic access to individual dicom datasets. For our application's use cases, we rely on other code, like gdcm or dcmtk in various C++ wrappers in ITK or CTK to expose higher level functionality that is also exposed in python, e.g. through PythonQt. That is, ITK provides some code to map sets of instances to itk::Image for volumetric image processing, or for use as a vtkImageData for VTK rendering. CTK exposes dcmtk networking and other features. Slicer also has a plug-in architecture for converting dicom instances to higher level constructs like longitudinal collections of studies. Much of this functionality either pre-dated pydicom or developed in parallel. I don't think we'll ever get to the point where a single python implementation would be able to replace all these use cases, but as Slicer developers we've often talked about factoring out as much of this functionality as possible into python packages that could be more widely used (and debugged and maintained) and perhaps pydicom could be a home for such an effort. Even being able to agree on how particular dicom study types should be interpreted is complex, e.g. an MR study that includes structural, diffusion, and perfusion series is very difficult to sort out and there are very few tools that can do this reliably. Multiply this by the number of modalities and vendor permutations, plus the derived objects being addressed in highdicom, and, well, it's a very big job to say the least. I hope this is a reasonable response to your posting. I would definitely like to see pydicom grow and improve. I guess my suggestion would be for pydicom to describe the scope of future development, in the context of these various use cases I've alluded to. That is, will this effort remain at the instance level with some proof of concept examples for higher level use cases or do you see tackling some of these other topics more natively in pydicom? |
Beta Was this translation helpful? Give feedback.
-
Thank you, @darcymason! I am Zvi, I've been using pydicom extensively throughout my PhD to help my lab build a research database management application for its DICOM data. I very much enjoyed pydicom's stability and reliable extraction of raw DICOM header information.
In addition, I'd like to suggest:
Hope this makes sense, thank you again for all the great work and for your initiative in reaching out to the community. |
Beta Was this translation helpful? Give feedback.
-
@ZviBaratz what would you think about standardizing on the SQLite schema developed for CommonTK? It's been in use for several years and is very robust. We use dcmtk-based C++ code to populate and query it, but It wouldn't be a big task to implement the same features using pydicom. |
Beta Was this translation helpful? Give feedback.
-
Hi @darcymason, My use of pydicom comes from inter-connected directions:
For the "bread and butter" work, pydicom is great: very stable and mature and dependable. From my perspective of a highdicom developer, I am hugely grateful to be building on the solid foundation pydicom offers but nonetheless there are a few directions that it would be nice to improve upon. Generally speaking, pydicom focuses on parsing/reading DICOM files and to a lesser extent on creation of new files. Generally speaking this feels like a big gap in the ecosystem right now and the solution will likely extend beyond the pydicom library itself. Hopefully highdicom has a role here at least for some types of file, and probably the actual implementation of IODs for other files (CT, MR, CR) exists at another level but would be hugely useful. However, some parts of the solution probably do exist at the pydicom level. I know there has been work on some of this over the last few years (a few small bits from me), and I may be a bit out of date, but it would be great to reach the point where pydicom comprehensively checks all values satisfy VR constraints, and conveniently compresses/encodes pixel data when creating new files, for example. Another direction, as we have discussed directly, is that the performance of pydicom for long, nested sequences is quite slow. This is typically not an issue for most use cases, but becomes quite a bottleneck when working with IODs such as structured reports and segmentations as they make use of these types of structures extensively. Especially when these may encode, for example, a sequence containing AI generated annotations of every single cell nucleus in a whole slide microscopy image or a large number of organs/structures in a CT. Finally, and partly echoing what @ZviBaratz said, there are a bunch of higher level utilities I find myself constantly writing and rewriting and have not yet found a good place for. Things like grouping files into series, collecting attributes on the series level (where this makes sense), sorting according to e.g. spatial position. There are some efforts in the monai community to build a package with these sorts of utils, so maybe that is the location. Hope this is helpful, and thanks to you and all the pydicom contributors for all your work on this! Tagging a few other people who may be interested in responding: @MMelQin @hackermd @cgorman @fedorov @vikashg @ericspod @GreySeaWolf @seandoyle |
Beta Was this translation helpful? Give feedback.
-
Hi all,
I think pydicom does an excellent job in providing access to the dicom tags and this is what I use mostly for to see what dicom tags are available and read dicom files. I think I do not have any complains in reading 2D dicom images. I just use the
If it is not already implemented maybe implementing a reader for a 3D dicom reader. I know we can read individual images and sort it which we usually do but I was wondering if there is any reason for not implementing an equivalent of SimpleITK's
I often used SimpleITK when I have to read 3D dicom images just because you can read a dicom series in 3 lines. Only when the output is not as desired I go back to read individual dicom files and sort it using pydicom
The main reason was that the dicom data was non standard and so pydicom gave me access to the dicom tags which I could use to sort the images and build by workflow
MONAI, highdicom
I was wondering if it is possible to write something so that we can directly load the dicom data (or pixel array) directly in the GPU. Because reading dicom images during training is quite time-consuming so I convert dicom to numpy and then use the numpy for training. One of the things that can also be incorporated is the ability to collect (make a list or something similar) all dicom images with some common dicom tag. For example, all the dicom images from a study are contained in a folder and I want to collect the same slice from multiple series(es), there can be functionality to give a list of dicom images based on a dicom tag-based search criteria. I always use Open CV to burn some text on the pixel array and save it using pydicom. There can be a function, which always writes some text on the image, instead of giving a location where to write the text, it will just detect background (which is not difficult to detect based on intensity thresholding) and just write the text there.
I was always able to find anything I was looking for on stack overflow or github so the community was very helpful.
I wrote some tools for reading and writing DICOM RT and I will be happy to contribute that code to the repo if you feel that it can go there. Hope this helps. Thanks once again. |
Beta Was this translation helpful? Give feedback.
-
Hi - I've mostly been using pydicom in industry or in industry-like applications at hospitals. I've also had a lot of experience introducing new users to DICOM. In general - I think that pydicom is excellent. It just works; it's documented; there is a community of people that help. I agree with all of the praise in the comments above :-). The main issues I see with it are largely independent of pydicom itself. I think that the three largest ones that I run into are
|
Beta Was this translation helpful? Give feedback.
-
Open source projects need to occasionally step back and consider where they need to go, and how to get there.
We are looking for input from users of pydicom (the library/Python package) and the other libraries in the pydicom github organization (Python in Dicom), to help guide development of a roadmap.
Any input is welcome, whether it be technical/source code related, community, documentation, examples, tutorials, etc.
Examples questions to prompt discussion:
How to respond:
If you are able to, please supply some information about yourself and your use of the tools - e.g. a user in academia or industry, a maintainer/contributor of a specific open source library, etc.
Thanks in advance for any help you can give us in this process!
Beta Was this translation helpful? Give feedback.
All reactions