8 #include "PlusConfigure.h" 17 #include <vtkObjectFactory.h> 19 #define MAXFLDS 30 // maximum possible number of fields 20 #define MAXFLDSIZE 150 // longest possible field + 1 = 31 byte field 39 os << indent <<
"Filename: " <<
FileName << std::endl;
73 LOG_ERROR(
"Failed to open file " <<
FileName);
79 while (std::getline(in,
line))
81 if (
line[0] ==
'#' &&
line.find(
'=') != std::string::npos)
84 std::vector<std::string> elems;
85 igsioCommon::SplitStringIntoTokens(
line,
'=', elems);
87 elems[1] = igsioCommon::Trim(elems[1]);
90 else if (
line[0] ==
'#')
93 std::vector<std::string> elems;
94 igsioCommon::SplitStringIntoTokens(
line,
' ', elems);
100 std::vector<std::string> elems;
101 igsioCommon::SplitStringIntoTokens(
line,
',', elems);
104 point.
label = elems[0];
105 point.
position[0] = atof(elems[1].c_str());
106 point.
position[1] = atof(elems[2].c_str());
107 point.
position[2] = atof(elems[3].c_str());
108 point.
selected = atoi(elems[4].c_str());
121 if (igsioCommon::IsEqualInsensitive(headerEntry,
"numPoints"))
125 else if (igsioCommon::IsEqualInsensitive(headerEntry,
"version"))
129 else if (igsioCommon::IsEqualInsensitive(headerEntry,
"name"))
133 else if (igsioCommon::IsEqualInsensitive(headerEntry,
"symbolScale"))
137 else if (igsioCommon::IsEqualInsensitive(headerEntry,
"symbolType"))
141 else if (igsioCommon::IsEqualInsensitive(headerEntry,
"visibility"))
145 else if (igsioCommon::IsEqualInsensitive(headerEntry,
"textScale"))
149 else if (igsioCommon::IsEqualInsensitive(headerEntry,
"opacity"))
153 else if (igsioCommon::IsEqualInsensitive(headerEntry,
"ambient"))
157 else if (igsioCommon::IsEqualInsensitive(headerEntry,
"diffuse"))
161 else if (igsioCommon::IsEqualInsensitive(headerEntry,
"specular"))
165 else if (igsioCommon::IsEqualInsensitive(headerEntry,
"power"))
169 else if (igsioCommon::IsEqualInsensitive(headerEntry,
"locked"))
173 else if (igsioCommon::IsEqualInsensitive(headerEntry,
"numberingScheme"))
177 else if (igsioCommon::IsEqualInsensitive(headerEntry,
"color"))
179 std::vector<std::string> elems;
180 igsioCommon::SplitStringIntoTokens(headerEntryValue,
',', elems);
186 else if (igsioCommon::IsEqualInsensitive(headerEntry,
"selectedColor"))
188 std::vector<std::string> elems;
189 igsioCommon::SplitStringIntoTokens(headerEntryValue,
',', elems);
195 else if (igsioCommon::IsEqualInsensitive(headerEntry,
"columns"))
197 std::vector<std::string> elems;
198 igsioCommon::SplitStringIntoTokens(headerEntryValue,
' ', elems);
205 for (
unsigned int i = 0;
i < chars.size(); ++
i)
208 str.erase(std::remove(str.begin(), str.end(), chars[
i]), str.end());
virtual void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
void ProcessHeaderEntry(const std::string &headerEntry, const std::string &headerEntryValue)
void StripCharsFromString(std::string &str, const std::string &chars)
std::vector< std::string > columns
std::vector< FcsvPoint > points
Describes a single fiducial point.
vtkStandardNewMacro(vtkFcsvReader)