dox/IO/vtkBrukerFIDReader.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   vtkCNMRRLibrary
00004   Module:    $RCSfile: vtkBrukerFIDReader.h,v $
00005 
00006   Copyright  2005  The Pennsylvania State University
00007   
00008           Notice
00009  
00010   The contents of this file are subject to The Pennsylvania State University 
00011   Open Source License (the "License"); you may not use this file except in 
00012   compliance with the License. You may obtain a copy of the License at H066 
00013   Radiology, NMR Building, 500 University Drive, Hershey, PA, 
00014   tel. (717) 531-6069 or via email at dcb210@psu.edu.
00015  
00016   Software distributed under the License is distributed on an "AS IS" basis, 
00017   WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License 
00018   for the specific language governing rights and limitations under the 
00019   License.
00020  
00021   The Original Code is listed under Exhibit A of the license.
00022  
00023   The Initial Developer of the Original Code is Don Bigler.
00024  
00025   Contributor(s):
00026   
00027 =========================================================================*/
00037 #ifndef __vtkBrukerFIDReader_h
00038 #define __vtkBrukerFIDReader_h
00039 
00040 // Values used to determine type of phase encoding.
00041 typedef enum
00042 { 
00043    Read, 
00044    Linear, 
00045    Centred, 
00046    Rare, 
00047    User_Defined_Encoding
00048 } ACQphaseEncodingMode;
00049 
00050 // Values used to determine ACQ seperation mode.
00051 typedef enum
00052 {
00053    Equidistant=1,
00054    Contiguous,
00055    Var_Parallel,
00056    Var_Angle,
00057    Packages,
00058    Unknown
00059 } ACQSliceSepnMode;
00060       
00061 #include "vtkMedicalImageReader2.h"
00062 #include "vtkCNMRRIOWin32Header.h"
00063 
00064 class VTK_CNMRR_IO_EXPORT vtkBrukerFIDReader : public vtkMedicalImageReader2
00065 {
00066    public:
00067       static vtkBrukerFIDReader *New();
00068       vtkTypeRevisionMacro(vtkBrukerFIDReader,vtkMedicalImageReader2);
00069       virtual void PrintSelf(ostream& os, vtkIndent indent);
00070 
00071       virtual int CanReadFile(const char* fname);
00072 
00074       virtual void SeekFile(int x, int echo, int slice, int y, int z, int nr);
00075 
00077 
00078       virtual const char* GetDescriptiveName()
00079       {
00080          return "Bruker fid";
00081       }
00083 
00085 
00086       vtkGetVectorMacro(RealDataExtent,int,12);
00088       
00090 
00091       vtkGetVectorMacro(RealModifiedDataExtent,int,12);
00093 
00095 
00096       vtkGetVectorMacro(RealDataIncrements,int,7);
00098       
00100 
00102       vtkGetVectorMacro(RealModifiedDataIncrements,int,7);
00104 
00106 
00107       vtkGetMacro(ACQ_dim, int);
00109 
00111 
00112       vtkGetVector3Macro(ACQ_size, int);
00114 
00116 
00117       vtkGetVector3Macro(ACQ_fov, double);
00119 
00121 
00122       vtkGetMacro(NumSlices, int);
00124 
00126 
00127       vtkGetMacro(Nechoes, int);
00129       
00131 
00132       vtkGetMacro(ACQ_n_echo_images, int);
00134 
00136 
00137       vtkGetMacro(NumRepetitions, int);
00139 
00141 
00142       vtkGetMacro(ACQ_echo_timeArraySize, int);
00144 
00146       double *GetACQ_echo_time() {return this->ACQ_echo_time;};
00147       
00149 
00150       vtkGetMacro(ACQ_repetition_timeArraySize, int);
00152 
00154       double *GetACQ_repetition_time() {return this->ACQ_repetition_time;};
00155 
00157 
00158       vtkGetMacro(ACQ_slice_thick, double);
00160       
00162 
00163       vtkGetMacro(ACQ_phase_factor, int);
00165 
00167 
00169       vtkGetVector3Macro(EchoPosition, int);
00171 
00173 
00174       vtkGetVectorMacro(Nucleus,char,9);
00176       
00178 
00179       vtkGetMacro(BaseFrequency, double);
00181       
00183 
00184       vtkGetVector3Macro(ACQ_grad_matrixArraySize, int);
00186       
00188       double *GetACQ_grad_matrix() {return this->ACQ_grad_matrix;};
00189 
00191 
00192       vtkGetMacro(SliceOrderArraySize, int);
00194       
00196       double *GetACQ_read_offset() {return this->ACQ_read_offset;};
00197 
00199 
00200       vtkGetMacro(ACQ_read_offsetArraySize, int);
00202       
00204       double *GetACQ_phase1_offset() {return this->ACQ_phase1_offset;};
00205 
00207 
00208       vtkGetMacro(ACQ_phase1_offsetArraySize, int);
00210       
00212       double *GetACQ_phase2_offset() {return this->ACQ_phase2_offset;};
00213 
00215 
00216       vtkGetMacro(ACQ_phase2_offsetArraySize, int);
00218       
00220       int *GetSliceOrder() {return this->SliceOrder;};
00221       
00223 
00224       vtkSetMacro(SortSlices, int);
00225       vtkGetMacro(SortSlices, int);
00226       vtkBooleanMacro(SortSlices, int);
00228 
00230 
00231       vtkGetMacro(YOrderArraySize, int);
00233       
00235       int *GetYOrder() {return this->YOrder;};
00236       
00238 
00239       vtkSetMacro(SortYAxis, int);
00240       vtkGetMacro(SortYAxis, int);
00241       vtkBooleanMacro(SortYAxis, int);
00243 
00245 
00246       vtkGetMacro(ZOrderArraySize, int);
00248       
00250       int *GetZOrder() {return this->ZOrder;};
00251       
00253 
00254       vtkSetMacro(SortZAxis, int);
00255       vtkGetMacro(SortZAxis, int);
00256       vtkBooleanMacro(SortZAxis, int);
00258       
00260 
00262       vtkSetMacro(ReverseAlternateRows, int);
00263       vtkGetMacro(ReverseAlternateRows, int);
00264       vtkBooleanMacro(ReverseAlternateRows, int);
00266       
00268 
00270       vtkSetMacro(ReverseAlternateColumns, int);
00271       vtkGetMacro(ReverseAlternateColumns, int);
00272       vtkBooleanMacro(ReverseAlternateColumns, int);
00274 
00275    protected:
00276       vtkBrukerFIDReader();
00277       ~vtkBrukerFIDReader();
00278 
00279       virtual void ExecuteInformation();
00280       virtual void ExecuteData(vtkDataObject *out);
00281       virtual void ComputeDataIncrements();
00282 
00283       // Sort variables.
00284       int SortSlices;
00285       int SortYAxis;
00286       int SortZAxis;
00287       int ReverseAlternateRows;
00288       int ReverseAlternateColumns;
00289       int StandardKblockFormat;
00290 
00291       // Create YOrder & ZOrder Arrays.
00292       int CreateOrderArrays();
00293    
00294       // The real data extents for a Bruker fid file
00295       // are actually 6 dimensional.
00296       int RealDataExtent[12];
00297    
00298       // The real extents need to modified for fid's
00299       // where ACQ_phase_factor > 1.
00300       int RealModifiedDataExtent[12];
00301 
00302       // Data increments are calculated differently
00303       // for an fid file.
00304       int RealDataIncrements[7];
00305       int RealModifiedDataIncrements[7];
00306 
00307       // Important variables used for image
00308       // reconstruction and therefore exposed
00309       // publically.
00310       int ACQ_dim;
00311       int ACQ_size[3];
00312       int NumSlices;
00313       int Nechoes;
00314       int ACQ_n_echo_images;
00315       int NumRepetitions;
00316       int EchoPosition[3];
00317       char Nucleus[9];
00318       double BaseFrequency;
00319 
00320       // Other variables.
00321       int ACQ_grad_matrixArraySize[3];
00322       double *ACQ_grad_matrix;
00323       int ACQ_obj_orderArraySize;
00324       int *ACQ_obj_order;
00325       int ACQ_fovSize;
00326       double *ACQ_echo_time;
00327       int ACQ_echo_timeArraySize;
00328       double *ACQ_repetition_time;
00329       int ACQ_repetition_timeArraySize;
00330       double ACQ_fov[3];
00331       double *ACQ_slice_sepn;
00332       int ACQ_slice_sepnArraySize;
00333       double ACQ_slice_thick;
00334       int ACQ_phase_factor;
00335       int ACQ_rare_factor;
00336       int ACQ_phase_encoding_size;
00337       ACQphaseEncodingMode *ACQ_phase_encoding_mode;
00338       ACQSliceSepnMode ACQ_slice_sepn_mode;
00339       int ACQ_phase_enc_start;
00340       double *ACQ_phase_enc_start_array;
00341       int ACQ_spatial_size1;
00342       double *ACQ_spatial_phase1;
00343       int ACQ_spatial_size2;
00344       double *ACQ_spatial_phase2;
00345       double *ACQ_read_offset;
00346       int ACQ_read_offsetArraySize;
00347       double *ACQ_phase1_offset;
00348       int ACQ_phase1_offsetArraySize;
00349       double *ACQ_phase2_offset;
00350       int ACQ_phase2_offsetArraySize;     
00351       int *SliceOrder;
00352       int   SliceOrderArraySize;
00353       int *YOrder;
00354       int   YOrderArraySize;
00355       int *ZOrder;
00356       int   ZOrderArraySize;
00357       
00358    private:
00359       vtkBrukerFIDReader(const vtkBrukerFIDReader&);  // Not implemented.
00360       void operator=(const vtkBrukerFIDReader&);  // Not implemented.
00361 };
00362 
00363 #endif

Generated on Tue May 12 14:53:03 2009 for vtkCNMRRLibrary by  doxygen 1.4.7