[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #61967] DS9 polygon region files not read when width and color are
From: |
Mohammad Akhlaghi |
Subject: |
[bug #61967] DS9 polygon region files not read when width and color are set |
Date: |
Mon, 31 Jan 2022 19:32:03 -0500 (EST) |
URL:
<https://savannah.gnu.org/bugs/?61967>
Summary: DS9 polygon region files not read when width and
color are set
Project: GNU Astronomy Utilities
Submitted by: makhlaghi
Submitted on: Tue 01 Feb 2022 12:32:01 AM UTC
Category: Libraries
Severity: 3 - Normal
Item Group: Crash
Status: Postponed
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
_______________________________________________________
Details:
When a region file is visually made with DS9 and the user gives it a
non-standard width or color, the region file can't be read by Gnuastro, with
an error like this:
$ astcrop image.fits --polygon=ds9.reg
astcrop:ds9.reg:4: line with polygon vertices doesn't end with ')'. It is
expected for the line to have this format: 'polygon(AAA,BBB,...)'. Where 'AAA'
and 'BBB' are numbers and '...' signifies that any number of points are
possible
This happens because in such cases, DS9 appends the line with the
'polygon(...)' definition with '# color=CCCCC width=XXXX'. For example, here
is the basic region file that caused the error above (after changing the width
and color of the region):
$ cat ds9.reg
# Region file format: DS9 version 4.1
global color=green dashlist=8 3 width=1 font="helvetica 10 normal roman"
select=1 highlite=1 dash=0 fixed=0 edit=1 move=1 delete=1 include=1 source=1
image
polygon(505.48874,678.30722,595.26462,678.30722,595.26462,588.53135,505.48874,588.53135)
# color=black width=4
We should allow the code that reads the region file to allow anything after
the closing parenthesis of 'polygon(...)'.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?61967>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [bug #61967] DS9 polygon region files not read when width and color are set,
Mohammad Akhlaghi <=