Loading src/main_Generator.cpp +18 −12 Original line number Diff line number Diff line Loading @@ -59,11 +59,11 @@ int RenderMesh(const char* path,const int ID,int fileNo); int main(int argc,char **argv) { if (argc != 4 && argc != 5 && argc != 6) if (argc != 5 && argc != 6 && argc != 7) { //I'm executed with no params, provide help std::cout << "ADD SOME HEADER INFORMATION HERE\n\n"; std::cout << "params: path_to_VTKs path_to_output dataset_ID [time_point] [no_of_time_points]\n\n"; std::cout << "params: config_file path_to_VTKs path_to_output dataset_ID [time_point] [no_of_time_points]\n\n"; std::cout << "The program will try to load object files (cell body volumetric mesh and\n" "filopodia skeleton definition) iteratively (starting from 0th time point)\n" "until it fails loading cell body file. Filopodia files for the current time\n" Loading @@ -73,15 +73,21 @@ int main(int argc,char **argv) return(-1); } //process the config file if (mesh.configFile.ParseConfigFile(argv[1]) != 0) return(-2); //access the config params as, e.g. : // mesh.configFile.texture_Resolution.x return(0); //determine the first time point to start with int i=0; if (argc >= 5) i=atoi(argv[4]); if (argc >= 6) i=atoi(argv[5]); int framesToGoHome=999999999; if (argc == 6) framesToGoHome=atoi(argv[5]); if (argc == 7) framesToGoHome=atoi(argv[6]); //get dataset ID int ID=atoi(argv[3]); int ID=atoi(argv[4]); //I'm called as generator/simulator, init the situation... ParamsSetup(); Loading @@ -92,7 +98,7 @@ int main(int argc,char **argv) int fframesToGoHome(framesToGoHome); //how many indices to read Vector3F minBB,maxBB; //bounding box corners while ((fframesToGoHome > 0) && LoadNewMesh(argv[1],ID,ii)) while ((fframesToGoHome > 0) && LoadNewMesh(argv[2],ID,ii)) { std::cout << "mesh: #" << ii << "\n"; std::cout << "vertices #: " << mesh.Pos.size() << "\n"; Loading Loading @@ -141,18 +147,18 @@ int main(int argc,char **argv) << maxBB.x << "," << maxBB.y << "," << maxBB.z << "] in microns\n"; std::cout << "SECOND RUN: reading all meshes to conduct the texture simulation and rendering.\n"; while ((framesToGoHome > 0) && LoadNewMesh(argv[1],ID,i,true)) while ((framesToGoHome > 0) && LoadNewMesh(argv[2],ID,i,true)) { RenderMesh(argv[2],ID,i); RenderMesh(argv[3],ID,i); ++i; --framesToGoHome; } //report the tip trajectories char fileName[1024]; sprintf(fileName,"%s/ID%d_afterTM/tip_trajectories_pxOffsets.txt",argv[2],ID); sprintf(fileName,"%s/ID%d_afterTM/tip_trajectories_pxOffsets.txt",argv[3],ID); std::ofstream oFile(fileName); sprintf(fileName,"%s/ID%d_afterTM/tip_trajectories_umCoords.txt",argv[2],ID); sprintf(fileName,"%s/ID%d_afterTM/tip_trajectories_umCoords.txt",argv[3],ID); std::ofstream cFile(fileName); std::map<int,timeVector>::const_iterator tipIter=tipOffsets.begin(); Loading @@ -175,9 +181,9 @@ int main(int argc,char **argv) cFile.close(); //report the cell centre coordinates sprintf(fileName,"%s/ID%d_afterTM/centre_trajectories_pxOffsets.txt",argv[2],ID); sprintf(fileName,"%s/ID%d_afterTM/centre_trajectories_pxOffsets.txt",argv[3],ID); std::ofstream OFile(fileName); sprintf(fileName,"%s/ID%d_afterTM/centre_trajectories_umCoords.txt",argv[2],ID); sprintf(fileName,"%s/ID%d_afterTM/centre_trajectories_umCoords.txt",argv[3],ID); std::ofstream CFile(fileName); OFile << "1:"; Loading Loading
src/main_Generator.cpp +18 −12 Original line number Diff line number Diff line Loading @@ -59,11 +59,11 @@ int RenderMesh(const char* path,const int ID,int fileNo); int main(int argc,char **argv) { if (argc != 4 && argc != 5 && argc != 6) if (argc != 5 && argc != 6 && argc != 7) { //I'm executed with no params, provide help std::cout << "ADD SOME HEADER INFORMATION HERE\n\n"; std::cout << "params: path_to_VTKs path_to_output dataset_ID [time_point] [no_of_time_points]\n\n"; std::cout << "params: config_file path_to_VTKs path_to_output dataset_ID [time_point] [no_of_time_points]\n\n"; std::cout << "The program will try to load object files (cell body volumetric mesh and\n" "filopodia skeleton definition) iteratively (starting from 0th time point)\n" "until it fails loading cell body file. Filopodia files for the current time\n" Loading @@ -73,15 +73,21 @@ int main(int argc,char **argv) return(-1); } //process the config file if (mesh.configFile.ParseConfigFile(argv[1]) != 0) return(-2); //access the config params as, e.g. : // mesh.configFile.texture_Resolution.x return(0); //determine the first time point to start with int i=0; if (argc >= 5) i=atoi(argv[4]); if (argc >= 6) i=atoi(argv[5]); int framesToGoHome=999999999; if (argc == 6) framesToGoHome=atoi(argv[5]); if (argc == 7) framesToGoHome=atoi(argv[6]); //get dataset ID int ID=atoi(argv[3]); int ID=atoi(argv[4]); //I'm called as generator/simulator, init the situation... ParamsSetup(); Loading @@ -92,7 +98,7 @@ int main(int argc,char **argv) int fframesToGoHome(framesToGoHome); //how many indices to read Vector3F minBB,maxBB; //bounding box corners while ((fframesToGoHome > 0) && LoadNewMesh(argv[1],ID,ii)) while ((fframesToGoHome > 0) && LoadNewMesh(argv[2],ID,ii)) { std::cout << "mesh: #" << ii << "\n"; std::cout << "vertices #: " << mesh.Pos.size() << "\n"; Loading Loading @@ -141,18 +147,18 @@ int main(int argc,char **argv) << maxBB.x << "," << maxBB.y << "," << maxBB.z << "] in microns\n"; std::cout << "SECOND RUN: reading all meshes to conduct the texture simulation and rendering.\n"; while ((framesToGoHome > 0) && LoadNewMesh(argv[1],ID,i,true)) while ((framesToGoHome > 0) && LoadNewMesh(argv[2],ID,i,true)) { RenderMesh(argv[2],ID,i); RenderMesh(argv[3],ID,i); ++i; --framesToGoHome; } //report the tip trajectories char fileName[1024]; sprintf(fileName,"%s/ID%d_afterTM/tip_trajectories_pxOffsets.txt",argv[2],ID); sprintf(fileName,"%s/ID%d_afterTM/tip_trajectories_pxOffsets.txt",argv[3],ID); std::ofstream oFile(fileName); sprintf(fileName,"%s/ID%d_afterTM/tip_trajectories_umCoords.txt",argv[2],ID); sprintf(fileName,"%s/ID%d_afterTM/tip_trajectories_umCoords.txt",argv[3],ID); std::ofstream cFile(fileName); std::map<int,timeVector>::const_iterator tipIter=tipOffsets.begin(); Loading @@ -175,9 +181,9 @@ int main(int argc,char **argv) cFile.close(); //report the cell centre coordinates sprintf(fileName,"%s/ID%d_afterTM/centre_trajectories_pxOffsets.txt",argv[2],ID); sprintf(fileName,"%s/ID%d_afterTM/centre_trajectories_pxOffsets.txt",argv[3],ID); std::ofstream OFile(fileName); sprintf(fileName,"%s/ID%d_afterTM/centre_trajectories_umCoords.txt",argv[2],ID); sprintf(fileName,"%s/ID%d_afterTM/centre_trajectories_umCoords.txt",argv[3],ID); std::ofstream CFile(fileName); OFile << "1:"; Loading