From bb1c384c3c68bd7544a8fc71025cd38176a15e77 Mon Sep 17 00:00:00 2001
From: Plougonven Erwan <eplougonven@uliege.be>
Date: Wed, 22 May 2024 13:29:11 +0000
Subject: [PATCH] Update README.md

---
 README.md | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/README.md b/README.md
index d408a04..5431d24 100644
--- a/README.md
+++ b/README.md
@@ -58,6 +58,7 @@ The algorithm has three parts:
 3. Iteratively remove the peaks, starting from the highest. For each peak in that ordered set (starting with the one with largest gradient), check if it's still a peak, and if so, set the pixel value to the average of its neighbours. This had to be done iteratively because with high peaks, its neighbours can also be flagged as peaks, as their local gradient is influenced by the peak. The illustration below shows this in one dimension. With this iterative process, the central pixel (the real peak) is filtered, so when we next look at the neighbours, their local gradient is no longer above  `diffth`, and are therefore no touched.
 
 ![Graphs showing a peak and the gradient.](assets/diffth_example.png)
+
 *Illustration of the need for an iterative process to remove the peaks. The left graph shows pixels values in a one-dimensional image, along a line, with a high peak in the centre. The right graph shows the local gradients, while the dotted line shows the threshold `diffth`, meaning that the neighbours of the peak are also flagged as peaks.*
 
 This method is optimal in the sense that is modifies the minimum amount of pixels values (compared to a blunt filter like a median).
@@ -86,6 +87,10 @@ These functions take as inputs the field and output filename.
 
 Saves to Portable Network Graphics format. In this format, the values have to be rescaled to the range `[0;255]` and converted to unsigned 8-bit values.
 
+![PNG images of input raw data, and after processing.](assets/example_PNG_inout.png)
+
+*Data saved as PNGs with this function, before (left) and after (right) processing. The black zones in the left image are the undefined pixel regions. Also, the left image seems much darker because of the rescaling: the peaks reach much higher values, so when bringing the value range down to `[0;255]`, all the useful values are squished in the darker greylevels.*
+
 #### `save_Avizo_ASCII`
 
 Saves to an [Avizo](www.thermofisher.com/us/en/home/electron-microscopy/products/software-em-3d-vis/avizo-software.html) Ascii format. The advantage of this format is that no conversion is needed, the real values are conserved.
-- 
GitLab