Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals

seq-tse.c

Go to the documentation of this file.
00001 /************************************************************************* 00002 * $Id: seq-tse.c,v 1.6 2005/09/07 07:13:33 yougz Exp $ 00003 ************************************************************************** 00004 This software is governed by the CeCILL license under French law and 00005 abiding by the rules of distribution of free software. You can use, 00006 modify and/ or redistribute the software under the terms of the CeCILL 00007 license as circulated by CEA, CNRS and INRIA at the following URL 00008 "http://www.cecill.info". 00009 00010 As a counterpart to the access to the source code and rights to copy, 00011 modify and redistribute granted by the license, users are provided only 00012 with a limited warranty and the software's author, the holder of the 00013 economic rights, and the successive licensors have only limited 00014 liability. 00015 00016 In this respect, the user's attention is drawn to the risks associated 00017 with loading, using, modifying and/or developing or reproducing the 00018 software by the user in light of its specific status of free software, 00019 that may mean that it is complicated to manipulate, and that also 00020 therefore means that it is reserved for developers and experienced 00021 professionals having in-depth computer knowledge. Users are therefore 00022 encouraged to load and test the software's suitability as regards their 00023 requirements in conditions enabling the security of their systems and/or 00024 data to be ensured and, more generally, to use and operate it in the 00025 same conditions as regards security. 00026 00027 The fact that you are presently reading this means that you have had 00028 knowledge of the CeCILL license and that you accept its terms. 00029 00030 Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de 00031 l'Image). All rights reserved. See License.txt for details. 00032 00033 Version 1.0 05/09/2005 00034 *************************************************************************/ 00035 #include "seq-tse.h" 00036 #include "seq-se.h" 00037 00038 #include "event-rfpulse.h" 00039 #include "event-precession.h" 00040 #include "event-acquisition.h" 00041 #include "seq-mpi.h" 00042 00043 void SeqTurboSpinEcho2D_0(SEQPARAM *seqparam,EXPERIENCE3D*expr); 00044 00054 PPPVOLUME_COMPLEX_DOUBLE SeqTurboSpinEcho2D(SEQPARAM *seqparam,EXPERIENCE3D*expr) 00055 { 00056 mpi_job(seqparam , expr, SeqTurboSpinEcho2D_0); 00057 NormalizeRFSignal(expr); 00058 return(GetSignalRFComplexFromExperience(expr)); 00059 } 00060 00069 void SeqTurboSpinEcho2D_0(SEQPARAM *seqparam,EXPERIENCE3D*expr) 00070 { 00071 int ntx,nty; 00072 double fovx,fovy; 00073 double te,tr,tacq,timp,acq_delay,tgp; /* ms */ 00074 double gx,gy,gz,gp; 00075 int npz; 00076 int tfact; 00077 int i; 00078 int Nenc,M,Nex,m,n; 00079 int kmn1,kmn4,kmn5,k; 00080 00081 EVENT* event, event_r; 00082 event = &event_r; 00083 00084 printf("Starting SeqTurboSpinEcho2D \n"); 00085 ntx = expr->ntx; 00086 nty = expr->nty; 00087 tacq = expr->readout_time*1.e+3; 00088 fovx = expr->fovx; 00089 fovy = expr->fovy; 00090 00091 te = seqparam->te; 00092 tr = seqparam->tr; 00093 tfact = (int) seqparam->tfact; 00094 00095 CheckTimesSE( tacq, te, tr); 00096 timp=0.3; /*RF pulse duration in ms */ 00097 acq_delay = 0; 00098 tgp = te/2.- tacq/2; 00099 gx = (ntx-2.)/tacq/G_kHz_G/fovx; 00100 gy = 2*M_PI*(nty-1)/G_rad_G/fovy/(tgp/1000); 00101 gz = 0.0; 00102 npz= 0; 00103 00104 SetSpoilingFlag(event,ACTIVE); /* XY Spoiling after each line acquisition */ 00105 i=0; 00106 DoWaiting(expr,event,ATT_INIT); /* To get an initial Magnetization M0 */ 00107 for(i=0;i<10;i++) /* Boucle de repetition pour un Mz saturee des la premiere acquisition*/ 00108 { 00109 DoPulseRect(expr,event, 90.,timp); 00110 DoWaiting(expr,event,te/2.0); 00111 DoPulseRect(expr,event,180.,timp); 00112 DoWaiting(expr,event,tr-te/2.0); 00113 } 00114 00115 Nenc = nty; /* Number of lines of the k space to acquire */ 00116 M=tfact; /* Number of echo per 90° RF pulse */ 00117 Nex = Nenc/M; /* Number of excitation to repeat */ 00118 printf("%d lines of the k space acquired in %d excitations of %d echos each \n",Nenc,Nex,M); 00119 00120 for (m=1; m<= Nex; m++) /* Excitation m */ 00121 { 00122 DoPulseRect(expr,event,90,timp); 00123 DoGradient(expr,event,tacq/2,gx,0,0); 00124 DoWaiting(expr,event,te/2-tacq/2); 00125 for (n=1;n<=M;n++) /* Echo n */ 00126 { 00127 DoPulseRect(expr,event,180.,timp); 00128 /* kmn1 >> interleaving the strong magnitude echoes in the k space # k space subsampling, image periodisation */ 00129 kmn1=n-1+(m-1)*M-Nenc/2+Nenc/2; 00130 /* kmn4 -> k space filling by a step of echo energy > a maximum of energy is contained in the HF half space */ 00131 kmn4=m-1+(n-1)*Nex-Nenc/2+Nenc/2; 00132 /* kmn5 -> K space weighting by a step centered on the zero frequency */ 00133 if (m>Nex/2) kmn5= -(m-Nex/2+(n-1)*Nex/2)+Nenc/2; 00134 else kmn5= (m-1+(n-1)*Nex/2)+Nenc/2; 00135 k=kmn5; /* K space filling choice */ 00136 gp = (gy) * (k - Nenc / 2) / Nenc; 00137 DoGradient(expr,event,tgp,0,-gp,0); 00138 DoAcqFrequenceX(expr,event,gx,k,npz,acq_delay,MINUS); 00139 DoGradient(expr,event,tgp,0,+gp,0); 00140 i++; 00141 } 00142 DoWaiting(expr,event,tr-((tfact)*te)-te/2.0); 00143 } 00144 printf("Ending SeqTurboSpinEcho2D \n"); 00145 } 00146

Generated on Wed Oct 19 09:28:34 2005 for SIMRI3D by doxygen 1.3.7