load distance map from a grayscale image file threshold - threshold of valid values [0.; 1.]. pixel with color less then threshold set invalid
| 148 | // load distance map from a grayscale image file |
| 149 | // threshold - threshold of valid values [0.; 1.]. pixel with color less then threshold set invalid |
| 150 | Expected<MR::DistanceMap> loadDistanceMapFromImage( const std::filesystem::path& filename, float threshold = 1.f / 255 ) |
| 151 | { |
| 152 | auto resLoad = ImageLoad::fromAnySupportedFormat( filename ); |
| 153 | if ( !resLoad.has_value() ) |
| 154 | return unexpected( resLoad.error() ); |
| 155 | return convertImageToDistanceMap( *resLoad, threshold ); |
| 156 | } |
| 157 | } |
| 158 | |
| 159 | // This stuff makes it so that `MRTest` and our other apps can use the module directly, without having to add it to `PYTHONPATH`. |
nothing calls this directly
no test coverage detected