Loading src/TriangleMesh.cpp +24 −14 Original line number Original line Diff line number Diff line Loading @@ -930,7 +930,9 @@ int ActiveMesh::ImportVTK_Ftree(const char *filename,unsigned int idx, //now widen added skeleton(s) and save triangles... //now widen added skeleton(s) and save triangles... for (unsigned int idxx=0; idxx < populatedIndices.size(); ++idxx) for (unsigned int idxx=0; idxx < populatedIndices.size(); ++idxx) if (populatedIndices[idxx] && calcFiloLength(idxx) >= this->configFile.filoMinLength) if (populatedIndices[idxx]) { if (calcFiloLength(idxx) >= this->configFile.filoMinLength) PopulateSurfTriangles_Ftree(idxx,true); PopulateSurfTriangles_Ftree(idxx,true); //NB: change to false to have meshes starting from the current skeleton first vertex //NB: change to false to have meshes starting from the current skeleton first vertex // // Loading @@ -939,6 +941,9 @@ int ActiveMesh::ImportVTK_Ftree(const char *filename,unsigned int idx, //since it is not rendered, its tip will not be visible and any GT non-image data //since it is not rendered, its tip will not be visible and any GT non-image data //regarding this filopodium will be removed (at some later stage of the TM, at //regarding this filopodium will be removed (at some later stage of the TM, at //the place where consistency is checked) //the place where consistency is checked) else std::cout << "WARN: NOT CREATING SURFACE MESH for filopodium ID " << idx << "\n"; } return(0); return(0); } } Loading Loading @@ -1249,7 +1254,7 @@ void ActiveMesh::RenderMask_filo(i3d::Image3d<i3d::GRAY16>& mask,const unsigned //report problem if necessary (when mask value is not zero) //report problem if necessary (when mask value is not zero) if (origMaskVal > 0) if (origMaskVal > 0) std::cout << "POSSIBLE COLLISION DETECTED" std::cout << "WARN: POSSIBLE COLLISION DETECTED" << " of the tip of filopodium ID " << color << " of the tip of filopodium ID " << color << " bumping into filopodium ID " << origMaskVal << "\n"; << " bumping into filopodium ID " << origMaskVal << "\n"; } } Loading @@ -1261,6 +1266,11 @@ void ActiveMesh::RenderMask_filo(i3d::Image3d<i3d::GRAY16>& mask,const unsigned //over all triangles of the given filopodia //over all triangles of the given filopodia const mesh_t& filoMesh=Ftree[idx]; const mesh_t& filoMesh=Ftree[idx]; //a word of warning for the user if (filoMesh.ID.size() == 0) std::cout << "WARN: NOT RENDERING filopodium ID " << idx << "\n"; for (unsigned int i=0; i < filoMesh.ID.size()/3; ++i) for (unsigned int i=0; i < filoMesh.ID.size()/3; ++i) { { const Vector3F& v1=filoMesh.Pos[filoMesh.ID[3*i+0]]; const Vector3F& v1=filoMesh.Pos[filoMesh.ID[3*i+0]]; Loading Loading @@ -2262,7 +2272,7 @@ void ActiveMesh::ConstructFF_T(FlowField<float> &FF) } } } } if (issueCounter) if (issueCounter) std::cout << "ConstructFF_T(): " << issueCounter << " HOLES LEFT IN THE FF.\n"; std::cout << "WARN: ConstructFF_T(): " << issueCounter << " HOLES LEFT IN THE FF.\n"; //a bit more of fine-tunning: //a bit more of fine-tunning: // "extrude" 2px wide outer/added boundary by smoothing edge values // "extrude" 2px wide outer/added boundary by smoothing edge values Loading Loading @@ -2299,7 +2309,7 @@ void ActiveMesh::configDataSubClass::getValueOrDefault(const char* key,const std std::map<std::string,std::string>::const_iterator it = keyVal_map.find(sKey); std::map<std::string,std::string>::const_iterator it = keyVal_map.find(sKey); if (it == keyVal_map.end()) if (it == keyVal_map.end()) { { std::cout << "INCOMPLETE CONFIG FILE, add the following line to your config file:\n"; std::cout << "WARN: INCOMPLETE CONFIG FILE, add the following line to your config file:\n"; std::cout << key << " " << defValue << "\n"; std::cout << key << " " << defValue << "\n"; var = defValue; var = defValue; } } Loading @@ -2313,7 +2323,7 @@ void ActiveMesh::configDataSubClass::getValueOrDefault(const char* key,const int std::map<std::string,std::string>::const_iterator it = keyVal_map.find(sKey); std::map<std::string,std::string>::const_iterator it = keyVal_map.find(sKey); if (it == keyVal_map.end()) if (it == keyVal_map.end()) { { std::cout << "INCOMPLETE CONFIG FILE, add the following line to your config file:\n"; std::cout << "WARN: INCOMPLETE CONFIG FILE, add the following line to your config file:\n"; std::cout << key << " " << defValue << "\n"; std::cout << key << " " << defValue << "\n"; var = defValue; var = defValue; } } Loading @@ -2327,7 +2337,7 @@ void ActiveMesh::configDataSubClass::getValueOrDefault(const char* key,const flo std::map<std::string,std::string>::const_iterator it = keyVal_map.find(sKey); std::map<std::string,std::string>::const_iterator it = keyVal_map.find(sKey); if (it == keyVal_map.end()) if (it == keyVal_map.end()) { { std::cout << "INCOMPLETE CONFIG FILE, add the following line to your config file:\n"; std::cout << "WARN: INCOMPLETE CONFIG FILE, add the following line to your config file:\n"; std::cout << key << " " << defValue << "\n"; std::cout << key << " " << defValue << "\n"; var = defValue; var = defValue; } } Loading Loading
src/TriangleMesh.cpp +24 −14 Original line number Original line Diff line number Diff line Loading @@ -930,7 +930,9 @@ int ActiveMesh::ImportVTK_Ftree(const char *filename,unsigned int idx, //now widen added skeleton(s) and save triangles... //now widen added skeleton(s) and save triangles... for (unsigned int idxx=0; idxx < populatedIndices.size(); ++idxx) for (unsigned int idxx=0; idxx < populatedIndices.size(); ++idxx) if (populatedIndices[idxx] && calcFiloLength(idxx) >= this->configFile.filoMinLength) if (populatedIndices[idxx]) { if (calcFiloLength(idxx) >= this->configFile.filoMinLength) PopulateSurfTriangles_Ftree(idxx,true); PopulateSurfTriangles_Ftree(idxx,true); //NB: change to false to have meshes starting from the current skeleton first vertex //NB: change to false to have meshes starting from the current skeleton first vertex // // Loading @@ -939,6 +941,9 @@ int ActiveMesh::ImportVTK_Ftree(const char *filename,unsigned int idx, //since it is not rendered, its tip will not be visible and any GT non-image data //since it is not rendered, its tip will not be visible and any GT non-image data //regarding this filopodium will be removed (at some later stage of the TM, at //regarding this filopodium will be removed (at some later stage of the TM, at //the place where consistency is checked) //the place where consistency is checked) else std::cout << "WARN: NOT CREATING SURFACE MESH for filopodium ID " << idx << "\n"; } return(0); return(0); } } Loading Loading @@ -1249,7 +1254,7 @@ void ActiveMesh::RenderMask_filo(i3d::Image3d<i3d::GRAY16>& mask,const unsigned //report problem if necessary (when mask value is not zero) //report problem if necessary (when mask value is not zero) if (origMaskVal > 0) if (origMaskVal > 0) std::cout << "POSSIBLE COLLISION DETECTED" std::cout << "WARN: POSSIBLE COLLISION DETECTED" << " of the tip of filopodium ID " << color << " of the tip of filopodium ID " << color << " bumping into filopodium ID " << origMaskVal << "\n"; << " bumping into filopodium ID " << origMaskVal << "\n"; } } Loading @@ -1261,6 +1266,11 @@ void ActiveMesh::RenderMask_filo(i3d::Image3d<i3d::GRAY16>& mask,const unsigned //over all triangles of the given filopodia //over all triangles of the given filopodia const mesh_t& filoMesh=Ftree[idx]; const mesh_t& filoMesh=Ftree[idx]; //a word of warning for the user if (filoMesh.ID.size() == 0) std::cout << "WARN: NOT RENDERING filopodium ID " << idx << "\n"; for (unsigned int i=0; i < filoMesh.ID.size()/3; ++i) for (unsigned int i=0; i < filoMesh.ID.size()/3; ++i) { { const Vector3F& v1=filoMesh.Pos[filoMesh.ID[3*i+0]]; const Vector3F& v1=filoMesh.Pos[filoMesh.ID[3*i+0]]; Loading Loading @@ -2262,7 +2272,7 @@ void ActiveMesh::ConstructFF_T(FlowField<float> &FF) } } } } if (issueCounter) if (issueCounter) std::cout << "ConstructFF_T(): " << issueCounter << " HOLES LEFT IN THE FF.\n"; std::cout << "WARN: ConstructFF_T(): " << issueCounter << " HOLES LEFT IN THE FF.\n"; //a bit more of fine-tunning: //a bit more of fine-tunning: // "extrude" 2px wide outer/added boundary by smoothing edge values // "extrude" 2px wide outer/added boundary by smoothing edge values Loading Loading @@ -2299,7 +2309,7 @@ void ActiveMesh::configDataSubClass::getValueOrDefault(const char* key,const std std::map<std::string,std::string>::const_iterator it = keyVal_map.find(sKey); std::map<std::string,std::string>::const_iterator it = keyVal_map.find(sKey); if (it == keyVal_map.end()) if (it == keyVal_map.end()) { { std::cout << "INCOMPLETE CONFIG FILE, add the following line to your config file:\n"; std::cout << "WARN: INCOMPLETE CONFIG FILE, add the following line to your config file:\n"; std::cout << key << " " << defValue << "\n"; std::cout << key << " " << defValue << "\n"; var = defValue; var = defValue; } } Loading @@ -2313,7 +2323,7 @@ void ActiveMesh::configDataSubClass::getValueOrDefault(const char* key,const int std::map<std::string,std::string>::const_iterator it = keyVal_map.find(sKey); std::map<std::string,std::string>::const_iterator it = keyVal_map.find(sKey); if (it == keyVal_map.end()) if (it == keyVal_map.end()) { { std::cout << "INCOMPLETE CONFIG FILE, add the following line to your config file:\n"; std::cout << "WARN: INCOMPLETE CONFIG FILE, add the following line to your config file:\n"; std::cout << key << " " << defValue << "\n"; std::cout << key << " " << defValue << "\n"; var = defValue; var = defValue; } } Loading @@ -2327,7 +2337,7 @@ void ActiveMesh::configDataSubClass::getValueOrDefault(const char* key,const flo std::map<std::string,std::string>::const_iterator it = keyVal_map.find(sKey); std::map<std::string,std::string>::const_iterator it = keyVal_map.find(sKey); if (it == keyVal_map.end()) if (it == keyVal_map.end()) { { std::cout << "INCOMPLETE CONFIG FILE, add the following line to your config file:\n"; std::cout << "WARN: INCOMPLETE CONFIG FILE, add the following line to your config file:\n"; std::cout << key << " " << defValue << "\n"; std::cout << key << " " << defValue << "\n"; var = defValue; var = defValue; } } Loading