Commit c8f022ea authored by Vladimír Ulman's avatar Vladimír Ulman
Browse files

ISBI_Generator, decent adjustment in the output path and filenames...

parent 1fd1e2c1
Loading
Loading
Loading
Loading
+11 −11
Original line number Diff line number Diff line
@@ -22,7 +22,7 @@ ActiveMesh mesh;
std::vector< std::vector<int> > tipOffsets;

bool LoadNewMesh(const char* path,const int ID,const int fileNo);
int  RenderMesh(const char* path,int fileNo);
int  RenderMesh(const char* path,const int ID,int fileNo);

int main(int argc,char **argv)
{
@@ -42,7 +42,7 @@ int main(int argc,char **argv)

	//determine the first time point to start with
	int i=0;
	if (argc == 5) i=atoi(argv[4]);
	if (argc >= 5) i=atoi(argv[4]);

	int framesToGoHome=999999999;
	if (argc == 6) framesToGoHome=atoi(argv[5]);
@@ -79,7 +79,7 @@ int main(int argc,char **argv)
			std::cout << f << ": normals   #: " << mesh.Ftree[f].norm.size() << "\n";
		}

		RenderMesh(argv[2],i);
		RenderMesh(argv[2],ID,i);
		++i;
		--framesToGoHome;
	}
@@ -209,7 +209,7 @@ bool LoadNewMesh(const char* path,const int ID,const int fileNo)

#define DO_PHASE_II_AND_III
#define DO_ANISOTROPIC_OUTPUT
int RenderMesh(const char* path,int fileNo)
int RenderMesh(const char* path,const int ID,int fileNo)
{
	//setup isotropic(!) image for mask-output of the simulated cell
	i3d::Image3d<i3d::GRAY16> mask;
@@ -231,7 +231,7 @@ int RenderMesh(const char* path,int fileNo)

	std::cout << "exporting isotropic mask #" << fileNo << "\n";
	char fileName[1024];
	sprintf(fileName,"%s/ISOmask_t%03d.tif",path,fileNo);
	sprintf(fileName,"%s/ID%d_afterTM/ISOmask_t%03d.tif",path,ID,fileNo);
	mask.SaveImage(fileName);

	//updates the texture fl. points
@@ -284,11 +284,11 @@ int RenderMesh(const char* path,int fileNo)
/*
		//uncomment if you want to see the FF for the cell body
		char n[1024];
		sprintf(n,"%s/new_vx_%03d.ics",path,fileNo);
		sprintf(n,"%s/ID%d_afterTM/new_vx_%03d.ics",path,ID,fileNo);
		FF.x->SaveImage(n);
		sprintf(n,"%s/new_vy_%03d.ics",path,fileNo);
		sprintf(n,"%s/ID%d_afterTM/new_vy_%03d.ics",path,ID,fileNo);
		FF.y->SaveImage(n);
		sprintf(n,"%s/new_vz_%03d.ics",path,fileNo);
		sprintf(n,"%s/ID%d_afterTM/new_vz_%03d.ics",path,ID,fileNo);
		FF.z->SaveImage(n);
*/

@@ -316,7 +316,7 @@ int RenderMesh(const char* path,int fileNo)
	//i3d::Image3d<i3d::GRAY16> texture;
	//mesh.RenderOneTimeTexture(mask,texture);

	sprintf(fileName,"%s/phantom_t%03d.tif",path,fileNo);
	sprintf(fileName,"%s/ID%d_afterTM/phantom_t%03d.tif",path,ID,fileNo);
	texture.SaveImage(fileName);

#ifdef DO_PHASE_II_AND_III
@@ -341,12 +341,12 @@ int RenderMesh(const char* path,int fileNo)

	//save the texture and that's it for texture image
	std::cout << "exporting texture #" << fileNo << "\n";
	sprintf(fileName,"%s/texture_t%03d.tif",path,fileNo);
	sprintf(fileName,"%s/ID%d_afterTM/texture_t%03d.tif",path,ID,fileNo);
	texture.SaveImage(fileName);


	std::cout << "exporting mask #" << fileNo << "\n";
	sprintf(fileName,"%s/mask_t%03d.tif",path,fileNo);
	sprintf(fileName,"%s/ID%d_afterTM/mask_t%03d.tif",path,ID,fileNo);
#ifdef DO_PHASE_II_AND_III
 #ifdef DO_ANISOTROPIC_OUTPUT
	//re-render (!, instead of resampling) also the mask before exporting