Simply3DScan
PointWriter.WriterPcd Class Reference

Write Points to PCD file More...

Inheritance diagram for PointWriter.WriterPcd:
Collaboration diagram for PointWriter.WriterPcd:

Public Member Functions

void AddPoint (ColorPoint3D point)
 Adds the point. More...
 
void Write (string fileName)
 Writes to specified file name. More...
 

Detailed Description

Write Points to PCD file

Definition at line 26 of file WriterPcd.cs.

Member Function Documentation

void PointWriter.WriterPcd.AddPoint ( ColorPoint3D  point)

Adds the point.

Parameters
pointThe point.

Implements PointWriter.IPointWriter.

Definition at line 38 of file WriterPcd.cs.

39  {
40  this.points.Add(point);
41  }
void PointWriter.WriterPcd.Write ( string  fileName)

Writes to specified file name.

Parameters
fileNameName of the file.

Implements PointWriter.IPointWriter.

Definition at line 49 of file WriterPcd.cs.

50  {
51  StreamWriter streamWriter = new StreamWriter(fileName);
52  streamWriter.Write(this.CreateHeader());
53  foreach (ColorPoint3D point in this.points)
54  {
55  //todo color?
56  streamWriter.WriteLine("{0} {1} {2} {3}", (float)point.X, (float)point.Y, (float)point.Z, (int)point.Color.R << 16|(int)point.Color.G<<8|(int)point.Color.B);
57  }
58  streamWriter.Close();
59  }
double Z
Gets or sets the z.
Definition: ColorPoint3D.cs:30
double Y
Gets or sets the y.
Definition: ColorPoint3D.cs:23
double X
Gets or sets the x.
Definition: ColorPoint3D.cs:16
Color Color
Gets or sets the color.
Definition: ColorPoint3D.cs:38

The documentation for this class was generated from the following file: