27 #ifndef DS9FILEWRITER_QO_H_
28 #define DS9FILEWRITER_QO_H_
30 #include <QTextStream>
32 #include <display/RegionShapes/QtDS9WriteOptions.ui.h>
100 bool write(
const std::vector<RegionShape*>& shapes)
const;
104 bool write( QTextStream &, AnnRegion * )
const;
130 const RegionShape*
shape,
bool isComposite =
false)
const;
135 static std::vector<casacore::String> v(14);
161 stringstream& errors);
163 stringstream& errors);
170 bool& conversionWasNeeded);
188 }
else return posUnit;
207 bool isCustomCoordinateSystem()
const;
211 bool isPixelCoordinateSystem()
const;
227 int getPrecision()
const;
234 void coordinateSystemChanged(
int index);
static const casacore::String PROP_FONT
static const casacore::String CSYS_B1950
bool m_custCoordSys
Custom options.
static const casacore::String CSYS_INDIVIDUAL
static const casacore::String PROP_SELECT
static const casacore::String PUNIT_SEXAGESIMAL
~DS9FileWriter()
Destructor.
static std::vector< casacore::String > globalProperties()
Returns list of all properties to be used in the globals.
casacore::String m_sizeUnits
Widget used for entering options specific to the DS9 format.
casacore::String m_coordSys
virtual Type type()
Return the type enum.
static bool isValidDS9System(casacore::MDirection::Types worldSys)
Returns true if the given CASA world system is supported by DS9.
static DS9::CoordinateSystem coordinateSystem(const casacore::String &system)
Converts a coordinate system constant (as used in DS9RFWOptions) into its DS9::CoordinateSystem equiv...
virtual bool write(const std::vector< RegionShape * > &shapes) const =0
Write the given regions to the filename set with setFile and returns true if no errors were reported...
static const casacore::String PROP_DASH
bool writeGlobals(QTextStream &file, stringstream &errors) const
Writes globals (default DS9Region properties) and, if applicable, the overriding coordinate system...
static CoordinateSystem defaultCoordinateSystem()
static const casacore::String PROP_SOURCE
virtual void setOptions(const QWidget *widget)=0
Sets the options to the values given in the widget.
static const casacore::String CSYS_ECLIPTIC
static const casacore::String SUNIT_ARCSEC
static const casacore::String CSYS_GALACTIC
Types
Types of known MDirections Warning: The order defines the order in the translation matrix FromTo in ...
static const casacore::String SUNIT_ARCMIN
bool writeFooter(QTextStream &) const
Abstract superclass for any class that writes RegionShapes to a region file format.
casacore::String m_comments
static QString convertValue(double value, const casacore::String &toUnits, int precision)
Converts the given value to a QString version using the given units.
static const casacore::String PUNIT_HMS
bool writeShape(QTextStream &file, stringstream &errors, const RegionShape *shape, bool isComposite=false) const
Writes a single shape to the file.
static std::vector< RSMarker * > convertMarker(const RSMarker *marker, bool &conversionWasNeeded)
Converts the given RSMarker into one or more DS9-friendly RSMarkers.
static const casacore::String PROP_INCLUDE
static const casacore::String PROP_COLOR
DS9FileWriter()
Constructor.
Subclass of RegionShape used for drawing markers.
static const casacore::String PROP_DELETE
Implementation of RegionFileWriter for writing to DS9 files.
static casacore::String sgUnit(const casacore::String &posUnit, int index, const casacore::String &coordSys)
Converts the given position unit, if applicable, from sexagesimal to either HMS or DMS...
TableExprNode shape(const TableExprNode &array)
Function operating on any scalar or array resulting in a Double array containing the shape...
static const casacore::String PROP_MOVE
casacore::String m_posUnits
static const casacore::String PROP_EDIT
static const casacore::String PROP_WIDTH
static const casacore::String PROP_DASHLIST
static const casacore::String UNIT_IPIXELS
static const casacore::String DEFAULT_COMMENTS
static const casacore::String PUNIT_DMS
static const casacore::String UNIT_DEGREES
bool writeHeader(QTextStream &) const
String: the storage and methods of handling collections of characters.
static const casacore::String PROP_HIGHLITE
static const casacore::String CSYS_IMAGE
static const casacore::String PROP_ROTATE
void resetOptions() const
Rests custom options to defaults.
CoordinateSystem
casacore::Coordinate systems.
static const casacore::String CSYS_J2000
PlotCoordinate::System getCoordinateSystem() const
Overrides PlotTool::getCoordinateSystem().
static bool regionType(const RegionShape *shape, DS9::RegionType &type, stringstream &errors)
Finds the DS9 region type for the given shape.
LatticeExprNode value(const LatticeExprNode &expr)
This function returns the value of the expression without a mask.
virtual QWidget * optionsWidget() const =0
Provides a custom widget that can be used to get/set options specific to each format type...
static const casacore::String PROP_FIXED
Defines nreal time structures used by the VLA table filler.
static const casacore::String UNIT_RADIANS