I'm having a DICOM image data, which holds 16bit gray values. To visualize the data I need to apply a windowing method that cuts out pieces of the 16bits values. Therefore I have two properties, like WindowCenter and WindowWidth.
Since I want to use the WPF mechanisms I decided to create a DicomImage class which derives from BitmapSource. Since BitmapSource has no direct access to the internal pixeldata, I created a private WriteableBitmap (InternalImage) member where I can manipulate the data whenever WindowCenter and WindowWidth is changed.
To see the results I attach to Image.Source = DicomImage and the image is shown. But when I change the WindowCenter/WindowWidth the image is not updated. When I attach the WriteableBitmap directly (Image.Source = InternalImage) everything works as it should.
What I'm I doing wrong?
Thanks Marti