我不是一名经验丰富的程序员,只是需要向我的VS2010项目添加DICOM查看器。 我可以在Windows窗体中显示图像,但无法弄清如何更改窗口中心和宽度。以下是我的代码:
DicomImage image = new DicomImage(_filename);
int maxV = image.NumberOfFrames;
sbSlice.Maximum = maxV - 1;
image.WindowCenter = 7.0;
double wc = image.WindowCenter;
double ww = image.WindowWidth;
Image result = image.RenderImage(0);
DisplayImage(result);
它没有起作用。我不知道这是否是正确的方法。