Sie sind auf Seite 1von 1

1.

The following Matlab function mri_signal simulates an MRI RF signal output, for a given image matrix img, scale [pixels/cm], x-Gradient [Gauss/cm], y-Gradient [Gauss/cm], main Magnetic field B0 [Tesla], T2* T2star, Simulation time Tlim [s], and Sample time Ts [s]. function rf=mri_signal( img, scale , Gx, Gy, Ty, B0, T2star, Tlim, Ts) % simulate rf signal for MRI pulse sequence % rf=mri_signal( sig_params, scale , Gx, Gy, B0, T2star, Tlim, Ts) % img [szY x szX] image of MRI signal (ie rho*(1-exp(-TR/T1)*exp(-TE/TR) for spin echo) % scale image scale (pixels/ cm) % Gx is x gradient (freq encoding) in Gauss/cm % Gy is y gradient (phase encoding) in Gauss/cm % Ty is phase encoding time in microseconds % B0 is magnetic field in Telsa % T2star T2* spin relaxation in microseconds % Tlim the recording time (in microseconds) % Ts RF signal sampling time resolution (microseconds) Gx= Gx*1e-4; Gy= Gy*1e-4; %convert to Tesla Gyromagenticratio = 42.6; %Mhz/Tesla % Note this assumes a point phase source for each voxel, % this introduces artefacts into the images [szX, szY] = size( img ); phase= 2*pi*Ty*Gy*Gyromagenticratio*( -(szY-1)/2:(szY-1)/2 )*scale ; imgX= exp( 1j*phase ) *img; f_min= Gyromagenticratio*(B0 - Gx*(szX-1)/2*scale ); f_max= Gyromagenticratio*(B0 + Gx*(szX-1)/2*scale ); ft_img= interp1( linspace(f_min, f_max, szX ), imgX, ... 0:1/Tlim:1/Ts, ... % size of FFT domain, 'linear',0); % freq is zero outsize domain ft= [ ft_img, fliplr( conj(ft_img(2:end-1)) ) ]; rf= ifft(ft); if std(imag(rf))>1e-10; error('something wrong with code'); end time1= 1:Tlim/Ts; rf=real(rf(time1)).*exp( -Ts*time1/T2star ); The following sample code allows reconstruction of an MRI image based on multiple simulations using this software.

spc=.05 ; rlim=1; [x,y]= meshgrid(-rlim:spc:rlim,-rlim:spc:rlim); plen= size(x,1); img = .0*((x.^2 + y.^2) > rlim); img( x >.45 & x<.65 & y>-.05 & y<.45) =1; img( x >-.55 & x<-.25 & y>.45 & y<.65) =1; scale=1; T2star= 50; B0= 0.5; % To increase B, decrease Ts; G= 10; Gyromagenticratio = 42.6; %Mhz/t Ts= 0.01; Tlim= 100; szX= size(img,2); max_f= Gyromagenticratio*(B0 + G*1e-4*(szX-1)/2*scale ) *Tlim/2; min_f= Gyromagenticratio*(B0 - G*1e-4*(szX-1)/2*scale ) *Tlim/2; freq_range= floor(min_f):ceil(max_f); mri= []; for Ty= you need to figure this out here rf = mri_signal(img, scale , G, G, Ty, B0, T2star, Tlim, Ts); ft= fft(rf); mri= [mri;ft(freq_range)]; end fm= ifftshift(ifft(mri));imagesc(abs(fm)'); Question: Find an appropriate selection of time steps Ty to reconstruct the image. Show your reconstructed image, and briefly describe any defects in it, in terms of the simulation or reconstruction software.

Das könnte Ihnen auch gefallen