private void Start()
    {
//#if UNITY_EDITOR
//        Util.DataLoadInfo._dataType = Util.Datatype.pcd;
//        Util.DataLoadInfo._accessMode = Util.AccesMode.Create;
//        Util.DataLoadInfo._sessionName = "EditorDev";

//        if (Util.DataLoadInfo._dataType == Util.Datatype.pcd)
//            Util.DataLoadInfo._sourceDataPath = "C:\\Users\\gruepazu\\Desktop\\PointClouds\\000000000_LidarImage_000000002.pcd";
//        else if (Util.DataLoadInfo._dataType == Util.Datatype.hdf5_DaimlerLidar)
//            Util.DataLoadInfo._sourceDataPath = "C:\\Users\\gruepazu\\Desktop\\LidarDaten\\DatenDAG\\2017-08-18_090334\\LidarImages_03_05\\LidarImage_000003049.hdf5";
//#endif

        if (Util.DataLoadInfo._accessMode == Util.AccesMode.Create)
        {
            CreateSessionFolder();
            MovementOptions.LoadFromSessionPath(Util.DataLoadInfo._sessionFolderPath);

            List <PointCloud> pointClouds = new List <PointCloud>();

            if (Util.DataLoadInfo._dataType == Util.Datatype.pcd)
            {
                pointClouds = Import.ImportPcd(Util.DataLoadInfo._sourceDataPath);
            }
            else if (Util.DataLoadInfo._dataType == Util.Datatype.hdf5_DaimlerLidar)
            {
                pointClouds = Import.ImportHdf5_DaimlerLidar(Util.DataLoadInfo._sourceDataPath);
            }

            Session = new LabelSession(pointClouds, 0);
        }
        else
        {
            SessionSave saveFile;

            using (Stream stream = File.Open(Util.DataLoadInfo._sourceDataPath, FileMode.Open))
            {
                var binaryFormatter = new System.Runtime.Serialization.Formatters.Binary.BinaryFormatter();
                saveFile = binaryFormatter.Deserialize(stream) as SessionSave;
            }

            Session = new LabelSession(saveFile);
        }

        Session.GetCurrentPointCloud().EnableAllPoints();
        Session._sessionName = Util.DataLoadInfo._sessionName;
    }
Esempio n. 2
0
    private void Start()
    {
        List <PointCloud> pointClouds;

#if UNITY_EDITOR
        pointClouds = Import.ImportPcd("C:\\Users\\gruepazu\\Desktop\\MainBuild\\TutorialData");
#else
        pointClouds = Import.ImportPcd(Path.Combine(Directory.GetParent(Application.dataPath).FullName, "TutorialData\\TutorialCloud.pcd"));
#endif
        Session = new LabelSession(pointClouds, 0);

        foreach (var cloud in Session._pointClouds)
        {
            cloud._origin.SetActive(false);
        }

        DisableFunctions();

        Step1_UiInteraction.Show();
    }