MCPcopy Create free account
hub / github.com/computationalpathologygroup/ASAP / extractBaseName

Function extractBaseName

core/filetools.cpp:327–336  ·  view source on GitHub ↗

---------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

325
326//---------------------------------------------------------------------------
327 std::string extractBaseName(const std::string &name)
328 {
329 std::string s(name);
330 if (isOnlyDirectory(name)) return std::string();
331 cleanFileName(s);
332 std::string res = extractFileName(s);
333 size_t pos = res.rfind(".");
334 if (pos != std::string::npos) res.resize(pos);
335 return res;
336 }
337
338
339//---------------------------------------------------------------------------

Callers 5

changeExtensionFunction · 0.85
changeBaseNameFunction · 0.85
initializeTypeMethod · 0.85
processMethod · 0.85
onNewImageLoadedMethod · 0.85

Calls 3

isOnlyDirectoryFunction · 0.85
cleanFileNameFunction · 0.85
extractFileNameFunction · 0.85

Tested by

no test coverage detected