You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What exactly would you like to do? Currently there is only minimal support for editing pixel data. You can get a handle to the underlying pixel data bytes by using the supplied manipulator. If you have a PixelData element (tag 0x7FE0,0x0010), you can get either a manipulator either with:
// If you want an array of `Byte`s (8 bit blocks of pixel data at a time)
data_set->manipulator<vega::dictionary::PixelData_OB>();
// If you want an array of `Word`s (16 bit blocks of pixel data at a time)
data_set->manipulator<vega::dictionary::PixelData_OW>();
To properly understand the content of the pixel data though, you will need to look up the Bits Allocated, Bits Stored, and High Bit elements: https://www.leadtools.com/sdk/medical/dicom-spec17. For instance, if Bits Allocated is 16, then you should work with 16-bit Word pixels. Then, if you want to go between raw pixel values and interpreted values (for instance, density values in CT pixel data), you need to convert from these integers using Rescale Intercept and Rescale Slope: https://stackoverflow.com/questions/10193971/rescale-slope-and-rescale-intercept.
There is room for improvement with this approach, by automatically hiding some of these details, but right now you need to understand how pixel data is stored in the DICOM file to properly interpret and manipulate.
I need to get and then edit
PixelData
.The text was updated successfully, but these errors were encountered: