[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[task #15762] Optional contour functionality to EPS/PDF output
From: |
Mohammad Akhlaghi |
Subject: |
[task #15762] Optional contour functionality to EPS/PDF output |
Date: |
Tue, 25 Aug 2020 10:50:45 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:80.0) Gecko/20100101 Firefox/80.0 |
URL:
<https://savannah.gnu.org/task/?15762>
Summary: Optional contour functionality to EPS/PDF output
Project: GNU Astronomy Utilities
Submitted by: makhlaghi
Submitted on: Tue 25 Aug 2020 03:50:43 PM BST
Should Start On: Tue 25 Aug 2020 12:00:00 AM BST
Should be Finished on: Tue 25 Aug 2020 12:00:00 AM BST
Category: ConvertType
Priority: 5 - Normal
Item Group: Enhancement
Status: None
Privacy: Public
Percent Complete: 0%
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
Effort: 0.00
_______________________________________________________
Details:
When dealing with various science cases, contours are an important
visualization tool that are useful in many context.
To generate PDF outputs, ConvertType uses PostScript (which is then compiled
into PDF). And in PostScript, it is very easy to draw lines, for example see
this tutorial <http://paulbourke.net/dataformats/postscript/> (also in the
full PostScript reference
<https://www.adobe.com/content/dam/acom/en/devnet/actionscript/articles/PLRM.pdf>).
The points/pixel along each contour line are also very easy to derive (a
simple erosion on a given threshold will find the pixels of the edges: those
that have been eroded)!
So if we just convert the pixel coordinates into the PostScript coordinates,
we can easily draw contours over the PDF output of ConvertType. The user can
either specify the number of contours in the full range of the input, or give
specific values. The interface would be something like this (also possible on
a multi-color-channel image):
# Draw five contours over the image A.
astconvertt A.fits --contourfile=A.fits --contournumber=5
# Put 3 contours at levels X, Y and Z, defined over the 'G.fits'
# image, but drawn over an RGB/color image.
astconvertt R.fits G.fits B.fits --contourfile=G.fits --contourlevels=X,Y,Z
The contours can also be drawn from a different image, for example the command
below can generate contours from
# Define contours on B.fits, but draw them on A.fits
astconvertt A.fits --contourfile=B.fits --contourlevels=X,Y,Z
The only limitation is that all three images have to have the same
height/width.
This task was suggested after a discussion with Peter MacGregor, thanks Pete
;-).
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/task/?15762>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [task #15762] Optional contour functionality to EPS/PDF output,
Mohammad Akhlaghi <=