SIVIC API  0.9.26
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
svkPhilipsSMapper.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_PHILIPS_S_MAPPER_H
43 #define SVK_PHILIPS_S_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 
55 
56 namespace svk {
57 
58 
71 class svkPhilipsSMapper : public vtkObject
72 {
73 
74  public:
75 
76  static svkPhilipsSMapper* New();
77  vtkTypeMacro( svkPhilipsSMapper, vtkObject );
78 
79  virtual void InitializeDcmHeader(
80  map <string, string > sparMap,
81  svkDcmHeader* header,
82  svkMRSIOD* iod,
83  int swapBytes
84  );
85 
86  virtual void ReadSDATFile( string sdatFileName, svkImageData* data );
87 
88 
89  protected:
90 
93 
94  void InitPatientModule();
99  virtual void InitMultiFrameDimensionModule();
100  virtual void InitAcquisitionContextModule();
101  virtual void InitSharedFunctionalGroupMacros();
102  virtual void InitPerFrameFunctionalGroupMacros();
103  virtual void InitMRModifierMacro();
104  virtual void InitMRTransmitCoilMacro();
105  virtual void InitMRAveragesMacro();
106  virtual void InitPixelMeasuresMacro();
107  virtual void InitPlaneOrientationMacro();
108  virtual void InitMREchoMacro();
110  virtual void InitMRReceiveCoilMacro();
112  virtual void InitMRSpectroscopyModule();
113  virtual void InitMRSpectroscopyFOVGeometryMacro();
114  virtual void InitMRSpectroscopyDataModule();
115  string GetDcmPatientPositionString();
116 
117  int GetHeaderValueAsInt( string keyString );
118  float GetHeaderValueAsFloat( string keyString );
119  virtual void SetCellSpectrum(
120  vtkImageData* data,
121  int x, int y, int z,
122  int timePt,
123  int coilNum
124  );
125  string GetDcmDate();
126  void VaxToFloat( const void *inbuf, void *outbuf,
127  const int *count );
128  void GetFOV(float* fov);
129  void GetDimPnts(int* numPixels);
130 
131  map <string, string > sparMap;
133  float* specData;
135  int numSlices;
136  int numFrames;
138  int swapBytes;
139 
140 };
141 
142 
143 } //svk
144 
145 #endif //SVK_PHILIPS_S_MAPPER_H
146 
virtual void InitMultiFrameDimensionModule()
Definition: svkPhilipsSMapper.cc:680
virtual void InitMRModifierMacro()
Definition: svkPhilipsSMapper.cc:628
static svkPhilipsSMapper * New()
Definition: svkDcmHeader.h:66
virtual void InitMRTransmitCoilMacro()
Definition: svkPhilipsSMapper.cc:637
virtual void InitPlaneOrientationMacro()
Definition: svkPhilipsSMapper.cc:342
float * specData
Definition: svkPhilipsSMapper.h:133
svkPhilipsSMapper()
Definition: svkPhilipsSMapper.cc:64
virtual void InitMultiFrameFunctionalGroupsModule()
Definition: svkPhilipsSMapper.cc:219
string GetDcmPatientPositionString()
Definition: svkPhilipsSMapper.cc:1058
string GetDcmDate()
Definition: svkPhilipsSMapper.cc:145
svkDcmHeader * dcmHeader
Definition: svkPhilipsSMapper.h:132
svkMRSIOD * iod
Definition: svkPhilipsSMapper.h:137
virtual void InitSharedFunctionalGroupMacros()
Definition: svkPhilipsSMapper.cc:247
virtual void InitMRReceiveCoilMacro()
Definition: svkPhilipsSMapper.cc:646
void VaxToFloat(const void *inbuf, void *outbuf, const int *count)
Definition: svkPhilipsSMapper.cc:1242
virtual void InitMRSpectroscopyPulseSequenceModule()
Definition: svkPhilipsSMapper.cc:611
void GetDimPnts(int *numPixels)
Definition: svkPhilipsSMapper.cc:1176
int numFrames
Definition: svkPhilipsSMapper.h:136
void InitPatientModule()
Definition: svkPhilipsSMapper.cc:129
virtual void InitMRSpectroscopyModule()
Definition: svkPhilipsSMapper.cc:741
virtual void InitMRAveragesMacro()
Definition: svkPhilipsSMapper.cc:670
virtual void InitMRSpectroscopyDataModule()
Definition: svkPhilipsSMapper.cc:893
virtual void InitPerFrameFunctionalGroupMacros()
Definition: svkPhilipsSMapper.cc:293
virtual void InitMRSpectroscopyFOVGeometryMacro()
Definition: svkPhilipsSMapper.cc:424
map< string, string > sparMap
Definition: svkPhilipsSMapper.h:131
int swapBytes
Definition: svkPhilipsSMapper.h:138
virtual void InitializeDcmHeader(map< string, string > sparMap, svkDcmHeader *header, svkMRSIOD *iod, int swapBytes)
Definition: svkPhilipsSMapper.cc:100
virtual void InitMREchoMacro()
Definition: svkPhilipsSMapper.cc:619
virtual void InitMRTimingAndRelatedParametersMacro()
Definition: svkPhilipsSMapper.cc:413
void GetFOV(float *fov)
Definition: svkPhilipsSMapper.cc:1164
void InitGeneralSeriesModule()
Definition: svkPhilipsSMapper.cc:193
virtual void InitAcquisitionContextModule()
Definition: svkPhilipsSMapper.cc:733
int GetHeaderValueAsInt(string keyString)
Definition: svkPhilipsSMapper.cc:1092
void InitGeneralStudyModule()
Definition: svkPhilipsSMapper.cc:174
void InitGeneralEquipmentModule()
Definition: svkPhilipsSMapper.cc:207
vtkTypeMacro(svkPhilipsSMapper, vtkObject)
int numSlices
Definition: svkPhilipsSMapper.h:135
svkDcmHeader::DcmDataOrderingDirection dataSliceOrder
Definition: svkPhilipsSMapper.h:134
Definition: svkImageData.h:107
~svkPhilipsSMapper()
Definition: svkPhilipsSMapper.cc:83
DcmDataOrderingDirection
Definition: svkDcmHeader.h:108
float GetHeaderValueAsFloat(string keyString)
Definition: svkPhilipsSMapper.cc:1116
virtual void InitPixelMeasuresMacro()
Definition: svkPhilipsSMapper.cc:1133
Definition: svkMRSIOD.h:61
Definition: svkPhilipsSMapper.h:71
virtual void SetCellSpectrum(vtkImageData *data, int x, int y, int z, int timePt, int coilNum)
Definition: svkPhilipsSMapper.cc:1003
virtual void ReadSDATFile(string sdatFileName, svkImageData *data)
Definition: svkPhilipsSMapper.cc:913