SIVIC API  0.9.26
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
svkVarianReader.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 
43 #ifndef SVK_VARIAN_READER_H
44 #define SVK_VARIAN_READER_H
45 
46 #include <svkImageReader2.h>
47 
48 #include <map>
49 #include <vector>
50 #include <string>
51 
52 namespace svk {
53 
54 
59 {
60 
61  public:
62 
64  static void UserToMagnet(double* user, double* magnet, double dcos[3][3]);
65 
66 
67  protected:
68 
71 
72 
73  // Methods:
74  int GetNumPixelsInVol();
75  int GetNumSlices();
76  void ParseProcpar( string path );
78  void ReadLine(ifstream* fs, istringstream* iss);
80  string key,
81  string valueArray1,
82  string valueArray2
83  );
85  int GetNumberOfProcparElements( string* valueString );
86  void GetProcparValueArray( string* valueString );
87  void RemoveStringQuotes(string* input);
89  vector<string>* procparVector,
90  string valueArray
91  );
92 
93  // Members:
94  ifstream* procparFile;
95  map <string, vector < vector<string> > >
97  int numSlices;
100 
101 };
102 
103 
104 } //svk
105 
106 
107 #endif //SVK_VARIAN_READER_H
108 
void ParseProcpar(string path)
Definition: svkVarianReader.cc:120
int GetProcparKeyValuePair()
Definition: svkVarianReader.cc:169
Definition: svkImageReader2.h:60
int GetNumberOfProcparElements(string *valueString)
Definition: svkVarianReader.cc:257
int GetNumSlices()
Definition: svkVarianReader.cc:107
vtkTypeMacro(svkVarianReader, svkImageReader2)
Definition: svkVarianReader.h:58
map< string, vector< vector< string > > > procparMap
Definition: svkVarianReader.h:96
void AssignProcparVectorElements(vector< string > *procparVector, string valueArray)
Definition: svkVarianReader.cc:350
void ParseAndSetProcparStringElements(string key, string valueArray1, string valueArray2)
Definition: svkVarianReader.cc:239
void RemoveStringQuotes(string *input)
Definition: svkVarianReader.cc:338
ifstream * procparFile
Definition: svkVarianReader.h:94
void GetProcparValueArray(string *valueString)
Definition: svkVarianReader.cc:301
void PrintProcparKeyValuePairs()
Definition: svkVarianReader.cc:397
int GetNumPixelsInVol()
Definition: svkVarianReader.cc:94
long procparFileSize
Definition: svkVarianReader.h:98
static void UserToMagnet(double *user, double *magnet, double dcos[3][3])
Definition: svkVarianReader.cc:425
svkVarianReader()
Definition: svkVarianReader.cc:61
svkDcmHeader::DcmDataOrderingDirection dataSliceOrder
Definition: svkVarianReader.h:99
int numSlices
Definition: svkVarianReader.h:97
void ReadLine(ifstream *fs, istringstream *iss)
Definition: svkVarianReader.cc:225
~svkVarianReader()
Definition: svkVarianReader.cc:78
DcmDataOrderingDirection
Definition: svkDcmHeader.h:108