Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example of Secondary Capture Image & Encapsulated Document #1722

Open
patachi opened this issue Feb 8, 2024 · 1 comment
Open

Example of Secondary Capture Image & Encapsulated Document #1722

patachi opened this issue Feb 8, 2024 · 1 comment
Labels

Comments

@patachi
Copy link

patachi commented Feb 8, 2024

I've been working on Image Stitching to merge multiple Dicom images and get one whole image.
e.g. merging three lower, middle, and upper images of the leg/spine and getting the whole picture of the leg/spine for measuring the balance and curve.

  1. Is it possible to store the diagnostic results (PDF file) and the final stitched image as a secondary capture in Dicom format?
  2. Is there any way to preserve the pixel data of the original images(taken on the same device) like each pixel size in mm, etc... so the final image doesn't lose all of its medical value by keeping size and measurement info?

I'm new to DICOM so any help/samples/references are appreciated.

@patachi patachi added the new label Feb 8, 2024
@gofal gofal added question and removed new labels Feb 9, 2024
@gofal
Copy link
Contributor

gofal commented Feb 9, 2024

ad 1) Secondary Captures are used if you create some image from any secondary source, like a screenshot of an ultrasound application or if you take a dicom image, draw annotations and results on that image and then save this like a screenshot. If you have a PDF that you want to transform into a DICOM file, then it would be an encapsulated document (https://dicom.nema.org/dicom/2013/output/chtml/part03/sect_A.45.html)

ad 2) it would be preferable to store the stitched image in a way, so that the medical then can do all the measurements. First, you would render the three single files and show it in a kind of Userinterface where someone does the stitching (or your algorithm does it all automatically). Then when you have the information about the total size of the stitched image and the positions of the thre smaller images within the complete stitched image, you then should take the original pixel data from the files and put them togehter. Furthermore, I would iterate all the DicomTags of the images, and all tags, that do have the same value in all three images, should be copied to the resulting stitched image. And those who are different should be aggregated (like SeriesDescription, where "c-spine", "t-spine" and "l-spine" are aggregated to "stitching whole spine") or skipped (like dose information, which is not relevat in stitching because this takes no additional radation dose ;-) ).
That way, the stitched image can be viewed just as the original images in a medical application.

Comsuming DICOM-data is simpler, because you open a file and take just the information that you are intrested in. But when you create DICOM-data, then this is harder and you have to be more careful, because the data has to be correct/complete, other vendors have to be able to handle your files (always try to open your created files in various viewers, not only in one).

You also should take a look at DVT (https://www.dvtk.org/, https://github.com/dvtk-org/DVTk). With this tool you can validate the DICOM files you created, if some Tags are missing or invalid. fo-dicom only has very basic valdation built in, so you still should use those tools.

If you are new to DICOM and start with a stitching application, i would recommend to lookup in the dicom-stardard (https://www.dicomstandard.org/current) as often as possible. But because the standard is no easy starting point, you could start e.g. with https://saravanansubramanian.com/dicom/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants