Am trying to make simple wpf viewer and when representing image i used this code
public BitmapSource CurrentFrameData(ClearCanvas.ImageViewer.StudyManagement.Frame frm)
{
IPresentationImage presentationImage =
PresentationImageFactory.Create(frm);
int width = frm.Columns;
int height = frm.Rows;
System.Drawing.Bitmap bmp = presentationImage.DrawToBitmap(width, height);
BitmapSource output = System.Windows.Interop.Imaging.CreateBitmapSourceFromHBitmap(
bmp.GetHbitmap(),
IntPtr.Zero,
Int32Rect.Empty,
BitmapSizeOptions.FromWidthAndHeight(width, height));
return output;
}
and Now i want to change the windows/level so what to do ??