gnuastro-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnuastro-commits] master 074e63e: Updated NEWS file, minor correction i


From: Mohammad Akhlaghi
Subject: [gnuastro-commits] master 074e63e: Updated NEWS file, minor correction in book's code example
Date: Thu, 19 Apr 2018 06:25:35 -0400 (EDT)

branch: master
commit 074e63eb56740b072962852808e9dedfec2e4f49
Author: Mohammad Akhlaghi <address@hidden>
Commit: Mohammad Akhlaghi <address@hidden>

    Updated NEWS file, minor correction in book's code example
    
    In the previous commit, the NEWS file wasn't updated, so the new `erode'
    and `dilate' operators of Arithmetic are now mentioned there too. Their
    description was also slightly modified to be more clear.
    
    Also, while flipping through the book, I noticed that one of the code
    example lines in the library demos was a little too long (and pushing out
    of the page). This has also been corrected.
---
 NEWS              |  4 +++-
 doc/gnuastro.texi | 43 ++++++++++++++++++++++++-------------------
 2 files changed, 27 insertions(+), 20 deletions(-)

diff --git a/NEWS b/NEWS
index f0014f8..beffdd6 100644
--- a/NEWS
+++ b/NEWS
@@ -16,9 +16,11 @@ GNU Astronomy Utilities NEWS                          -*- 
outline -*-
       in charge of detection.
 
   Arithmetic:
-    - connected-components: label the connected elements of the input.
+    - erode: Erode the foreground of a binary dataset.
+    - dilate: Dilate the foreground of a binary dataset.
     - filter-sigclip-mean: sigma-clipped, mean filter operator.
     - filter-sigclip-median: sigma-clipped, median filter operator.
+    - connected-components: label the connected elements of the input.
     - invert: subtract the maximum of unsigned types (absorption to emission).
 
   ConvertType:
diff --git a/doc/gnuastro.texi b/doc/gnuastro.texi
index 1ecf14a..8476790 100644
--- a/doc/gnuastro.texi
+++ b/doc/gnuastro.texi
@@ -10162,6 +10162,28 @@ dataset. This operator and its necessary operands are 
almost identical to
 median value (which is less affected by outliers than the mean) is added
 back to the stack.
 
address@hidden erode
address@hidden Erosion
+Erode the foreground pixels (with value @code{1}) of the input dataset
+(second popped operand). The first popped operand is the connectivity (see
+description in @command{connected-components}). Erosion is simply a
+flipping of all foreground pixels (to background; with value @code{0}) that
+are ``touching'' background pixels. ``Touching'' is defined by the
+connectivity. In effect, this carves off the outer borders of the
+foreground, making them thinner. This operator assumes a binary dataset
+(all pixels are @code{0} and @code{1}).
+
address@hidden dilate
address@hidden Dilation
+Dilate the foreground pixels (with value @code{1}) of the input dataset
+(second popped operand). The first popped operand is the connectivity (see
+description in @command{connected-components}). Erosion is simply a
+flipping of all background pixels (with value @code{0}) to foreground that
+are ``touching'' foreground pixels. ``Touching'' is defined by the
+connectivity. In effect, this expands the outer borders of the
+foreground. This operator assumes a binary dataset (all pixels are @code{0}
+and @code{1}).
+
 @item connected-components
 @cindex Connected components
 Find the connected components in the input dataset (second popped
@@ -10193,24 +10215,6 @@ If your input dataset doesn't have a binary type, but 
you know all its
 values are 0 or 1, you can use the @code{uint8} operator (below) to convert
 it to binary.
 
address@hidden erode
address@hidden Erosion
-Erode the foreground (non-zero) pixels of the input dataset (second popped
-operand). The first popped operand is the connectivity (see description in
address@hidden). Erosion is simply a flipping of all
-foreground pixels (to background) that are ``touching'' background
-pixels. ``Touching'' is defined by the connectivity. In effect, this carves
-off the outer borders of the foreground.
-
address@hidden dilate
address@hidden Dilation
-Dilate the foreground (non-zero) pixels of the input dataset (second popped
-operand). The first popped operand is the connectivity (see description in
address@hidden). Erosion is simply a flipping of all
-background pixels (to foreground) that are ``touching'' foreground
-pixels. ``Touching'' is defined by the connectivity. In effect, this
-expands the outer borders of the foreground.
-
 @item invert
 Invert an unsigned integer dataset. This is the only operator that ignores
 blank values (which are set to be the maximum values in the unsigned
@@ -25734,7 +25738,8 @@ main(void)
   /* Read the image into memory as a float32 data type. We are using
    * `-1' for `minmapsize' to ensure that the image is read into
    * memory. */
-  p.image=gal_fits_img_read_to_type(filename, hdu, GAL_TYPE_FLOAT32, -1);
+  p.image=gal_fits_img_read_to_type(filename, hdu, GAL_TYPE_FLOAT32,
+                                    -1);
 
 
   /* Print some basic information before the actual contents: */



reply via email to

[Prev in Thread] Current Thread [Next in Thread]