Skip to content
Discussion options

You must be logged in to vote

Hi, @jamesjjcondon. That just means that you can add your own keys and values to Image. If you want to keep the DICOM tags, we have multiple options:

  1. We modify Image and io.read_image so the DICOM tags are kept. This would mean changing multiple things in the library
  2. You create your own custom image class, overriding the load method
  3. You write a function tags_dict = get_metadata(path) that you call before instantiating the image, then you can do e. g. image = tio.ScalarImage(path, **tags_dict)

I would go for the 3rd one. I think you can easily get the tags using pydicom or even SimpleITK.

Would any of these work?

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@jamesjjcondon
Comment options

@fepegar
Comment options

@jamesjjcondon
Comment options

@fepegar
Comment options

Answer selected by fepegar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants