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

WIP: Real world value mapping #169

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

matthew-brett
Copy link
Member

Rebased changes from : #143

Please see the comments there.

Uses Real World Value Mapping SOP class - see : ftp://medical.nema.org/medical/dicom/final/sup103_ft.pdf

These changes need tests. Also need thought about scaling of different volumes, and relationship of scaling to usual DICOM scaling with RescaleSlope and RescaleIntercept

@matthew-brett
Copy link
Member Author

More research reveals more pain.

There can be many RWVM for each image.

https://groups.google.com/d/msg/comp.protocols.dicom/C6kE4X4FvLc/tWPoNvlO3DQJ

The mappings apply to ranges of stored (pixel) values, and the ranges can overlap, so more than one mapping applies to a particular pixel value.

There can be one mapping for each frame.

There's a "macro" for this as well.

http://www.dabsoft.ch/dicom/3/C.7.6.16.2.11/

Even in cases without real world value mappings, there is the the Modality LUT - http://www.dabsoft.ch/dicom/3/C.11.1/

So, this might need a little thought. But certainly we should use the RWVMs when the others aren't there, at least.

@matthew-brett
Copy link
Member Author

Further investigation reasonably reveals that the example image has a RealValueWorldMappingSequence (tag 0040, 9096), with one element. This is therefore the 'Macro' and not the 'SOP'. I am not sure how the 'SOP' would get into the dicom file because the SOP would be a separate service object pair; the image should be a single service object pair, here SOP class UID = '1.2.840.10008.5.1.4.1.1.4' (MR Image Storage).

So, I think we can ignore the SOPs and just look at the Macro, in exactly the way you've done it.

I guess we can also ignore the LUT tables I mentioned above too.

So, just needs some tests. I'll put some in.

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

Successfully merging this pull request may close these issues.

1 participant