-
-
Notifications
You must be signed in to change notification settings - Fork 400
feat(ColorMaps): Add grayscale sigmoid colormap based on DICOM standard #3365
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -529,6 +529,78 @@ | |
| "NanColor" : [ 1, 0, 0 ], | ||
| "RGBPoints" : [ 0, 0, 0, 0, 1, 1, 1, 1 ] | ||
| }, | ||
| { | ||
| "ColorSpace" : "RGB", | ||
| "Name" : "Grayscale-DICOM-sigmoid", | ||
| "Notes": "This is a 16 point sample of a sigmoid grayscale colormap described in the DICOM standard. See equation C.11-1 in section C.11.2", | ||
| "NanColor" : [ 1, 0, 0 ], | ||
| "RGBPoints" : [ | ||
| -1, | ||
| 0.01798620996209156, | ||
| 0.01798620996209156, | ||
| 0.01798620996209156, | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why not 0 ?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good point. I am using the equation specified by the DICOM standard: |
||
| -0.8666666666666667, | ||
| 0.030275691986950463, | ||
| 0.030275691986950463, | ||
| 0.030275691986950463, | ||
| -0.7333333333333334, | ||
| 0.05053016223541345, | ||
| 0.05053016223541345, | ||
| 0.05053016223541345, | ||
| -0.6, | ||
| 0.08317269649392238, | ||
| 0.08317269649392238, | ||
| 0.08317269649392238, | ||
| -0.4666666666666667, | ||
| 0.13392788832407365, | ||
| 0.13392788832407365, | ||
| 0.13392788832407365, | ||
| -0.33333333333333337, | ||
| 0.2086085273260449, | ||
| 0.2086085273260449, | ||
| 0.2086085273260449, | ||
| -0.19999999999999996, | ||
| 0.31002551887238755, | ||
| 0.31002551887238755, | ||
| 0.31002551887238755, | ||
| -0.06666666666666665, | ||
| 0.4337256058045608, | ||
| 0.4337256058045608, | ||
| 0.4337256058045608, | ||
| 0.06666666666666665, | ||
| 0.5662743941954392, | ||
| 0.5662743941954392, | ||
| 0.5662743941954392, | ||
| 0.19999999999999996, | ||
| 0.6899744811276125, | ||
| 0.6899744811276125, | ||
| 0.6899744811276125, | ||
| 0.33333333333333326, | ||
| 0.791391472673955, | ||
| 0.791391472673955, | ||
| 0.791391472673955, | ||
| 0.46666666666666656, | ||
| 0.8660721116759263, | ||
| 0.8660721116759263, | ||
| 0.8660721116759263, | ||
| 0.6000000000000001, | ||
| 0.9168273035060777, | ||
| 0.9168273035060777, | ||
| 0.9168273035060777, | ||
| 0.7333333333333334, | ||
| 0.9494698377645865, | ||
| 0.9494698377645865, | ||
| 0.9494698377645865, | ||
| 0.8666666666666667, | ||
| 0.9697243080130495, | ||
| 0.9697243080130495, | ||
| 0.9697243080130495, | ||
| 1, | ||
| 0.9820137900379085, | ||
| 0.9820137900379085, | ||
| 0.9820137900379085 | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why not 1 ? |
||
| ] | ||
| }, | ||
| { | ||
| "ColorSpace" : "RGB", | ||
| "Name" : "BkRd", | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not rely on midpoint+sharpness ?
https://github.com/Kitware/vtk-js/blob/master/Sources/Rendering/Core/ColorTransferFunction/index.js#L721-L725
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add support for a "Nodes" key/value in addition to "RGBPoints".
See applyColorMap in ColorTransferFunction/index.js