| 113 | } |
| 114 | |
| 115 | std::vector<std::string> mitk::TotalSegmentatorTool::BuildArguments(const std::string& inputImagePath, |
| 116 | const std::string& outputImagePath) const |
| 117 | { |
| 118 | std::vector<std::string> args; |
| 119 | args.push_back("-i"); |
| 120 | args.push_back(inputImagePath); |
| 121 | args.push_back("-o"); |
| 122 | args.push_back(outputImagePath); |
| 123 | args.push_back("-ta"); |
| 124 | args.push_back(m_Task); |
| 125 | args.push_back("--ml"); // single multi-label output file whose ids match class_map |
| 126 | |
| 127 | switch (m_Speed) |
| 128 | { |
| 129 | case Speed::Fast: |
| 130 | args.push_back("--fast"); |
| 131 | break; |
| 132 | case Speed::Fastest: |
| 133 | args.push_back("--fastest"); |
| 134 | break; |
| 135 | case Speed::Normal: |
| 136 | break; |
| 137 | } |
| 138 | |
| 139 | args.push_back("-d"); |
| 140 | args.push_back(m_Device.empty() ? std::string("gpu") : m_Device); |
| 141 | |
| 142 | return args; |
| 143 | } |
| 144 | |
| 145 | void mitk::TotalSegmentatorTool::UpdatePrepare() |
| 146 | { |