Skip to content
Snippets Groups Projects
Commit bb1c384c authored by Plougonven Erwan's avatar Plougonven Erwan
Browse files

Update README.md

parent 76728fdd
No related branches found
No related tags found
No related merge requests found
...@@ -58,6 +58,7 @@ The algorithm has three parts: ...@@ -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. 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) ![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.* *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). 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. ...@@ -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. 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` #### `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. 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.
......
  • Ruby Guy @ruby05guy ·

    Your README is shaping up to be both informative and visually engaging! ProsperidadSocial

    Edited by Ruby Guy
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment