SIVIC API  0.9.26
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
svkVarianFidMapper.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2009-2014 The Regents of the University of California.
3  * All Rights Reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions are met:
7  * • Redistributions of source code must retain the above copyright notice,
8  * this list of conditions and the following disclaimer.
9  * • Redistributions in binary form must reproduce the above copyright notice,
10  * this list of conditions and the following disclaimer in the documentation
11  * and/or other materials provided with the distribution.
12  * • None of the names of any campus of the University of California, the name
13  * "The Regents of the University of California," or the names of any of its
14  * contributors may be used to endorse or promote products derived from this
15  * software without specific prior written permission.
16  *
17  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
18  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20  * IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
21  * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
23  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
24  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
26  * OF SUCH DAMAGE.
27  */
28 
29 
30 
31 /*
32  * $URL$
33  * $Rev$
34  * $Author$
35  * $Date$
36  *
37  * Authors:
38  * Jason C. Crane, Ph.D.
39  * Beck Olson
40  */
41 
42 #ifndef SVK_VARIAN_FID_MAPPER_H
43 #define SVK_VARIAN_FID_MAPPER_H
44 
45 
46 #include <vtkImageData.h>
47 #include <svkImageData.h>
48 
49 #include <svkDcmHeader.h>
50 #include <svkMRSIOD.h>
51 
52 #include <map>
53 #include <string>
54 #include <vector>
55 
56 
57 namespace svk {
58 
59 
74 class svkVarianFidMapper : public vtkObject
75 {
76 
77  public:
78 
79  vtkTypeMacro( svkVarianFidMapper, vtkObject );
80 
81  virtual void InitializeDcmHeader(
82  map <string, vector < vector<string> > > procparMap,
83  svkDcmHeader* header,
84  svkMRSIOD* iod,
85  int swapBytes
86  );
87 
88  virtual void ReadFidFile( string fidFileName, svkImageData* data );
89 
90 
91  protected:
92 
95 
96  void InitPatientModule();
101  virtual void InitMultiFrameDimensionModule();
102  virtual void InitAcquisitionContextModule();
103  virtual void InitSharedFunctionalGroupMacros();
104  virtual void InitPerFrameFunctionalGroupMacros();
105  virtual void InitMRModifierMacro();
106  virtual void InitMRTransmitCoilMacro();
107  virtual void InitMRAveragesMacro();
108  virtual void InitPixelMeasuresMacro();
109  virtual void InitPlaneOrientationMacro();
110  virtual void InitMREchoMacro();
112  virtual void InitMRReceiveCoilMacro();
113  virtual void InitMRSpectroscopyPulseSequenceModule() = 0;
114  virtual void InitMRSpectroscopyModule();
115  virtual void InitMRSpectroscopyFOVGeometryMacro();
116  virtual void InitMRSpectroscopyDataModule();
117  string GetDcmPatientPositionString();
118 
119  virtual void ConvertCmToMm();
120 
122  string keyString, int valueIndex = 0, int procparRow = 0
123  );
124  float GetHeaderValueAsFloat(
125  string keyString, int valueIndex = 0, int procparRow = 0
126  );
127  string GetHeaderValueAsString(
128  string keyString, int valueIndex = 0, int procparRow = 0
129  );
130 
131  virtual void SetCellSpectrum(
132  vtkImageData* data,
133  int x, int y, int z,
134  int timePt,
135  int coilNum
136  );
137 
138 
139  map <string, vector < vector<string> > >
142  float* specData;
144  int numSlices;
145  int numFrames;
147  int swapBytes;
148 
149 };
150 
151 
152 } //svk
153 
154 #endif //SVK_VARIAN_FID_MAPPER_H
155 
virtual void InitPixelMeasuresMacro()
Definition: svkVarianFidMapper.cc:1188
svkDcmHeader::DcmDataOrderingDirection dataSliceOrder
Definition: svkVarianFidMapper.h:143
virtual void InitMultiFrameDimensionModule()
Definition: svkVarianFidMapper.cc:697
Definition: svkDcmHeader.h:66
map< string, vector< vector< string > > > procparMap
Definition: svkVarianFidMapper.h:140
virtual void InitPlaneOrientationMacro()
Definition: svkVarianFidMapper.cc:366
virtual void InitSharedFunctionalGroupMacros()
Definition: svkVarianFidMapper.cc:224
Definition: svkVarianFidMapper.h:74
int numSlices
Definition: svkVarianFidMapper.h:144
virtual void InitMRModifierMacro()
Definition: svkVarianFidMapper.cc:644
void InitGeneralStudyModule()
Definition: svkVarianFidMapper.cc:145
svkMRSIOD * iod
Definition: svkVarianFidMapper.h:146
virtual void InitMRSpectroscopyModule()
Definition: svkVarianFidMapper.cc:758
string GetDcmPatientPositionString()
Definition: svkVarianFidMapper.cc:1110
virtual void InitMRAveragesMacro()
Definition: svkVarianFidMapper.cc:687
svkVarianFidMapper()
Definition: svkVarianFidMapper.cc:62
svkDcmHeader * dcmHeader
Definition: svkVarianFidMapper.h:141
virtual void InitMREchoMacro()
Definition: svkVarianFidMapper.cc:635
~svkVarianFidMapper()
Definition: svkVarianFidMapper.cc:81
void InitGeneralSeriesModule()
Definition: svkVarianFidMapper.cc:166
float GetHeaderValueAsFloat(string keyString, int valueIndex=0, int procparRow=0)
Definition: svkVarianFidMapper.cc:1161
virtual void InitMRSpectroscopyDataModule()
Definition: svkVarianFidMapper.cc:914
vtkTypeMacro(svkVarianFidMapper, vtkObject)
virtual void InitPerFrameFunctionalGroupMacros()
Definition: svkVarianFidMapper.cc:249
virtual void InitializeDcmHeader(map< string, vector< vector< string > > > procparMap, svkDcmHeader *header, svkMRSIOD *iod, int swapBytes)
Definition: svkVarianFidMapper.cc:98
virtual void ReadFidFile(string fidFileName, svkImageData *data)
Definition: svkVarianFidMapper.cc:931
virtual void ConvertCmToMm()
Definition: svkVarianFidMapper.cc:1065
virtual void InitMRSpectroscopyPulseSequenceModule()=0
void InitGeneralEquipmentModule()
Definition: svkVarianFidMapper.cc:180
virtual void InitMRSpectroscopyFOVGeometryMacro()
Definition: svkVarianFidMapper.cc:463
virtual void SetCellSpectrum(vtkImageData *data, int x, int y, int z, int timePt, int coilNum)
Definition: svkVarianFidMapper.cc:1010
virtual void InitMRTransmitCoilMacro()
Definition: svkVarianFidMapper.cc:654
Definition: svkImageData.h:107
string GetHeaderValueAsString(string keyString, int valueIndex=0, int procparRow=0)
Definition: svkVarianFidMapper.cc:1178
DcmDataOrderingDirection
Definition: svkDcmHeader.h:108
Definition: svkMRSIOD.h:61
void InitPatientModule()
Definition: svkVarianFidMapper.cc:129
float * specData
Definition: svkVarianFidMapper.h:142
virtual void InitMultiFrameFunctionalGroupsModule()
Definition: svkVarianFidMapper.cc:192
virtual void InitMRTimingAndRelatedParametersMacro()
Definition: svkVarianFidMapper.cc:451
int swapBytes
Definition: svkVarianFidMapper.h:147
virtual void InitMRReceiveCoilMacro()
Definition: svkVarianFidMapper.cc:663
int GetHeaderValueAsInt(string keyString, int valueIndex=0, int procparRow=0)
Definition: svkVarianFidMapper.cc:1143
int numFrames
Definition: svkVarianFidMapper.h:145
virtual void InitAcquisitionContextModule()
Definition: svkVarianFidMapper.cc:750