0

c#.net で dicom ビューアーを開発しています。Pixel の HU 値の計算について少し助けが必要です。HUの計算式は、

  HU = Pixel Value * Rescale Slope + Rescale Intercept 

いくつかの計算を行い、元の dicom ピクセル値から取得しましたが、正しい HU 値が得られません。私の質問は、ピクセル値とは正確には何ですか。誰でも私を助けてください。

これは私のコードです

 public void calculateHU(string x,string y)
        {
            Int32 intercept, slope,pix;
            intercept = -1024;
            slope = 1;
            int xx, yy;
            xx = Convert.ToInt32(x);
            yy = Convert.ToInt32(y);
            xx = xx +Convert.ToInt32( imagerect.X);
            yy = yy + Convert.ToInt32( imagerect.Y);
            pix =  getpixelvalue(xx,yy);
            double hu = pix * slope + intercept;

        }

        public Int32 getpixelvalue(int x, int y)
        {
            string c;
            c = pix16[imgno][y * bmd.width + x].ToString();
            return Convert.ToInt32(c);
        }
4

1 に答える 1

2

ピクセル表現 (0028,0103) が 0 (符号なし) に設定されている場合、ピクセル データ値は負でない必要があります。切片と勾配がそれぞれ -1024 と 1 である例によれば、HU 値 -1028 を生成するには、生のピクセル値を -4 にする必要があります。

-1028 という低い結果の HU 値を取得することを期待している場合、これはおそらく、代わりに十分に負の Rescale Intercept 値 (および潜在的に Rescale Slope) 値によって管理されます。

Rescale Intercept と Slope をハード コーディングするのではなく、画像からこれらの値を取得し、それぞれ (0028,1052) と (0028,1053) のタグを付けて、HU 計算に適用します。

于 2012-05-23T11:57:17.103 に答える