Loading src/main_Generator.cpp +23 −0 Original line number Diff line number Diff line Loading @@ -657,8 +657,31 @@ int RenderMesh(const char* path,const std::map<std::string, float>& pruning,cons centreOffsets[(unsigned)fileNo]=(int)mask.GetIndex(x,y,z); //save the mask image, finally (might have some pixels removed) //NB: if there is prunning[""] == 0.0 then this saving is redundant... mask.SaveImage(fileName); //start processing the prunnings... std::map<std::string, float>::const_iterator pruningIter = pruning.begin(); while (pruningIter != pruning.end()) { //over all tips/filopodia: //check their lengths and wipe them out if necessary tipIter=tipOffsets.begin(); while (tipIter != tipOffsets.end()) { if (tipLengths[tipIter->first].at((unsigned)fileNo) < pruningIter->second) RemoveFromMask(mask, (i3d::GRAY16)tipIter->first); ++tipIter; } //save the "updated" mask std::cout << "exporting mask #" << fileNo << "\n"; sprintf(fileName,"%s/ID%d_afterTM/mask_t%03d%s.tif",path,ID,fileNo,pruningIter->first.c_str()); mask.SaveImage(fileName); ++pruningIter; } return(0); } Loading Loading
src/main_Generator.cpp +23 −0 Original line number Diff line number Diff line Loading @@ -657,8 +657,31 @@ int RenderMesh(const char* path,const std::map<std::string, float>& pruning,cons centreOffsets[(unsigned)fileNo]=(int)mask.GetIndex(x,y,z); //save the mask image, finally (might have some pixels removed) //NB: if there is prunning[""] == 0.0 then this saving is redundant... mask.SaveImage(fileName); //start processing the prunnings... std::map<std::string, float>::const_iterator pruningIter = pruning.begin(); while (pruningIter != pruning.end()) { //over all tips/filopodia: //check their lengths and wipe them out if necessary tipIter=tipOffsets.begin(); while (tipIter != tipOffsets.end()) { if (tipLengths[tipIter->first].at((unsigned)fileNo) < pruningIter->second) RemoveFromMask(mask, (i3d::GRAY16)tipIter->first); ++tipIter; } //save the "updated" mask std::cout << "exporting mask #" << fileNo << "\n"; sprintf(fileName,"%s/ID%d_afterTM/mask_t%03d%s.tif",path,ID,fileNo,pruningIter->first.c_str()); mask.SaveImage(fileName); ++pruningIter; } return(0); } Loading