I have a question about the smallest and largest pixel value: if they can be changed manually or calculated automatically based on the pixel data?
I am trying to do some pixel processing work, first I read the original pixel data from a dicom file and then do pixel calculation, after that write back the pixel data. I also calculate the smallest and largest pixel value of the resulting pixel data and write back the new smallest and largest pixel value. But when I checked the resulting image again, I found the smallest and largest pixel value were not changed.
That means one does not need to change these two values manually?
The helper method putAndInsertUint16() currently does not support the internal VR "xs" of these two attributes (which is US or SS). That means you have to create the DcmUnsignedShort element manually: