Kết quả thực hiện thử nghiệm 2

Một phần của tài liệu (LUẬN văn THẠC sĩ) nghiên cứu một số kỹ thuật nội suy trong hiển thị ảnh y tế 04 (Trang 59 - 72)

Ngoài ra, một số thực nghiệm khác được trình bày trong Bảng 3.1. Trong đó, hai lát cắt đầu vào lần lượt là (1), (3) được đưa vào tính toán nội suy, kết quả theo kỹ thuật nội suy tuyến tính là (4), theo kỹ thuật hợp nhất biến dạng cong cải tiến là (5). Sau đó lần lượt hai kết quả nội uy được so sánh với lát cắt gốc (2) và tính toán giá trị MSE tương ứng. Đồ thị biểu diễn các giá trị MSE lần lượt được tính dựa trên kết quả nội suy bằng hai kỹ thuật đã cài đặt trong 8 lần thực nghiệm, mỗi lần lựa chọn ngẫu nhiên bộ 3 lát cắt liên tiếp, lát cắt thứ nhất và lát cắt thứ ba được đưa vào nội suy, hai lát cắt inh ra được so sánh giá trị MSE với lát cắt thứ 2, các giá trị này được thể hiện trong biểu đồ hình 3.10.

Hình 3.10: Đồ thị biểu diễn giá trị MSE của hai kỹ thuật trong 8 lần thực nghiệm .000 10.000 20.000 30.000 40.000 50.000 60.000 70.000 80.000 Lần 1 Lần 2 Lần 3 Lần 4 Lần 5 Lần 6 Lần 7 Lần 8 MSE 1 MSE 2

STT Lát cắt tham chiếu (1) Lát cắt gốc ở giữa 1-3 (2) Lát cắt mục tiêu (3)

Kỹ thuật nội suy So sánh lát cắt nội suy – lát

cắt gốc Đánh giá chỉ số MSE Tuyến tính (4) Hợp nhất (5) (4-2) (5-2) (4-2) (5-2) 1 27,78 19,48 2 33,8 29,53 3 52,84 44,93 4 61,9 57.3 Bảng 3.1: Kết quả một số thực nghiệm

KẾT LUẬN

Với nội dung đã trình bày cả về lý thuyết và thực nghiệm, những kết quả mà luận văn đã đạt được có thể tổng kết thành những phần chính sau:

1. Những kết quả ạt ược

- Tìm hiểu khái quát về ảnh y tế, nguyên lý tạo ảnh và các chuẩn lưu trữ. Trình bày chi tiết về cấu trúc file ảnh DICOM được sử dụng trong ảnh y khoa.

- Hệ thống được 7 kỹ thuật nội suy sử dụng trong xử lý ảnh y tế, nhận xét đánh giá ự phù hợp với từng kỹ thuật.

- Cài đặt thực nghiệm hai kỹ thuật nội uy đại diện cho hai nhóm nghiên cứu chính trong nội suy lát cắt là nội suy dựa trên cường độ điểm ảnh và nội suy dựa trên đối tượng.

- Kết quả thực nghiệm được đánh giá, o ánh cho thấy nhóm kỹ thuật nội suy dựa trên đối tượng cho hình ảnh rõ n t hơn, khắc phục được vết mờ trên đường biên của kỹ thuật nội suy dựa trên cường độ.

2. Hướng mở rộng nghiên cứu

Độ chính xác của kỹ thuật nội suy lát cắt càng tăng thì việc ứng dụng kỹ thuật này vào quá trình tái cấu trúc mô hình 3D càng giống với thực tế. Điều này góp phần hỗ trợ tốt hơn trong quá trình chẩn đoán và điều trị cho bệnh nhân. Trong khi đó các thiết bị chẩn đoán hình ảnh càng hiện đại có giá thành càng cao, việc đầu tư rộng rãi các thiết bị này trong điều khiện nước ta là chưa khả thi. Do đó việc phát triển các hướng nghiên cứu nội suy lát cắt rất thiết thực và sát với thực tế. Chính vì vậy ngoài các kỹ thuật nội uy đã được trình bày trong luận văn, bài toán nội suy lát cắt cần được tiếp tục nghiên cứu, phát triển theo một số hướng mới như nội suy lát cắt theo chiều dọc.

PHỤ LỤC

1. Hàm Hiển thị tập tin DICOM

private void ReadAndDisplayDicomFile(string fileName, string fileNameOnly) {

ddRe.DicomFileName = fileName;

//MessageBox.Show(ddRe.DicomFileName);

TypeOfDicomFile typeOfDicomFile = ddRe.typeofDicomFile;

if (typeOfDicomFile == TypeOfDicomFile.Dicom3File || typeOfDicomFile == TypeOfDicomFile.DicomOldTypeFile) { imageWidth = ddRe.width; imageHeight = ddRe.height; bitDepth = ddRe.bitsAllocated; winCentre = ddRe.windowCentre; winWidth = ddRe.windowWidth; samplesPerPixel = ddRe.samplesPerPixel; signedImage = ddRe.signedImage; label1.Visible = true; label2.Visible = true; label3.Visible = true; label4.Visible = true; label2.Text = imageWidth.ToString() + " X " + imageHeight.ToString(); if (samplesPerPixel == 1)

label4.Text = bitDepth.ToString() + " bit"; else

label4.Text = bitDepth.ToString() + " bit, " + samplesPerPixel + " samples per pixel";

imagePanelControl.NewImage = true;

Text = "DICOM Image Viewer: " + fileNameOnly;

if (samplesPerPixel == 1 && bitDepth == 8) {

pixels8.Clear(); pixels16.Clear(); pixels24.Clear();

ddRe.GetPixels8(ref pixels8); minPixelValue = pixels8.Min(); maxPixelValue = pixels8.Max(); if (ddRe.signedImage) {

winCentre -= char.MinValue; }

if (Math.Abs(winWidth) < 0.001) {

winWidth = maxPixelValue - minPixelValue; }

if ((winCentre == 0) ||

(minPixelValue > winCentre) || (maxPixelValue < winCentre))

{

winCentre = (maxPixelValue + minPixelValue) / 2; }

imagePanelControl.SetParameters(ref pixels8, imageWidth, imageHeight,

winWidth, winCentre, samplesPerPixel, true, this); }

if (samplesPerPixel == 1 && bitDepth == 16) {

pixels16.Clear(); pixels8.Clear(); pixels24.Clear();

ddRe.GetPixels16(ref pixels16); minPixelValue = pixels16.Min(); maxPixelValue = pixels16.Max(); if (ddRe.signedImage) {

winCentre -= short.MinValue; }

if (Math.Abs(winWidth) < 0.001) {

winWidth = maxPixelValue - minPixelValue; }

if ((winCentre == 0) ||

(minPixelValue > winCentre) || (maxPixelValue < winCentre))

{

winCentre = (maxPixelValue + minPixelValue) / 2; }

imagePanelControl.Signed16Image = ddRe.signedImage;

winWidth, winCentre, true, this); }

if (samplesPerPixel == 3 && bitDepth == 8) {

// This is an RGB colour image

pixels8.Clear(); pixels16.Clear(); pixels24.Clear();

ddRe.GetPixels24(ref pixels24);

imagePanelControl.SetParameters(ref pixels24, imageWidth, imageHeight,

winWidth, winCentre, samplesPerPixel, true, this); }

} else {

if (typeOfDicomFile == TypeOfDicomFile.DicomUnknownTransferSyntax) {

MessageBox.Show("Sorry, I can't read a DICOM file with this Transfer Syntax.",

"Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning); }

else

{

MessageBox.Show("Sorry, I can't open this file. " + "This file does not appear to contain a DICOM image.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); }

Text = "DICOM Image Viewer: ";

// Show a plain grayscale image instead

pixels8.Clear(); pixels16.Clear(); pixels24.Clear(); samplesPerPixel = 1; imageWidth = imagePanelControl.Width - 25; imageHeight = imagePanelControl.Height - 25; int iNoPix = imageWidth * imageHeight;

for (int i = 0; i < iNoPix; ++i) {

pixels8.Add(240); }

winWidth = 256; winCentre = 127;

imagePanelControl.SetParameters(ref pixels8, imageWidth, imageHeight, winWidth, winCentre, samplesPerPixel, true, this);

label1.Visible = false; label2.Visible = false; label3.Visible = false; label4.Visible = false; } }

2. Hàm tính lát cắt nội suy theo kỹ thuật nội suy tuyến tính

private void btPolation_Click(object sender, EventArgs e) {

int i;

imagePanelControl2.NewImage = true;

if ((imageOpened1 == true) && (imageOpened == true )) {

if (samplesPerPixel == 1 && bitDepth == 8) {

List<byte> px8Ta = ddTa.pixels8; List<byte> px8Re = ddRe.pixels8; List<byte> px8 = new List<byte>();

for (i = 0; i < px8Ta.Count; i++) {

byte pi = (byte)((px8Ta[i] + px8Re[i]) / 2); px8.Add(pi); } minPixelValue = px8.Min(); maxPixelValue = px8.Max(); if (ddTa.signedImage) {

winCentre -= char.MinValue; }

if (Math.Abs(winWidth) < 0.001) {

winWidth = maxPixelValue - minPixelValue; }

if ((winCentre == 0) ||

(minPixelValue > winCentre) || (maxPixelValue < winCentre))

{

winCentre = (maxPixelValue + minPixelValue) / 2; }

imagePanelControl2.SetParameters(ref px8, imageWidth, imageHeight,

if (samplesPerPixel == 1 && bitDepth == 16) {

List<ushort> px16Ta = ddTa.pixels16; List<ushort> px16Re = ddRe.pixels16; pxPo16 = new List<ushort>();

for (i = 0; i < px16Re.Count; i++) {

ushort pi = (ushort)((px16Re[i] + px16Ta[i]) / 2); pxPo16.Add(pi); } minPixelValue = pxPo16.Min(); maxPixelValue = pxPo16.Max(); if (ddTa.signedImage) {

winCentre -= short.MinValue; }

if (Math.Abs(winWidth) < 0.001) {

winWidth = maxPixelValue - minPixelValue; }

if ((winCentre == 0) ||

(minPixelValue > winCentre) || (maxPixelValue < winCentre))

{

winCentre = (maxPixelValue + minPixelValue) / 2; }

imagePanelControl2.Signed16Image = ddTa.signedImage; imagePanelControl2.SetParameters(ref pxPo16, imageWidth, imageHeight, winWidth, winCentre, true, this);

}

if (samplesPerPixel == 3 && bitDepth == 8) {

List<byte> px24Ta = ddTa.pixels24; List<byte> px24Re = ddRe.pixels24; List<byte> px24 = new List<byte>(); for (i = 0; i < px24Re.Count; i++) {

byte pi = (byte)((px24Re[i] + px24Ta[i]) / 2); px24.Add(pi);

}

imagePanelControl2.SetParameters(ref px24, imageWidth, imageHeight,

winWidth, winCentre, samplesPerPixel, true, this); }

}

3. Hàm tính lát cắt nội suy theo kỹ thuật hợp nhất biến dạng cong cải tiến

private void btnRes_Click(object sender, EventArgs e) { imageWidth = ddRe.width; imageHeight = ddRe.height; bitDepth = ddRe.bitsAllocated; winCentre = ddRe.windowCentre; winWidth = ddRe.windowWidth; samplesPerPixel = ddRe.samplesPerPixel; signedImage = ddRe.signedImage; label1.Visible = true; label2.Visible = true; label3.Visible = true; label4.Visible = true; bnResetWL.Enabled = true;

label2.Text = imageWidth.ToString() + " X " + imageHeight.ToString(); if (samplesPerPixel == 1)

label4.Text = bitDepth.ToString() + " bit"; else

label4.Text = bitDepth.ToString() + " bit, " + samplesPerPixel + " samples per pixel";

imagePanelControl3.NewImage = true; List<ushort> px16Ta = ddTa.pixels16; List<ushort> px16Re = ddRe.pixels16; px16 = new List<ushort>();

int numOfTargetImages = pxRe.Count - 1; SpeededUpRobustFeaturePoint[] surfPoints1; SpeededUpRobustFeaturePoint[] surfPoints2; IntPoint[] correlationPoints1;

IntPoint[] correlationPoints2; MatrixH homography;

px16 = new List<ushort>(); Bitmap registratedImage; px16.Add(pxRe.ElementAt(0));

Bitmap modelImage = registratedImages.ElementAt(0); // create the registrated images

for (int i = 1; i <= numOfTargetImages; i++) {

ExtractFeatures(modelImage, pxRe.ElementAt(i).ToBitmap(), out surfPoints1, out surfPoints2);

MatchFeatures(surfPoints1, surfPoints2, out correlationPoints1,

out correlationPoints2);

homography = DCT(correlationPoints1, correlationPoints2); registratedImage = CreateRegisteredImage(modelImage, pxRe.ElementAt(i).ToBitmap(), homography);

registratedImages.Add(registratedImage); }

maxPixelValue = px16.Max(); if (ddRe.signedImage) {

winCentre -= short.MinValue; }

if (Math.Abs(winWidth) < 0.001) {

winWidth = maxPixelValue - minPixelValue; }

if ((winCentre == 0) ||

(minPixelValue > winCentre) || (maxPixelValue < winCentre)) {

winCentre = (maxPixelValue + minPixelValue) / 2; }

imagePanelControl3.Signed16Image = ddRe.signedImage;

imagePanelControl3.SetParameters(ref px16, imageWidth, imageHeight, winWidth, winCentre, true, this);

TÀI LIỆU THAM KHẢO T ếng V ệt

[1] Lương Mạnh Bá, Nguyễn Thanh Thuỷ (1999), Nhập môn xử lý ảnh, NXB Khoa học kỹ thuật, Hà Nội.

[2] Phạm Việt Bình, Đỗ Năng Toàn (2008), Xử lý ảnh, NXB Khoa học kỹ thuật, Hà Nội.

Tiếng Anh

[3] C. R. Appledorn, “A new approach to the interpolation of ampled data,”

IEEE Trans. Med. Imag., vol. 15, pp. 369–376, 1996.

[4] R. Appledorn, 1996, “A new approach to the interpolation of ampled data,”

IEEE Trans. Med. Imag., vol. 15, pp. 369–376.

[5] B. Fischer and J. Modersitzki, Mar. 2004, “A unified approach to fa t image regi tration and a new curvature ba ed regi tration technique,” Linear Algebra and its Applications, vol. 380, pp. 107– 124.

[6] D. H. Frakes, L. P. Dasi, K. Pekkan, H. D. Kitajima, K. Sundareswaran, A. P. Yoganathan, and M. J. T. Smith, Mar. 2008, “A new method for registration-ba ed medical image interpolation”, IEEE Trans on medical imaging, vol. 27, no. 3, pp. 370–7.

[7] J. D. Faires and R. L. Burden, Numerical Methods. Boston, MA: PWS,1993.

[8] A. Go hta by, D. A Turner, and L. V Ackerman, Jan. 1992, “Matching of tomographic lice for interpolation.,” IEEE Trans on medical imaging, vol. 11, no. 4, pp. 507–16.

[9] G. J. Grevera and J. . Udupa, Jan. 1996, “Shape-based interpolation of multidimensional grey-level image ,” IEEE Trans on medical imaging, vol. 15, no. 6, pp. 881–92.

[10] G. J. Grevera and J. . Udupa, Aug. 1998, “An objective compari on of 3- D image interpolation method .,” IEEE transactions on medical imaging, vol. 17, no. 4, pp. 642–52.

[11] G. J. Grevera, J. . Udupa, and Y. Miki, 1999, “A ta k-specific evaluation of three-dimen ional image interpolation technique ,” IEEE Trans on medical imaging, vol. 18, no. 2, pp. 137–43.

[12] W. E. Higgin , C. J. Orlick, and B. E. Ledell, Jan. 1996, “Nonlinear filtering approach to 3-D gray- cale image interpolation.,” IEEE Trans on medical imaging, vol. 15, no. 4, pp. 580–7.

[13] Rorbert G.Keys, 1981, “Cubic convolution interpolation for digital image proce ing”, IEEE Transactions on Acoustics, Speech, and Signal Processing, vol. 29, no. 6, pp. 1153-1160.

[14] T. Y. Lee and W. H. Wang, 2000, “Morphology-based threedimensional interpolation”, IEEE Trans on medical imaging, vol. 19, no. 7, pp. 711–21. [15] J. Leng, G. Xu, and Y. Zhang, 2013, “Medical image interpolation ba ed on

multi-resolution regi tration,” Computers & Mathematics with Applications, vol. 66, no. 1, pp. 1–18.

[16] C.-H. Lin and T.-Y. Lee, Dec. 2002, “Feature-guided shape-based image interpolation”, IEEE transactions on medical imaging, vol. 21, no. 12, pp. 1479–89.

[17] Thomas M. Lehmann, Claudia Gonner, Klaus Spitzer, November 1999, “Survey: Interpolation Method in Medical Image Proce ing”, IEEE Transactions on Medical Imaging, vol. 18, no. 1.

[18] J. Modersitzki, Aug. 2004, Numerical Methods for Image Registration (Numerical Mathematics and Scientific Computation), Oxford university press USA.

[19] J. Modersitzki, 2009, FAIR: flexible algorithms for image registration, vol. 6. SIAM.

[20] M. Merickel, 1988, “3-D recontruction: The registration problem, Computer Vi ion, Graph”, Image Processing, vol. 42, pp. 206 – 219.

[21] G. P. Penney, J. a Schnabel, D. Rueckert, M. a Viergever, W. J. Niessen, 2004, “Regi tration-ba ed interpolation”, IEEE Trans on medical imaging, vol. 23, no. 7, pp. 922–6.

[22] S. W. Rowland, “Computer implementation of image reconstruction formula ,” in Image Reconstruction from Projections: Implementation and Applications, G. T. Herman Ed. Berlin, Germany: Springer-Verlag, 1979, pp. 9–70.

[23] D. Rueckert, L. I. Sonoda, C. Hayes, D. L. Hill, M. O. Leach, D. J. Hawke , 1999, “Nonrigid registration using free-form deformations: application to breast MR images.,” IEEE Trans on medical imaging, vol. 18, no. 8, pp. 712–21.

[24] Zeyun Yu, Ahmadre a Baghaie, 2014, “Curvature-Based registration for slice interpolation of medical image ”, Computational Modeling of Objects Presented in Images. Fundamentals, Methods, and Applications Lecture Notes in Computer Science , Springer,Volume 8641, pp 69-80.

Một phần của tài liệu (LUẬN văn THẠC sĩ) nghiên cứu một số kỹ thuật nội suy trong hiển thị ảnh y tế 04 (Trang 59 - 72)