Example #1
0
        AvlNet.Point3D[] DataTrans(PoinCloudLib.PointCloud pc)
        {
            string csvFilename = filename.Replace("pcd", "csv");

            if (File.Exists(csvFilename))
            {
                File.Delete(csvFilename);
            }
            Stream       stream = File.OpenWrite(csvFilename);
            BinaryWriter bw     = new BinaryWriter(stream, Encoding.ASCII);

            AvlNet.Point3D[] _3Dpoints = new AvlNet.Point3D[pc.Width * pc.Height];
            int index = 0;

            for (int i = 0; i < pc.ProfileList.Count; i++)
            {
                for (int j = 0; j < pc.ProfileList[0].Count; j++)
                {
                    _3Dpoints[index].X = pc.ProfileList[i][j].X;
                    _3Dpoints[index].Y = pc.ProfileList[i][j].Y;
                    _3Dpoints[index].Z = pc.ProfileList[i][j].Z;

                    string csvStr = _3Dpoints[index].X.ToString() + "," + _3Dpoints[index].Y.ToString() + "," + _3Dpoints[index].Z.ToString() + Environment.NewLine;

                    bw.Write(Encoding.Default.GetBytes(csvStr), 0, csvStr.Length);
                    listPoints.Add(_3Dpoints[index]);
                    index++;
                }
            }
            stream.Flush();
            bw.Close();

            return(_3Dpoints);
        }
Example #2
0
 public static Bitmap RGBImageGenerator(PointCloud pc)
 {
     return(null);
 }
Example #3
0
 static short[] RGBData(PointCloud pc)
 {
     return(null);
 }