| 272 | // --------------------------------------------------------------------------- |
| 273 | |
| 274 | Image::Pointer LoadImage(const std::string& path) |
| 275 | { |
| 276 | Image::Pointer img; |
| 277 | |
| 278 | { |
| 279 | py::gil_scoped_release release; |
| 280 | img = mitk::IOUtil::Load<Image>(path); |
| 281 | } |
| 282 | |
| 283 | if (img.IsNull()) |
| 284 | throw py::value_error("Could not load Image from: " + path); |
| 285 | |
| 286 | return img; |
| 287 | } |
| 288 | |
| 289 | void SaveImage(const Image* img, const std::string& path) |
| 290 | { |