public void Convert(ModelLayerInfo layerInfo) { var frameFactory = new FrameFactory(); var frameExporter = new FrameExporter(); string outputLayerDir = outputRootDir + @"\" + Path.GetFileName(layerInfo.Directory); Directory.CreateDirectory(outputLayerDir); string[] inputPaths = GetFilepaths(layerInfo.Directory); CheckIfVTKFormat(inputPaths[0]); foreach (string inputPath in inputPaths) { string filename = Path.GetFileNameWithoutExtension(inputPath); IFrame frame = frameFactory.Import(inputPath, layerInfo.DataType); if (scalingFactor == -1) { scalingFactor = GetScalingFactor(frame); } frame.NormalizeVectors(scalingFactor); frameExporter.ExportFrameToTxt(frame, filename, outputLayerDir); Log.Info(filename + " converted sucessfully."); } }
public void ImportData(ModelLayerInfo layerInfo, string gameObjectName) { ModelGameObject = new GameObject(gameObjectName); ModelMesh = new ModelMesh(layerInfo.DataType); GetFilepaths(layerInfo.Directory); ImportFrames(); AddMeshToGameObject(); }