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

FIX: improved comments and removed obsoleted ones in function ActiveMesh::InitDots_filo()

parent bafde34d
Loading
Loading
Loading
Loading
+5 −14
Original line number Original line Diff line number Diff line
@@ -1538,7 +1538,6 @@ void ActiveMesh::InitDots_filo(const i3d::Image3d<i3d::GRAY16>& mask,const unsig
   // get the resolution of image
   // get the resolution of image
	i3d::Vector3d<float> res = mask.GetResolution().GetRes();
	i3d::Vector3d<float> res = mask.GetResolution().GetRes();
	float max_res = std::max(res.x, std::max(res.y, res.z)); // ... pixels/micron
	float max_res = std::max(res.x, std::max(res.y, res.z)); // ... pixels/micron
	// OBSOLETE: const int density = 10; // ... how may dots should be pressed between two neighbouring pixel positions
	
	
	//syntactic short-cut to the proper filopodium geometry data
	//syntactic short-cut to the proper filopodium geometry data
	mesh_t& filoMesh=Ftree[idx];
	mesh_t& filoMesh=Ftree[idx];
@@ -1553,13 +1552,9 @@ void ActiveMesh::InitDots_filo(const i3d::Image3d<i3d::GRAY16>& mask,const unsig


		const float length=(tP-fP).Len(); // segment length in microns
		const float length=(tP-fP).Len(); // segment length in microns


		// discrete stepping
		// discrete stepping, in fact: how many steps there will be for this particular one segment
		const int S = (int) ceil(length * max_res * (this->configFile.filoAxisOrientedDensity));
		const int S = (int) ceil(length * max_res * (this->configFile.filoAxisOrientedDensity));


		/// OBSOLETE - with magic factor
		//stepping along the axis 
		// const int S=(int)ceil(5.f*length/0.005); //"fraction factor"

		for (int s=0; s < S; ++s)
		for (int s=0; s < S; ++s)
		{
		{
			//ratios "from" and "to"
			//ratios "from" and "to"
@@ -1576,14 +1571,10 @@ void ActiveMesh::InitDots_filo(const i3d::Image3d<i3d::GRAY16>& mask,const unsig
			Vector3F p =fS*fP;
			Vector3F p =fS*fP;
			         p+=tS*tP;
			         p+=tS*tP;


			// OBSOLETE - magic factor
			// The number of dots should correspond the width (radius) of filopodium
			//insert fl. dots
			// multiplied by given density. The density should be a large number, as the
//			float dotsCount=400000.f*r;
			// radius is typically very small, to obtain many dots overhere.

			// Also, the number of dotsCount here is cca 5-times downscaled to the very final count.
			// the number of dots should correspond the width (radius) of filopodium
			// multiplied by given density. The density should be a large number as the
			// radius is typically very small
			// OBSOLETE: const int dotDensity = 15;
		   float dotsCount = (this->configFile.filoContourOrientedDensity) * r;
		   float dotsCount = (this->configFile.filoContourOrientedDensity) * r;


			// prevent data overflow (5 - multiplicity of addition)
			// prevent data overflow (5 - multiplicity of addition)