00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef RECOREADERODIN_H
00019 #define RECOREADERODIN_H
00020
00021 #include "reader.h"
00022
00023
00034 class RecoReaderOdin : public virtual RecoReaderInterface {
00035
00036 public:
00037 RecoReaderOdin(JcampDxBlock& parblock);
00038 ~RecoReaderOdin();
00039
00040 private:
00041
00042
00043 bool init(const STD_string& input_filename);
00044 bool fetch(RecoCoord& coord, ComplexData<1>& adc);
00045 const STD_vector<RecoCoord>& get_coords() const;
00046 dvector dim_values(recoDim dim) const {return recoInfo.get_DimValues(dim);}
00047 const TinyVector<float,3>& reloffset() const {return reloffset_cache;}
00048 STD_string image_proc() const {return image_proc_cache;}
00049 const TinyVector<int,3>& image_size() const {return size_cache;}
00050 const Protocol& protocol() const {return prot_cache;}
00051 STD_string seqrecipe() const {return recoInfo.get_Recipe();}
00052 STD_string postProc3D() const {return recoInfo.get_PostProc3D();}
00053 STD_string preProc3D() const {return recoInfo.get_PreProc3D();}
00054 STD_string cmdline_opts() const {return recoInfo.get_CmdLineOpts();}
00055
00056
00057 void kcoord2coord(const kSpaceCoord& kcoord, RecoCoord& coord) const;
00058
00059 static bool concat_data(STD_string& rawfile, const STD_string& scandir, const STD_string& fnameprefix);
00060
00061 template<typename T2> bool read_block(T2 dummy, ComplexData<2>& block);
00062
00063 JDXstring fifoFile;
00064 JDXbool padZero;
00065
00066
00067 unsigned int nadc;
00068 int zeroesPerChunk;
00069 unsigned int rawtypesize;
00070
00071
00072 unsigned int nChannels_cache;
00073 TinyVector<float,3> reloffset_cache;
00074 STD_string image_proc_cache;
00075 TinyVector<int,3> size_cache;
00076 Protocol prot_cache;
00077 ReadoutShape readoutShape_cache[MAX_NUMOF_READOUT_SHAPES];
00078 KspaceTraj kspaceTraj_cache[MAX_NUMOF_KSPACE_TRAJS];
00079 ComplexData<1> weightVec_cache[MAX_NUMOF_ADC_WEIGHTING_VECTORS];
00080 Data<float,1> channelFactors;
00081
00082
00083
00084 RecoPars recoInfo;
00085 STD_string dataformat;
00086 ComplexData<2> rawdata;
00087 STD_string rawdata_filename;
00088 FILE* rawdata_fileptr;
00089 unsigned int index;
00090 unsigned int ri_index;
00091 kSpaceCoord kcoord_cache;
00092 unsigned int chancount;
00093
00094 mutable STD_vector<RecoCoord> coord_vec_cache;
00095
00096 };
00097
00098
00099
00104 #endif
00105