필터 지우기
필터 지우기

reading a dicom file

조회 수: 1 (최근 30일)
Azza Ahmed
Azza Ahmed 2012년 4월 17일
Dear Matlab communite
I am trying to read a dicom file (an MRI image) using matlab and then perform a Fourier transform of the image. I have written this code {please find below}:
clear all
info = dicominfo('MR01.dcm');
Y = dicomread(info);
J=imadjust(Y,stretchlim(Y),[0 1]);
F = fftshift(fft2(fftshift(J)));
When I run the code from the m file I get this message: ??? Undefined function or variable 'dicom'. However, when I copy and paste the code in the command window the code runs well without any error. I really do not know what is the cause of the error. May someone please help me in solving this query.
Best wishes AA

답변 (1개)

Anathea Pepperl
Anathea Pepperl 2012년 4월 17일
What is the name of your m file? It may be that the m file is not in the MATLAB path.
  댓글 수: 2
Azza Ahmed
Azza Ahmed 2012년 4월 30일
Yes, you were right. I named 2 files with different names but I kept running the wrong one. Many thanks Anathea for the tip
Sean de Wolski
Sean de Wolski 2012년 4월 30일
Please accept Anathea's answer to mark this thread closed.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 DICOM Format에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by