Commit 7603ef8d authored by Thomas Manni's avatar Thomas Manni
Browse files

slic: add progress reporting

parent e319aaa3
Pipeline #398255 passed with stages
in 4 minutes and 29 seconds
......@@ -387,6 +387,8 @@ process (GeglOperation *operation,
gint n_iterations;
gint i;
gegl_operation_progress (operation, 0.0, "");
labels = gegl_buffer_new (src_region, babl_format_n (babl_type ("u32"), 1));
/* restrict cluster size to the maximum buffer dimension */
......@@ -412,12 +414,18 @@ process (GeglOperation *operation,
format);
update_clusters (clusters, cluster_size);
gegl_operation_progress (operation,
(gdouble) (i+0.5) / n_iterations,
"");
}
/* apply clusters colors to output */
set_output (output, labels, clusters, format);
gegl_operation_progress (operation, 1.0, "");
g_object_unref (labels);
g_array_free (clusters, TRUE);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment