MCPcopy Create free account
hub / github.com/MITK/MITK / ResolvePath

Method ResolvePath

Modules/Segmentation/autoload/IO/mitkSegmentationTaskListIO.cpp:362–384  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

360}
361
362fs::path mitk::SegmentationTaskListIO::ResolvePath(const fs::path& path) const
363{
364 if (path.is_relative())
365 {
366 auto inputLocation = this->GetInputLocation();
367
368 /* If we have access to properties, we are reading from an MITK scene
369 * file. In this case, paths are still relative to the original input
370 * location, which is preserved in the properties.
371 */
372
373 const auto* properties = this->GetProperties();
374
375 if (properties != nullptr)
376 properties->GetStringProperty("MITK.IO.reader.inputlocation", inputLocation);
377
378 return fs::path(inputLocation).remove_filename() / path;
379 }
380 else
381 {
382 return path;
383 }
384}
385
386mitk::SegmentationTaskListIO* mitk::SegmentationTaskListIO::IOClone() const
387{

Callers 1

DoReadMethod · 0.95

Calls 3

GetInputLocationMethod · 0.80
GetPropertiesMethod · 0.45
GetStringPropertyMethod · 0.45

Tested by

no test coverage detected