- point.pixel_value = atof(replace_dots(stringline.substr(previousSpace,space - previousSpace)).c_str());
- // DD(point.pixel_value);
- } else {
- point.pixel_value=0.; //Not in file
- point.coordinates[3]=0.;
- }
- previousSpace = space;
- //this is the maximum size of comments
- space = (stringline.find("\n", previousSpace+1) < 254 ? stringline.find("\n", previousSpace+1) : 254);
- if (previousSpace != -1) {
- point.comments = stringline.substr(previousSpace,space - (previousSpace)).c_str();
+ point.coordinates[2] = atof(replace_dots(stringline.substr(previousSpace,space - previousSpace)).c_str());
+ previousSpace = space;
+ if (mFormatVersion>0) {
+ space = stringline.find(" ", previousSpace+1);
+ if (space < -1 || space > (int)stringline.size()) {
+ ErrorMsg(mLandmarks.size(),"t position");
+ continue;
+ }
+ point.coordinates[3] = atof(replace_dots(stringline.substr(previousSpace,space - previousSpace)).c_str());
+ previousSpace = space;
+ space = stringline.find(" ", previousSpace+1);
+ if (space < -1 || space > (int)stringline.size()) {
+ ErrorMsg(mLandmarks.size(),"pixel value");
+ continue;
+ }
+ point.pixel_value = atof(replace_dots(stringline.substr(previousSpace,space - previousSpace)).c_str());
+ // DD(point.pixel_value);
+ } else {
+ point.pixel_value=0.; //Not in file
+ point.coordinates[3]=(float)f;
+ }
+ previousSpace = space;
+ //this is the maximum size of comments
+ space = (stringline.find("\n", previousSpace+1) < 254 ? stringline.find("\n", previousSpace+1) : 254);
+ if (previousSpace != -1) {
+ point.comments = stringline.substr(previousSpace,space - (previousSpace)).c_str();
+ }
+ // DD(point.comments);
+ mLandmarks[int(point.coordinates[3])].push_back(point);
+ mIds[int(point.coordinates[3])]->InsertNextTuple1(0.55);
+ idPoint = mPoints[int(point.coordinates[3])]->InsertNextPoint(
+ point.coordinates[0],point.coordinates[1],point.coordinates[2]);
+ std::string str_vtkIdType; // string which will contain the result
+ std::ostringstream convert; // stream used for the conversion
+ convert << idPoint; // insert the textual representation of 'idPoint' in the characters in the stream
+ str_vtkIdType = convert.str(); // set 'str_vtkIdType' to the contents of the stream
+ mLabels[int(point.coordinates[3])]->InsertNextValue(str_vtkIdType.c_str());